[ka-Map-users] selecting multiple layers
Lorenzo Becchi
lorenzo at ominiverdi.com
Tue Jul 26 09:42:53 EDT 2005
Hi,
I really apreciate your work with KaMap.
We tried to do our personal version here:
http://149.139.8.29/~rischio/kamap-dev/htdocs/
We developed our system to check or unckeck layers visibility. You have
to check layers an click on "ricarcola" button to see changes. Acting
like this it works great.
Problems arise when you zoom in or out in a map that shows certain
layers at certain scales.
In our case a layer called CTR is shown only under 1:500.000 resolution.
When you zoom in twice (1:250.000) in the center of Lucca (LU) province
it has to appear a tile for the Tecnical Regional Map (CTR) because we
set it visible in the map at this zoom factor. You can see CTR in the
Legend but the tile doesn't appear.
If you move (scroll?) in the map, far from that point, and you came
back to the LU center the tile appears. It appears also if you click on
"ricarcola" button.
What we did:
1) create a page ("layers.php") that calls the mapserver each time a
zoom is clicked (or by default) and gives back a list of visible layers
at the new zoom factor (js function getLayers()). This list is paired
with the javascript session list and we finally get which layer is on
and which layer is off (js function setLayersCsv()).
the result is shown right side of "zoom out" button ("Layerz").
2) we modified js function setTile() to pass onLayers variable set by
setLayerCsv().
we where expecting that setLayerCsv was as fast as the
zoomIn->initializeLayers->setTile series but first tiles coming still
maintain "old" onLayers. After a while tiles are coming with the right
combination of layer.
We tried to put a delay in zoom functions after setLayerCsv() and
before initializeLayers() but it has to be a long delay (6 seconds at
least) to work fine.
any suggestions?
I hope this explication is understandable.
thanks
Lorenzo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1941 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/ka-map-users/attachments/20050726/f6f77beb/attachment.bin
More information about the ka-Map-users
mailing list