Using OpenStreetMap in Your ESRI JSAPI Web Apps

So yea, one can always use the Google, Bing or ESRI ArcGIS Online for your web mapping base layer, but lets be honest… You really want to use OpenStreetMap.  Well there is now a code example on the ESRI JSAPI Resource Center  using Cloudmade with JSAPI.  Once can easily take the code and modify it to read in the OSM tiles directly into your JSAPI map.  I used OpenLayers with OSM and ESRI ArcGIS Server in the past, but if you don’t or can’t use OpenLayers, you can take advantage of the OSM project now inside ESRI’s API.

Let’s get it on!

via @sathyaprasad

8 Comments

  1. James:

    An underappreciated aspect of ESRI’s new web APIs (Flex, Silverlight, JS) is the licensing: free for “internal use”, which Bing or GMaps is most certainly not. Further, we’re seeing third-party code coming in to allow you to display WMS sources, KML, etc.

    So while I appreciate the marketing thrust of the APIs being used at the interface to ArcServer content, there’s nothing stopping you from streaming in your content from whatever backend.

    Add in a nice OSM basemap, and I believe the relevant phrase the kids are using these days is “FTW”.

    Brian Timoney, Urban Dictionary Afficionado

  2. Bill Dollins says:

    It’s interesting that the resource center link says it was uploaded on 23 September since it’s been up there a good bit longer than that. It serves as a good template for extending the Flex API to handle OSM and complements Morten’s OSM class for the Silverlight API.

    All in all, I’ve been impressed with extensibility of all of these APIs. I’ll join Brian in that “FTW”.

  3. Emile Zola says:

    FWIW, I like FTW better than WTF, which is my usual reaction with ESRI.

  4. Brett says:

    I did my CloudMadeLayer slightly differently (but the code is eerily close considering we made it independently).
    Here’s an idea of how it looks in a full application (if I can stop breaking it… it’s beta right now).
    http://bit.ly/info/oWGbg

  5. Brett says:

    I should add that I am pretty sure we both started from the OSM layer example posted earlier by Sathya here:
    http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&scriptID=16235
    We just chose nearly the same ways to expand on it :)

  6. CaseyM says:

    I delved into using OpenLayers a few weeks ago and was enjoying myself nicely until I tried performing a query on an ArcGIS REST service. I’m not very savy with the javascript, but I couldn’t find any good examples (if anyone has one, PLEASE share). The developer who constructed the service had not tested it with OpenLayers, so I’m unsure where the hiccup actually is (time dictates moving on, not figuring out).

    OpenStreetMap is gorgeous except for using wide blue for interstates (I keep seeing rivers!)

  7. GIS-Lab Blog says:

    Новости Slashgeo…

    Google анонсировала нововведение в Google Maps – «Place Pages«. Теперь у каждой метки на карте появилась своя интернет страничка. Например, длÑ…

Leave a Reply

Note: This post is over 11 months old. You may want to check later in this blog to see if there is new information relevant to your comment.