Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

getting map image

2 REPLIES 2
Reply
Message 1 of 3
bluesky_dyx
487 Views, 2 Replies

getting map image

hi all,

I got some doubt in getting the map image, i have read at a forum and it says that I can use getmapimage function to get the map image.therefore,is there any guidelines of using this function?or maybe i have to use other function?i hope somebody can help me out and thank you very much..

regards,
kencana
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: bluesky_dyx

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
Message 3 of 3
Anonymous
in reply to: bluesky_dyx

Watch the formatting of the last URL in that last message. There should be
nothing after PASSWORD=

Andy

"Andy Morsell" wrote in message
news:5396883@discussion.autodesk.com...
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=Ihope this helps.--Andy Morsell, P.E.Spatial Integrators,Inc.http://www.SpatialGIS.com wrote in messagenews:5396304@discussion.autodesk.com...hi all,I got some doubt in gettingthe map image, i have read at a forum and itsays that I can use getmapimagefunction to get the map image.therefore,isthere any guidelines of using thisfunction?or maybe i have to use otherfunction?i hope somebody can help meout and thank you very much..regards,kencana

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report