5

We would like to implement a completely custom visualization to be included in a map, whose other layers we'd like the JavaScript API to control. This custom visualization would be updated by hand in response to map events, and will be constructed by hand from HTML elements. That is, it is not a layer with simple feature or image behavior as could be created by deriving a custom image, feature, or tile layer. Other than reverse-engineering the DOM constructed by the JavaScript API, is there any support for this cooperation in the API?

  • 2
    It actually depends on your visualization, but you could show that using InfoWindows: help.arcgis.com/en/webapi/javascript/arcgis/jssamples/… – Devdatta Tengshe May 1 '13 at 16:01
  • 1
    Yes, it would be an option to inspect the div that is created and place elements there. Yet another option besides infowindows is adding to the default graphic layer or creating your own graphic layer. There are various symbology options. You can do labeling. There are editor widgets that allow a user to draw point, lines and polygons in various ways, edit them, add attributes, save them if you setup an editable feature service, etc. – awesomo May 1 '13 at 16:44
  • Essentially, you are wanting something like the Overlay class in Google Maps, but with ArcGIS? – Anthony -GISCOE- May 1 '13 at 18:05
  • Please submit your answers as answers, not comments – Sebastian Good May 2 '13 at 12:58
  • 1
    @SebastianGood can you add more specifics of what you'd like to do? I wouldn't recommend trying to roll your own layer from scratch. The canvas with raster layer is a good example of a custom layer that inherits from the generic Layer class: developers.arcgis.com/en/javascript/jssamples/… – Derek Swingley May 2 '13 at 21:11
2

It sounds like you are looking for a client-side rendering solution (given you state that the "custom visualization would be updated by hand in response to map events" and that " it is not a layer with simple feature"). So server-side tile creation doesn't sound like an option. If you are open to using a different client JavaScript map visualization library then take a look at the free HTML5/JavaScript API at http://www.mapsJS.com.

See the example at: http://isdkhtml5.mapdotnet.com/iSDK/isc.rim.isdk.clientRenderLocal.htm

If you can manipulate a local viewmodel based on "map events" you can custom-render any sort of overlay: as bitmap tiles or as a collection of DOM elements.

  • 2
    As a reseller of this solution, you need to identify yourself as such whenever suggesting it. Please follow the StackExchange promotion guidelines if you wish to retain your posting privileges here. – whuber May 7 '13 at 18:36
  • 1
    OK, that was not a good choice of words. (My excuse is that I was in the process of tracking down multiple posts by you at the time and so was proceeding in some haste.) It's clear you have a substantial professional connection/investment/commitment to it. Regardless of the price, readers deserve to know of that connection because it helps them decide how much to trust your answer, especially as you have no reputation here as yet. – whuber May 13 '13 at 20:36
  • 1
    Okay, I am one of the developers of mapsjs (mapsjs.com)...it is a JavaScript/HTML5 framework for geospatial visualization on mobile / desktop. Mapsjs is part of a campaign by the makers of MapDotNet to give back to the community - as I said, it is free, fully functional and does not require any commercial product commitment. If my answer (involving mapsjs) actually addresses the question, then I would hope the community on this forum would appreciate it. – Brian May 13 '13 at 20:47
  • 1
    I share your hope: we are always grateful to hear from experienced and committed professionals, regardless of their affiliation. However, I was unable to appreciate your post because--in addition to being ungrammatical, which makes it difficult to understand--it does not really explain or show how it answers the question. In its present form it's essentially a link to your site. Such answers are usually found to be inadequate, as our faq explains. I'm sure it would get many upvotes if you edited it to be clearer and more responsive to the question. – whuber May 13 '13 at 20:51
  • 1
    Thank you, Brian. I hope others will revisit your answer and give it the votes it deserves (+1). – whuber May 13 '13 at 23:46

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.