OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2009-02-19 23:42:11

xintao
Member
Registered: 2009-02-19
Posts: 46

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_ … ersion_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

Offline

#2 2009-02-20 12:58:59

Richard
Member
From: Charlbury, UK
Registered: 2007-04-24
Posts: 366
Website

Re: where is the detailed OSM API and demo?

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.

Offline

#3 2009-02-20 23:23:37

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: where is the detailed OSM API and demo?

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

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.. :-)

Offline

#4 2009-02-22 14:14:28

xintao
Member
Registered: 2009-02-19
Posts: 46

Re: where is the detailed OSM API and demo?

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

Offline

Board footer

Powered by FluxBB