Static maps with ArcGIS Server 10.4 __by URL__

2227
10
01-30-2017 08:26 PM
PitersonPaulgek
New Contributor III

Hi,

We want to use static maps with ArcGIS Server 10.4

And found "ArcGIS Service Similar to Google Static Maps API" - GitHub - esri-es/Static-Map-Service-ArcGIS: This service allows you to get a static map through an U... 

Please explain how to publish the service to the ArcGIS Server.

Any help, please.

Tags (2)
0 Kudos
10 Replies
PitersonPaulgek
New Contributor III

Another question about URL

String.Format("http://staticmapservice.herokuapp.com/?center={0},{1}&zoom=5&size={2}x{3}&maptype=streets&markers=color:orange|{4},{5}&format=jpg", latitude, longitude, AWidth, AHeight, latitude, longitude);

does not show markers. Why?

0 Kudos
PitersonPaulgek
New Contributor III

How can I publish a Javascript script as a print service?

0 Kudos
PanagiotisPapadopoulos
Esri Regular Contributor

Use the Export Map from a Dynamic Service. The rest end point allow you to create static images from the map. See here

https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/export?bbox=-232.699730... 

You can see all the available parameters here

Export Map (Census) 

Help about how to use this rest end point is available here Export Map (Operation) 

FC_Basson
MVP Regular Contributor

The REST endpoint could be used in conjunction with the Search widget (Search | API Reference | ArcGIS API for JavaScript 3.19 ) to perform a similar map export request for place name searches as in the GitHub example provided by piterpaulppp‌ in the original question post.  After getting the results from the Search widget, the map export URL can be constructed and executed to generate a static map when using a place name in the static map request URL.

0 Kudos
PitersonPaulgek
New Contributor III

Thank you Panagiotis PapadopoulosFC Basson

You made really good points.

How I add marker or line to Export Map?

Sorry, but can I do static map with the https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2Fesri-es%2FStatic-Map-Se... 

If yes, please explain how to publish to ArcGIS Server

0 Kudos
PanagiotisPapadopoulos
Esri Regular Contributor

Also don't forget the Javascript Print task

Print | ArcGIS API for JavaScript 3.19 

ArcGIS Server has a print service for this and Javascript API a ready to use Print Widget, see here

Printing in web applications—Documentation (10.5) | ArcGIS Enterprise 

0 Kudos
PitersonPaulgek
New Contributor III

Thank you Panagiotis Papadopoulos 

We only need the URL solution

0 Kudos
PitersonPaulgek
New Contributor III

Sorry, but can I do static map with the https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2Fesri-es%2FStatic-Map-Se... 

 

If yes, please explain how to publish to ArcGIS Server.

Any help please

0 Kudos
FC_Basson
MVP Regular Contributor

You must first install GIT and also Node and NPM, then just run the command line install instructions as provided on the page.

0 Kudos