[mapguide-users] Disable zoom and drag on one map, but not on other.

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Thu Nov 19 02:56:23 EST 2009


For the "static" map, you could simply use the GETMAPIMAGE call,
and then manually control layer visibility.

Basically:

1) On startup, create the MG session and runtime map
2) Create a html page with an <img> pointing to:
http://servername/mapaguide/mapagent/mapagent.fcgi?OPERATION=GETMAPIMAGE&SESSION=<sessionid>&MAPNAME=<runtimemapname>&seq=<random 
number>
3) Start a javascript that reloads the <img> with a new random number 
each 60 seconds
4) Provide controls to turn on/off layers and toggle these in server code

If you need a full viewer (eg, tile support, etc.), you can use 
OpenLayers to display the map,
and disable the navigation controls. It would be a little bit difficult 
to use a standard WebLayout and disable all
mouse controls.

*) The GETMAPIMAGE call probably requires more parameters, check the 
test page:
http://localhost/mapguide/mapagent/index.html

Regards, Kenneth Skovhede, GEOGRAF A/S



BojanFranc at FER skrev:
> Hi,
>
> I need to make 2 maps. One windowed (small) with no ability to zoom or move.
> The other full screen map with all the features MapGuide has.
>
> First map should be a static map refreshing every 1 minute but users should
> not be able to zoom on it or move. It should be a "static" map. What the
> users should be able to do is to enable and disable some layers on the map,
> nothing more. It's like a "demo" map for unregistered users.
>
> The second map will be available to registered users displayed at full
> screen with all Mapguide features enable.
>
> Can it be done? If so, any help is appreciated.
>
> I am using MGOS 2.1 with PHP.
>
> Regards
>   


More information about the mapguide-users mailing list