The easiest way to do this would be to use the GETMAPIMAGE mapagent
operation. Here is an example URL:
http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=GETMAPIMAGE&VERSION=1.0.0&MAPNAME=Sheboygan&LOCALE=en&MAPDEFINITION=Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition&FORMAT=PNG&SETDISPLAYDPI=300&SETDISPLAYWIDTH=800&SETDISPLAYHEIGHT=600&SESSION=6137915c-0000-1000-8000-005056c00001_en
In this case, the one thing you do need to determine or programatically
create is a session. That is required. The above URL will return a map
representation of how that map looked when the user last zoomed or panned,
including any selected objects. So, it's a good way to take an existing
user map session and produce an image of what they were looking at.
There are some other optional override parameters so that you can set the
map center, height and width without an existing session. They are:
SETVIEWCENTERX=
SETVIEWCENTERY=
SETVIEWSCALE=
In this case, you don't need a SESSION parameter, but you will need to
supply credentials. You can use the below undocumented parameters so the
user is not presented with the challenge/response dialog:
USERNAME=
PASSWORD=
Here is a full example:
http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=GETMAPIMAGE&VERSION=1.0.0&MAPNAME=Sheboygan&LOCALE=en&MAPDEFINITION=Library%3A%2F%2FSamples%2FSheboygan%2FMaps%2FSheboygan.MapDefinition&FORMAT=PNG&SETVIEWCENTERX=-87.73&SETVIEWCENTERY=43.74&SETVIEWSCALE=5000&SETDISPLAYDPI=300&SETDISPLAYWIDTH=3000&SETDISPLAYHEIGHT=2100&USERNAME=Anonymous&PASSWORD=I hope this helps.--Andy Morsell, P.E.Spatial Integrators, Inc.http://www.SpatialGIS.com wrote in message news:5396304@discussion.autodesk.com...hi all,I got some doubt in getting the map image, i have read at a forum and itsays that I can use getmapimage function to get the map image.therefore,isthere any guidelines of using this function?or maybe i have to use otherfunction?i hope somebody can help me out and thank you very much..regards,kencana