开发者

using openstreet maps with marker and polylines with javascript

Guys i am complete newbie in using openstreetmaps .i know how to use google and bing maps api. my requirement is to create a sample map with just some markers to locate and draw poly lines between them.开发者_如何学编程i have read the api but couldnt find it how to use.this is used in a commercial application.i need pointers and sample code.please help me out.


take a look at either openlayers (what OSM use on their pages):

http://dev.openlayers.org/releases/OpenLayers-2.10/examples/

Or Cloudmades new http://leaflet.cloudmade.com/ api

both of these can show open street map data


I have done this. you can do it very easily with openstreetmap.org , Use this following API http://leaflet.cloudmade.com/index.html


i recommend that you use a pre-rendered KML input file. this example shows you how to do that on OSM:

http://maps.burningsilicon.net

place a link to your KML file on the bottom textbox.

you might want to check out PHP KML parser examples, if you want to create files on the fly from a MySQL database (or from a csv-style textfile).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜