I have a .Net web application with embedded maps, using the Arcgis javascript API. For non-interactive maps, I thought I would just make calls using c# to the REST endpoints. This works fine for returning a single image, but when I tried to work out how to highlight a feature, or overlay another map service layer I hit a brick wall.

The javascript solution works, except that there are a lot of server calls to produce a simple image, and it is still panning when I don't want it to.

I cannot see anyway to add a Graphics Layer to my "map", so am now thinking maybe I just have to stay with the javascript API. I have done a lot of reading (maybe too much!) but am now questioning my own understanding of the REST API.

I am consuming ArcGIS map services from a asp.Net MVC application. I have been using the javascript API in my razor views to provide simple zoom/pan functionality, but I am just wanting to display a static map image. I have managed to do this in my c# code to return an image to the view but I now realise that I only get part of the job done as I cannot highlight a feature (add graphic) nor overlay another mapservice.

  • It's not clear what exactly you are doing. Can you put in more information about the architecture of your Application? – Devdatta Tengshe Nov 7 '13 at 9:01
  • @tr3v you should copy your comment into (edit) your original question. Then you can delete the comment. Please – Brad Nesom Nov 8 '13 at 1:56
  • Mixing up a pure JavaScript Library like the ESRI JSAPI (which runs on AJAX) and older technologies like ASP.NET, is always fraught with danger. You can definitely add graphics/ highlight them pure Javascript. See this: developers.arcgis.com/en/javascript/jssamples/… But how to do it in a hybrid application will depend on your MVC and how much of that is JavaScript. – Devdatta Tengshe Nov 8 '13 at 2:44
  • I can already do the highlighting using javascript, I was trying to achieve the same result without javascript. – tr3v Nov 9 '13 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.