[Chameleon] Problem with dynamically generated mapfile
Julien-Samuel Lacroix
jlacroix at dmsolutions.ca
Thu Feb 16 08:09:17 EST 2006
Hi,
Since you are regenerating the mapfile on each page hit, I suppose you
are using the the readonly mapsession. If not you should. If you
included the following line in your php page you are using the
read/write mode:
$this->moMapSession = new MapSession_RW;
$this->moMapSession->setTempDir( getSessionSavePath());
In that case, Chameleon is saving the mapfile on disk at each hits. You
may try to reuse this new mapfile instead of the dynamically generated
one of your own. If you want more info on those subject, don't hesitate
to ask.
For your ZoomAllLayer problem, simply add the following metadata in your
mapfile:
original_extent "your,extent,comma,separated"
With the read/write mapsession mode, Chameleon is adding it himself. But
since you are not using this mode, you should add it manually.
Julien
Bergero Claudio wrote:
>
> Hi,
>
> I'm new to Chameleon and I have a problem.
>
> I need to run Chameleon on a dynamically generated map file; this is
> mainly due to the need of dynamically including or excluding layers,
> dinamically changing the name of the shapefiles, zooming to a single
> layer extent and having different repositories for mapflies, based on
> user input incoming from an external page.
>
> I wrote a php page based on the sample with extended enhanced widgets.
>
> This page, depending on user input, generates a random mapfile based on
> a template and passes it to chameleon; I also managed passing user input
> to successive page calls, in order to regenerate a correct mapfile for
> zooming, panning, and similar operations, which cause a page refresh;
> the temporary mapfile is deleted at the end of the php page.
>
> The system seems to work, except for one detail: the ZoomAllLayers
> widget stopped working: when you press it the page is refreshed but no
> zooming operation is performed, the map redraws extactly as the one
> before...
>
> I've no idea about the reasons. No error message is displayed. No
> javascript error is generated. I tried not to remove the mapfile (even
> if Chameleon makes its own dynamic copy), without success. I modified
> the widget code to print the extents retrieved from the map, and they
> was correct.
>
> The others navigation widgets (zoom in, zoom out, recenter and panning)
> work perfectly.
>
> Have you any idea of the problem?
>
> Thanks in advance
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
--
------------------------------------------------------------
Julien-Samuel Lacroix jlacroix at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the Chameleon
mailing list