MapTools.org

[Chameleon] Problems getting started ...

Jean-Francois.Doyon@CCRS.NRCan.gc.ca Jean-Francois.Doyon@CCRS.NRCan.gc.ca
Thu, 18 Dec 2003 12:51:02 -0500
Paul,

I think it makes sense, I'm sure I'll manage around that once I get to
reading the Chameleon Base class !

About the UploadContext widget.  I noticed I setup a template mapfile in
cwc2.xml ... I'm guessing this is what it's for ? So I could edit this
mapfile and give the widget a try ?

Thanks,
J.F.

-----Original Message-----
From: Paul Spencer [mailto:pagameba@magma.ca]
Sent: Wednesday, December 17, 2003 6:37 PM
To: Jean-Francois.Doyon@ccrs.nrcan.gc.ca
Cc: spencer@dmsolutions.ca; chameleon@lists.maptools.org
Subject: Re: [Chameleon] Problems getting started ...


JF,

you would override the CWCLoadMap function from the Chameleon base class 
and use the mapscript function $oMap->loadMapContext( ) to load the 
context.  Note this requires a valid map object to begin with.  It may 
be possible to start with $oMap = ms_newMapObj( "" ); but it is safer to 
start with a real map file that defines the minimal configuration for 
your web server paths, image color, transparency etc.

Let me know if that doesn't make sense and I will implement something in 
the sample app that I just sent to demonstrate.

Using the UploadContext widget would allow you to load a Context at run 
time, you would still need a map file somewhere to initialize with.

Cheers,

Paul

Jean-Francois.Doyon@ccrs.nrcan.gc.ca wrote:

> Paul,
> 
> Indeed my next step will probably be to try a context instead of a map
file
> ...
> 
> I see there's the UploadContext widget there, so I guess I could try that
> ...
> 
> If I wanted to initialize the entire app from a context file instead of a
> map file, how would I do that ?
> 
> Thanks,
> J.F.
> 
> -----Original Message-----
> From: chameleon-admin@lists.maptools.org
> [mailto:chameleon-admin@lists.maptools.org]On Behalf Of Paul Spencer
> Sent: Wednesday, December 17, 2003 4:47 PM
> Cc: chameleon@lists.maptools.org
> Subject: Re: [Chameleon] Problems getting started ...
> 
> 
> JF,
> 
> Bart is correct.  In Chameleon, there is no service instance (yet), so 
> you create a simple php script that ties together your map file and 
> template using the base class in chameleon.php
> 
> As Bart suggests, there is a sample of this that should work for simple 
> applications without modification.  We can extend the sample to load a 
> context file, which is simply loading a map file and then loading the 
> context into the map file.  Or we can use a map file with WMS layers. 
> Same difference.
> 
> I still owe you a response on the previous email, I haven't worked my 
> way up to it but will try to respond tonight.
> 
> Cheers,
> 
> Paul
> 
> 
> Bart van den Eijnden wrote:
> 
>>Hi Jean-Francois,
>>
>>in an earlier post you said you were using Chameleon 1.1 Alpha 6.
>>
>>I think what you are trying now is the Chameleon 1.0 way 
>>(/chameleon/chameleon.php?TEMPLATE=demo.html&CONTEXT=gmap_context.xml).
>>
>>Try installing the Chameleon sample application and then run that by 
>>trying the URL (create the sample_app alias to "sampleapp"/htdocs 
>>directory):
>>
>>/sample_app/index.phtml
>>
>>Make sure the paths in index.phtml to MAP/Context file and template are 
>>correct.
>>
>>Best regards,
>>Bart
>>
>>On Wed, 17 Dec 2003 16:04:12 -0500, 
>><Jean-Francois.Doyon@CCRS.NRCan.gc.ca> wrote:
>>
>>
>>>OK, so I've got PHP 4.3.3 compiled the way I want to, as well as
>>>mapserver/mapscript. (Except that I've hacked PHP/MapScript to work 
>>>with PHP
>>>as a module for Apache to test the thread safety).
>>>
>>>I've also configured cwc2.xml and renamed it removing the -dist ...
>>>
>>>I've made the web user owner of the data directory ...
>>>
>>>I've added /tmp/ms_tmp and /tmp/ms_tmp/buttons ...
>>>
>>>And I've aliased as such:
>>>
>>>    Alias /ms_tmp/ /tmp/ms_tmp/
>>>
>>>    Alias /chameleon/ /usr/local/chameleon/htdocs/
>>>
>>>Now I'm trying the following URL:
>>>
>>>/chameleon/chameleon.php?TEMPLATE=demo.html&CONTEXT=gmap_context.xml
>>>
>>>And am just getting a blank page ...
>>>
>>>To be exact, it contains the following code:
>>>
>>><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>>><HTML><HEAD>
>>><META http-equiv=Content-Type content="text/html;
>>>charset=windows-1252"></HEAD>
>>><BODY></BODY></HTML>
>>>
>>>I've also built the "wmsparse" utility.
>>>
>>>I guess I'm missing something but I'm all out of ideas !
>>>
>>>Find my cwc2.xml attached. <<cwc2.xml>>
>>>
>>>Any help would be greatly appreciated !
>>>
>>>Thanks,
>>>
>>>Jean-François Doyon
>>>Internet Service Development and Systems Support / Développement des
>>>services et soutien de systèmes Internet
>>>GeoAccess Division / Division GéoAccès
>>>Canada Center for Remote Sensing / Centre canadien de télédétection
>>>Natural Resources Canada / Ressources naturelles Canada
>>>http://atlas.gc.ca
>>>Phone: (613) 992-4902
>>>Fax: (613) 947-2410
>>>
>>
>>
>>
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           spencer@dmsolutions.ca    |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------


This archive was generated by Pipermail.