Is there any way to split circle in google maps in to the sectors by 120 degrees? Currently i draw a simple circle with radius, it looks like this:
map = new google.maps.Map(document.getElementById('map_canvas'), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
zoom: 16,
center: new google.maps.LatLng(55.685025, 21.118995)
});
var lat_lng = new google.maps.LatLng(55.685025, 21.118995);
marker = new google.maps.Marker({
position: lat_lng,
map: map,
icon: 'map_green.png'
});
circle = new google.maps.Circle({
map: map,
radius: 200,
fillColor: 'green',
center: lat_lng
});
Then i think i need to draw three polygons on top of the circle, but dont know how to calculate the position...
It should be like this:
Another way to do it, this one using the google.maps.geometry library, note the 'libraries=geometry' parameter in the google maps script src:
Example viewable here: http://jsfiddle.net/rkC2S/
One way to do it would be like this example
It is from before the geometry library was available so it does some of the functionality available there differently, but that could be changed.
example using the geometry library