路线经过点
我如何从 Google 地图获取包含经过多个点的路线的 kml 文件。现在我使用此链接 http://maps.google.com/maps?f=d&hl=en&saddr=51.591016,-0.107382&daddr=51.359619,-0.147695&ie=UTF8&0& om=0&output=kml
它可以工作,但只能用于两点。
How i can get kml file from Google Maps that contains route thru several points. Now i use this link http://maps.google.com/maps?f=d&hl=en&saddr=51.591016,-0.107382&daddr=51.359619,-0.147695&ie=UTF8&0&om=0&output=kml
It work, but only for two points.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您应该知道 Google 地图和 Google 地球在显示 kml 文件方面具有不同的功能。 Google 地球几乎没有任何限制,您可以将完整的 mxd 编写到带有图例和所有内容的 google 地球,但是 google 地图不具有几乎相同的功能。
在谷歌地图中,您被限制在一页上显示 200 kml 点,这是因为该应用程序是基于服务器并使用 javascript 创建的,出于性能目的,每页只能显示 200 kml 点。您可能会注意到其余的观点位于不同的页面上,遗憾的是您无法同时查看所有内容。你可以做的一件事是,为你的 kml 文件提供一个 url(如果你有 ftp 帐户或使用 google 我的页面,你可以轻松地做到这一点),然后只需将 url 输入到搜索框中,很快!您的所有点都会显示出来,只是您将无法指定路线或编辑任何属性,您只能保存到我的地图并共享点的显示(同样,人们将无法从点获取方向) )
将您的 KML 提供给 url 地址是一个很好的做法,它会节省您的时间,您也可以使用自己的符号系统,如果您在上传区域(而不是搜索框)输入 url 地址,您将能够保留您的符号系统,编辑属性并获取方向以及所有其他有趣的东西。但是,您将受到每页只能显示 200 个点的限制。
因此,如果您需要让用户从您的点搜索方向,您一次只能有 200 个点:(
在搜索框中输入网址,您的所有积分都会出现......但没有方向......
希望这有帮助。
供参考:
http://econym.org.uk/gmap/kml.htm
http://code.google.com/apis/kml/documentation/kmlelementsinmaps.html
First, you should know that Google Maps and Google earth have different capabilities for displaying kml files. Google Earth has almost no limitations, you can author full mxd's to google earth with legends and everything, google maps, however, does not have nearly the same capability.
In google maps you are restricted to displaying 200 kml points on one page, this is because this application is server based and created using javascript, for performance purposes, you are limited to only 200 kml points per page. You might notice that the rest of your points are on different pages, unfortunatly you cannot view them all at the same time. One thing that you can do, Is serve up a url to your kml file (you can do this easily if you have an ftp account or with google my pages), then just enter the url into the search box, presto! all of your points will show up, only, you will not be able to route directions or edit any attributes, you can merely save to my maps and share the display of the points (again people will not be able to get directions from the points)
Serving up your kml to a url address is good practise, it will save you time, also you can use your own symbology, if you enter the url address in the upload area (as opposed to the search box) you will be able to keep your symbology, edit the attributes and get directions and all of that other fun stuff. You will however have the limitation of only being able to display 200 points per page.
Thus if you need to be able to have the user search for directions from your points, you can only have 200 points at a time :(
enter the url in the search box and all of your points will appear......but no directions..
Hope this helps.
For Reference:
http://econym.org.uk/gmap/kml.htm
http://code.google.com/apis/kml/documentation/kmlelementsinmaps.html