Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the official ESRI solution for serving up static map images (i.e. png, jpg, etc)?

I need to write a map service that returns a single, static map image (png, jpg, etc). In the old days (i.e. before Google Maps took off) this was the default way that server software like ArcIMS worked. Now, those packages default serving tiled map services, which usually are the appropriate solution in most cases. However, in this case, my requirements are to return a single image that can be accessed by a URL.

I know that the Google Maps solution is their static map API. This works fine if you are creating a simple map, but my map will have polygon and point overlays, and probably to add as markers and encoded polygons w/in the confines of a 1024 char URL.

I have access to ArcGIS Server, and can create a map service that includes the above data, but I can't tell what is the best way to get the service to return a single image. The only thing I found in the ESRI online help was the ability to add OGC Web Map Service (WMS) capabilities to a map service. You can the request the map as an image, but this seems like a bit of a hack to me.

Does anyone know if there is a better/more official way?

like image 417
Tom Wayson Avatar asked Apr 05 '11 22:04

Tom Wayson


1 Answers

If I understand what you want to do correctly, you can leverage the ArcGIS Server RESI API to do this. Using the REST API you can request a single image from an ArcGIS Server map service, and specify the bounding box, image size, image file type and numerous other parameters - and you get back a single image of that size, type etc.

The map service could be one that you have published on your ArcGIS Server (9.3 or higher). The service can be cached or dynamic. You can also utilize ArcGIS Online services, even to just to get a feel for this. So for example, go to the following URL:

http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer

And under "Supported Operations" at the bottom of the page, go to Export Map. Enter a size in the "Image Size" text box (for example: 1200,1200) along with any other parameters and click "Export Image".

You can get a feel for the acutal URL arguments by looking at the resulting URL for your request. You can get information about the parameters here (for example, for Export operation): http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/export.html

Now you mentioned creating a web service, so to do this programmatically you may be able to just hit the REST API directly. Or perhaps you'll want to create your own service as a wrapper around these REST API calls.

Hope this helps and I understood your question correctly.

like image 62
Dave Marley Avatar answered Sep 28 '22 09:09

Dave Marley