Select to view content in your preferred language

ArcGIS Replacement for Google Static Maps

1761
5
Jump to solution
05-26-2021 09:04 AM
DanielDormont
Occasional Contributor

Hi, I am an application developer and am using ArcGIS Online for the first time and learning about the different location services such as basemaps, geocoding etc.

In my existing application, we use the Google Static Maps API   to generate static thumbnail images of specific basemaps with certain custom overlays on top of them. Basically, it's a URL where you specify the image size, bounds, map "type" (basically a basemap) and some minimal data about the custom marker, polygon etc that you want drawn on it, and some kind of authentication. The URL itself returns an image that you can embed directly in a web page or other document. There is no need to parse the response.

I am looking for something similar in the ArcGIS world and having a hard time finding it. Some searches have turned up results looking for "downloading" or "exporting" a map, but I don't think that's what I want, or if it is, I am looking for guidance on how that would translate into the "static maps" requirement that I have.

Thanks

 

PS. It looks like the search turned up a few related posts, but I am not running ArcGIS server myself. I was looking for a service my application could consume from the cloud similar to what Google, Mapbox etc. provide.

0 Kudos
1 Solution

Accepted Solutions
GavinRehkemper
Esri Contributor

One way to do this is to use the "Export Web Map Task". It can output images (PNGs, JPGs, etc) as well as PDFs based on a configuration of layers (Web_Map_as_JSON) that you pass in as a parameter.

Documentation: https://developers.arcgis.com/rest/services-reference/enterprise/export-web-map-task.htm

Depending on your requirements, you can send this request via GET or POST. See this endpoint form for help on constructing the request: https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%...

Demo: I cannot copy/paste the full URL here because it's too long, so you can go here and copy/paste this URL into your browser. It will send back a JSON response that contains a link to the image. https://www.arcgis.com/sharing/content/items/fe52496307ff4defa1fb8f9c55533f3d/resources/get-image-ur...

 

View solution in original post

5 Replies
GavinRehkemper
Esri Contributor

One way to do this is to use the "Export Web Map Task". It can output images (PNGs, JPGs, etc) as well as PDFs based on a configuration of layers (Web_Map_as_JSON) that you pass in as a parameter.

Documentation: https://developers.arcgis.com/rest/services-reference/enterprise/export-web-map-task.htm

Depending on your requirements, you can send this request via GET or POST. See this endpoint form for help on constructing the request: https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%...

Demo: I cannot copy/paste the full URL here because it's too long, so you can go here and copy/paste this URL into your browser. It will send back a JSON response that contains a link to the image. https://www.arcgis.com/sharing/content/items/fe52496307ff4defa1fb8f9c55533f3d/resources/get-image-ur...

 

DanielDormont
Occasional Contributor

Thanks, that is along the lines of what I'm looking for. I'm not yet familiar with the Export Web Map Task but I'll see what I can find.

0 Kudos
luckachi
Occasional Contributor III

@DanielDormont Were you able to accomplish this? I am trying to find a suitable replacement for the Google maps api where I just need a static map and then pass coordinates via the URL to place a marker. No interaction, just simple and I haven't really found a good example

0 Kudos
DanielDormont
Occasional Contributor

Hi, @luckachi unfortunately no I was not able to find anything in the ArcGIS platform that could do this for me. The Export Web Map Task is along the right lines, but it doesn't allow you to construct a simple URL that will return the image in the way that Google or Mapbox offer.

0 Kudos
luckachi
Occasional Contributor III

@DanielDormont Ugh, that is disappointing. We have been having some issues with Google API for the last few months so we were hoping ESRI offered something similar. Thank you for the quick reply!

0 Kudos