[mapguide-users] viewing satellite map image
Jason Birch
Jason.Birch at nanaimo.ca
Fri Nov 3 04:39:38 EST 2006
If you have the satellite images...
The easiest way would be to make your map contain both the normal and the satellite images as layer groups. Make neither of them visible in the legend. Define the map with the normal layergroup enabled and the satellite image layer group disabled.
Create a button that calls a PHP script in the script frame. Make this php script programmatically check the state of these two layer groups in the current session, turn off the one that is on and the reverse, and refresh the map.
The basic workflow is something like (untested, and not guaranteed):
- GetMap from the session
- GetLayerGroups from the MgMap
- GetItem from the MgLayerGroupCollection for the satellite group
- GetVisible and then SetVisible (to the inverse of current value)
- repeat last two steps for the normal group
- output some JS to cause a map refresh
There is some example code here to help you along here:
https://mapguide.osgeo.org/nonav/docs/webapi/da/df8/class_mg_map.html
You'll be working with the current session map, rather than creating a new one. The existing tasks in the viewer sample should help you figure that part out.
As far as tying the button (or some other element) to this function, passing the current session id, etc, someone else will need to help with that; I don't have a lot of experience there.
Jason
________________________________
From: Kencana
Sent: Thu 2006-11-02 11:38 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] viewing satellite map image
Hi all,
Is that possible to change the map view from normal map image to the
satellite map image just like what google map did?is that possible to be
done with map guide?if yes,can I know how to do it?
I am looking forward for the reply, and thank you for the guidance...
Regards,
Kencana
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5521 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20061103/9b5a06e8/attachment.bin
More information about the Mapguide-users
mailing list