Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there a simple way to render OSM data (let's start with just streets and names for a single metro area) client side as nodes and edges like the new iD editor?

I'm comfortable with d3 but am having trouble seeing exactly how they're pulling it off.

share|improve this question
    
Are you thinking of maps.cloudmade.com/editor or tiles.mapbox.com/newmap#3.00/0.00/0.00 or do you want to render locally on your own server? –  Mapperz May 15 '13 at 13:38
add comment

1 Answer

The Id editor is basically calling the OpenStreetMap API, and requesting the data in osm's xml format.

It basically makes a request like: http://www.openstreetmap.org/api/0.6/map?bbox=xmin,ymin,xmax,yamx

Once the data is received by the client, it is rendered using the connection.loadTiles function in id.js. The deployment code is hard to read, but you should have a look at the source code, available here: https://github.com/systemed/iD/

Using Firebug, and the Javascript debugger, it is pretty easy to figure out what is happening.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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