where is the detailed OSM API and demo?

Dear all,

I have embeded the OSM in an demo webpage http://www.hig.se/~xioliu/openstreetmap.html. Now I want to do some customization.

For example,

  1. If I want to get the current map bound MinX, MinY, MaxX, MaxY, which OSM API can do it?
  2. If I want to add a text or a point symbol, or a line symbol to current map, how can I do it?
  3. If I want to add rewrite the right-click event on the current map, rather than the IE right-click menu, what can I do?

I have looked through the OSM API,
http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.5
http://wiki.openstreetmap.org/wiki/Xapi

But it seems that the API functions are oversimplified, because I just can’t find the correponding method or examples. I am guessing that there must be more detailed instruction or exmaples, would you please give me any suggestion?

Any of your reply and advice are higly appreciated.

Yours sincerely,

XIntao

The OpenStreetMap API is a data-only API, not a web API. It is not meant for embedding on your webpages.

You should look at OpenLayers or CloudMade’s Web Maps Lite for what you want to do. Both of these can show OSM maps in a similar way to, say, Google Maps.

Damn! Gävle looks super now days, I like the river and park area. :slight_smile:

As Richard says, Openstreetmap isn’t about making web mashup, but about creating maps of what is really there. Using the Datalayer, a custom Openstreetmap DB with the API you can bastardize OSM to do what you want but that’s too much coding for you… But an interesting concept… :slight_smile:

Many thanks for Richard and emj, thanks a lot! Now I have trying to use OpenLayers to do such work. It is interesting! Thank you again.

Best regards,

Xintao