使用 Google 地图的火车轨道路线

发布于 2024-09-09 10:45:00 字数 47 浏览 2 评论 0原文

我想知道是否可以使用火车轨道在地图上创建一条路线。我知道在正常道路上这是可能的。

I am wondering if it is possible to create a route on a map using a train track. I know its possible over normal roads.

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

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

发布评论

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

评论(3

好倦 2024-09-16 10:45:00

这当然是可能的。 (从广义上讲,一切皆有可能):-)

您首先需要的是有关铁轨位置的数据。对于美国、加拿大和欧洲部分地区,这可以作为 shapefile 公开提供,例如:
http:// www.lib.unc.edu/reference/gis/datafinder/index.html?search_type=show_category_contents&datalayers=1&category_id=109

获得 shapefile 后,所有选项均已打开。您可以将线条转换为 google.maps.polyline() 对象(如果您使用的是 API V2,则为 GPolyline() 对象),并将其加载到地图上。这完全取决于您想要实现的目标以及您使用的服务器端语言。
获取铁路方向是完全不同的事情。 :-)

马塞洛。

It's certainly possible. (Broadly speaking, everything is possible) :-)

The first thing you'd need is data on the location of the railroad tracks. For the US, Canada and part of Europe this is publicly available as shapefiles, for example at:
http://www.lib.unc.edu/reference/gis/datafinder/index.html?search_type=show_category_contents&datalayers=1&category_id=109

Once you obtained the shapefiles all options are open. You can convert the lines to google.maps.polyline() objects, (or GPolyline() if you're using V2 of the API), and load them on a map. It will all depend on what you want to achieve and what server side languages you're using.
Getting rail directions is a completely different matter. :-)

Marcelo.

一向肩并 2024-09-16 10:45:00

它在以下地区可用:
Google 交通

It's available in the following regions:
Google Transit

相权↑美人 2024-09-16 10:45:00

iOS 4 引入了一些新功能,例如 MKOverlay,它可以将圆形、多边形叠加到地图视图上。您可以尝试在地图上绘图。

iOS 4 introduces some new features like MKOverlay which can overlay circles, polygons onto a mapview. You might try this for drawing on the map.

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