I am having a Map Service from a ArcGIS Server Manager which I would like to add to the .cshtml page of my MVC project is this possible like the way shown in here by ESRI
https://developers.arcgis.com/en/javascript/jssamples/index.html#latest_samples
I am able to use the samples but how do I use my Map.
1 Answer 1
After you have published a map service, you can access it from any other application or framework that can work with web services via REST or SOAP. Since you work with JS API, you can refer to your map services via such URL:
http://<yourservername>/<instance name>/rest/services/<mapservicename>/MapServer
You can see what URL your map serivce(s) have in a special application called Services Directory which you can access at the
http://<yourservername>/<instance name>/rest/services
where you can get a list of all services, their capabilities and URLs. Here is the sample that consumes a dynamic map service in JS API.
-
Thank you this is exactly what I wanted.But one issue is that when I use the Map service as an application I have tools around it which help in interaction with the map how do I get them as well?sudhansh– sudhansh2013年12月13日 17:07:28 +00:00Commented Dec 13, 2013 at 17:07
-
1If you refer to such tools as you would get in ArcMap (zoom in/out, pan, last extent icons) >> you need to code them yourself. Take a look at existing samples to get an idea - developers.arcgis.com/en/javascript/jssamples/….Alex Tereshenkov– Alex Tereshenkov2013年12月13日 17:25:15 +00:00Commented Dec 13, 2013 at 17:25