Google地图和很多路径点(长折线) [英] Google Maps and a lot of path points (long polyline)

查看:121
本文介绍了Google地图和很多路径点(长折线)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将Google的静态地图服务集成到我的C#应用​​程序中。它应该在地图上绘制自定义路线。例如:

http://maps.google.com/maps/api/staticmap?size = 512x512& path = color:0x0000ff |重量:5 | 40.737102,-73.990318 | 40.749825,-73.987963& sensor = false



这适用于几个路径点< 75),但是如果路由足够长,那么URI超过了2048个字符的限制,并且我收到了一条414错误消息。

是否有可能绕过这个问题,或许与一个POST?



谢谢! 一个web服务,您可以将点保存在您的web服务器上托管的KML文件中,然后将其传递到谷歌地图 http://code.google.com/apis/kml/documentation/whatiskml.html


I try to integrate Google's static Maps service in my C# application. It should plot a custom route on a map. For example:

http://maps.google.com/maps/api/staticmap?size=512x512&path=color:0x0000ff|weight:5|40.737102,-73.990318|40.749825,-73.987963&sensor=false

This works well for a few path points (~ <75) but if the route is long enough the URI exceeds the 2048 characters limit and I get a 414 error message.

Is it possible to bypass this problem, perhaps with a POST?

Thank you!

解决方案

if you have a web serve you can save the points in a KML file hosted on your webserver then pass it along to google Maps http://code.google.com/apis/kml/documentation/whatiskml.html

这篇关于Google地图和很多路径点(长折线)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆