是否可以在Google静态地图上绘制圆圈? [英] Is it possible to draw a circle on a Google static map?
本文介绍了是否可以在Google静态地图上绘制圆圈?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
静态地图API讨论路径,但没有提及圆圈。这可能吗?
谢谢
The static map API discusses paths, but no mention of circles. Is this possible? Thanks
推荐答案
您可以使用编码折线算法来产生足够的点以获得大致圆形的路径。确实存在编码问题:您需要获取圆圈的中心和半径,将其转化为一系列经纬度,然后使用算法进行编码。
What you could do is use the encoded polyline algorithm to produce enough points to get a roughly circular path. There's definitely coding involved: you'd need to get the center and radius of your circle, turn that into a series of lat/longs, then encode using the algorithm.
或者,您可以使用透明的gif图片作为标记并将其放入地图中。
As an alternative, you might be able to use a transparent gif image as a marker and put that in your map.
这篇关于是否可以在Google静态地图上绘制圆圈?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文