[Chameleon] RE: Chameleon Digest, Vol 13, Issue 20

Ken Sanderson ken at rockies.ca
Fri Apr 22 17:05:00 EDT 2005


Lots of ways to do this and it really depends on your situation. You 
could simply create multiple map files and have the *.phtml file use a 
specific map file as determined by a URL parameter, so 
'http://localhost:8080/john/johntest.phtml?mapfile=testmap.map' would 
result in $szMapFile = "../map/testmap.map"; in your *.phtml file. If 
you have a lot of different options this may not be appealing, then you 
could go with something where you either added a new layer to the 
chameleon application based on the URL parameter or edit an existing 
layer's data property in chameleon to point to a specific image based on 
the URL using php/mapscript in both cases.

Rather depends on what you are doing, number of image options, etc.

Ken

John Bennett wrote:
> 
> Hi List
> If a javascript calls a Chameleon *phtml with a geotiff image name attached,
> how do you feed the mapserver the geotif image. Would this been done by
> dynamically making a MAPFILE or by renaming the desired image to one stated
> in the MAPFILE.
> 
> Basically if I have a list of image products in a HTML page, I want to be
> able to click on an image product and then a MapServer pops up with the
> image displayed.
> 
> myRef = window.open('http://localhost:8080/john/johntest.phtml','mywin',
> 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
> 
> Cheers,
> John
> 
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 



More information about the Chameleon mailing list