Google Maps API v3 - 圈子部门 [英] Google Maps API v3 - circle sector
问题描述
我想在由点,半径,startAngle和stopAngle定义的地图上绘制圆的扇形。我发现了很多exmaples,但是多边形等等对我来说太复杂了。
I would like to draw sector of circle on map defined by point, radius, startAngle and stopAngle. I found lots of exmaples but with polygons etc whitch was too complicated for my case.
感谢您的帮助!
Thanks for any help!
推荐答案
Circle是没有定义边的对象。只有一个半径和一个中心点。
您需要使用多边形构建一个半圆,因为它是一个双亲对象
a Circle is an object with no defined sides. Only a radius and a center point. You are required to use a polygon to build a semi circle as it is a two sied object
并不总是一个简单的出路编码,并且典型地他们是做事的坏方法(除非你谈论诸如JQ / Bootstrap之类的东西)
There is not always an easy way out in coding, and typicaly they are the bad ways to do things (unless your talking about somthing like JQ/Bootstrap)
这是一个相当直观的forware实现
Here is a fairly stright forware implementation
http: //googlemaps.googlermania.com/google_maps_api_v3/en/draw-semi-circle.html
在此问题中提及
Google Maps Polygon错误呈现
他们甚至提供了一个工作的例子来撕开
http://maps.forum .nu / temp / gm_bearing.html
they even provide a working example for you to rip apart http://maps.forum.nu/temp/gm_bearing.html
这篇关于Google Maps API v3 - 圈子部门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!