admin管理员组文章数量:1379425
I'm a total newbie to the Google Maps API and I want to develop a game that will use streets on google maps as the paths. I know pretty well what I need, but I don't even know what to begin searching for in the API docs...
How can I get something like a graph representation for the streets in a city or other portion of a google map - something like vertices for intersection and street names for edges (or anything that I can convert to something like this), with the vertices mapped to (lat, long) coordinate points ...or even the Polyline objects for the streets so I can extract what I want from them? (the route finding algorithm surely has access to a data structure like this, so it's in there somewhere, but how do I get at it through the API?)
If anyone has tried to write something like a custom route finding app based on Google Maps, he probably went through the step of getting this king of data out of the API, so please share the solution to this if you've already figured it out...
I'm a total newbie to the Google Maps API and I want to develop a game that will use streets on google maps as the paths. I know pretty well what I need, but I don't even know what to begin searching for in the API docs...
How can I get something like a graph representation for the streets in a city or other portion of a google map - something like vertices for intersection and street names for edges (or anything that I can convert to something like this), with the vertices mapped to (lat, long) coordinate points ...or even the Polyline objects for the streets so I can extract what I want from them? (the route finding algorithm surely has access to a data structure like this, so it's in there somewhere, but how do I get at it through the API?)
If anyone has tried to write something like a custom route finding app based on Google Maps, he probably went through the step of getting this king of data out of the API, so please share the solution to this if you've already figured it out...
Share Improve this question asked Nov 22, 2012 at 14:26 NeuronQNeuronQ 8,23510 gold badges47 silver badges63 bronze badges1 Answer
Reset to default 6Street data is not available through the API except as it appears in the output of the directions service. To get the bulk data you seem to be asking about for your use, you will need to find another source, depending on country, it may be freely available; or you might be able to get what you need from OpenStreetMaps.
本文标签: javascriptGet street graph for a game using Google Maps APIStack Overflow
版权声明:本文标题:javascript - Get street graph for a game using Google Maps API - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744498423a2609173.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论