开发者

Train track route using Google Maps

I am wondering if i开发者_开发知识库t is possible to create a route on a map using a train track. I know its possible over normal roads.


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.


It's available in the following regions: Google Transit


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜