Google Maps API v3 - Round Sector

I would like to draw a sector of a circle on a map defined by a point, radius, startAngle and stopAngle. I found many examples, but with polygons, etc., which was too difficult for my business.

Thanks for any help!

-2
source share
1 answer

a Circle - an object that does not have certain sides. Only radius and center point. You must use a polygon to create a semicircle, as this is a dual-core object.

There is not always a simple way out in coding, and usually these are bad ways of doing things (unless you are talking about something like JQ / Bootstrap)

Here is a pretty realistic software implementation

http://googlemaps.googlermania.com/google_maps_api_v3/en/draw-semi-circle.html

This has been pointed out in this question. Google Maps polygon display incorrect.

they even provide a working example for breaking http://maps.forum.nu/temp/gm_bearing.html

0
source

Source: https://habr.com/ru/post/972835/


All Articles