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

Bojan Franc at FER bojan.franc at fer.hr
Fri Nov 27 04:58:47 EST 2009


Thx for help.

I am trying to use getMapImage now, it does exactly what I need.
I just cant get it working with SESSION and MAP parameters.

It says...
Session Id and Map Name
... or ...
Locale and Client Agent and Map Definition.

It works with the second set of parameters, but requires a login each time I 
open the page.

With Session Id and Map Name I get an error...

MgResourceNotFoundException
Resource was not found: 
Session:034a83a2-bd61-102c-8000-000c2993e1ac_en_7F0000010AFC0AFB0AFA//Demo.Map

I am using the same variables for calling the WebLayout of my detailed map, 
and it works fine.
I also tried to copy/paste session and map name into MapAgent interface, but 
get the same error.

My variable shows me MapName "Demo", and the error says "Demo.Map". It added 
the ".Map" at the end of the string.

Where can I read more about getMapImage and similar API functions? I was 
looking for it in MapGuide Web API Reference and MapGuide Viewer API 
Reference but was unable to find anything related.

Regards,
    Bojan Franc


----- Original Message ----- 
From: "Kenneth Skovhede, GEOGRAF A/S" <ks at geograf.dk>
To: "MapGuide Users Mail List" <mapguide-users at lists.osgeo.org>
Sent: Thursday, November 19, 2009 8:56 AM
Subject: Re: [mapguide-users] Disable zoom and drag on one map, but not 
onother.


> 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
>>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 



More information about the mapguide-users mailing list