使用带标记的 openstreet 地图和带 javascript 的折线

发布于 2024-11-14 09:49:12 字数 153 浏览 4 评论 0原文

伙计们,我是使用 openstreetmaps 的新手。我知道如何使用 google 和 bing 地图 api。 我的要求是创建一个示例地图,其中仅包含一些标记来在它们之间定位和绘制多边形线。我已阅读 API,但找不到它如何使用。这是在商业应用程序中使用的。我需要指针和示例代码。请帮帮我。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

北城挽邺 2024-11-21 09:49:12

查看任一 openlayers(OSM 在其页面上使用的内容):

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

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

这两个都可以显示开放的街道地图数据

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

半衬遮猫 2024-11-21 09:49:12

我已经做到了。您可以使用 openstreetmap.org 轻松完成此操作,使用以下 API
http://leaflet.cloudmade.com/index.html

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

七禾 2024-11-21 09:49:12

我建议您使用预渲染的 KML 输入文件。此示例向您展示如何在 OSM 上执行此操作:

http://maps.burningsilicon.net

放置一个指向您的底部文本框上的 KML 文件。

如果您想从 MySQL 数据库(或 csv 样式文本文件)动态创建文件,您可能需要查看 PHP KML 解析器示例。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文