Infrastructure Map Server General Discussion

Infrastructure Map Server General Discussion

Reply
Contributor
bluesky_dyx
Posts: 18
Registered: ‎10-10-2006
Message 1 of 3 (298 Views)

getting map image

298 Views, 2 Replies
11-14-2006 11:12 PM
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
*Andy Morsell
Message 2 of 3 (298 Views)

Re: getting map image

11-15-2006 08:54 AM 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
*Andy Morsell
Message 3 of 3 (298 Views)

Re: getting map image

11-15-2006 08:55 AM 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
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.