I asked a similar question on stack overflow here:
http://stackoverflow.com/questions/5559219/whats-the-official-esri-solution-for-serving-up-static-ma...
What I had come up with on my own was to enable WMS functionality on the map service, and then I was able to access the map directly via a URL. There are no URL parameters for adding markers, but you can specify which layers should be visible - which can include your "markers."
However, this seemed a bit kludgy to me, so I just put the question out there to see if there was an
official ESRI solution. The response I got shows a way to export the map service as an image using JavaScript. This gets around having to enable the WMS functionality on the map service, but you still have to run javascript to get export the map and dynamically add an image with the src set to the output.
I'd love to hear if anyone else has a "cleaner" solution.
Thanks,
Tom (W)
I have just plublished two projects exactly to do that:
Using a NodeJS script: esri-es/Static-Map-Service-ArcGIS · GitHub
Using a Javascript class: esri-es/Static-Maps-API-ArcGIS · GitHub
I hope it helps
Raúl
@Raul- The difference between your solution and Google's is that their's is url based. A javascript solution is not ideal as you cannot embed the "image" into, say, an email. Unfortunately, a javascript solution is something we are unable to implement due to this limitation.
Hi Jason Kiesel,
You can do the URL base with this one: Static Map Service for ArcGIS
You just need to run that node script (node index.js) on a server and it will work as Google does:
<img src="http://staticmapservice.herokuapp.com/?center=Brooklyn+Bridge,New+York,NY&zoom=7&format=SVG&size=600...">
In that way you can embed or do whatever you need with that image.
Regards,
Raul
There is any update on this? The Node.JS server is a super complicated option, taking in count that it doesnt work with just one marker, and sometimes it returns error 400.
Hi Raúl, do you know if its possible to draw polygons using this Static Map Service?. Google Maps does, but there is a limitation because URL length. You can't draw complex polygons with their API Get URL.
We're looking for a complete solution
Thank you in advance