angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Polygon contains point

Open MauritzKruger opened this issue 12 years ago • 4 comments

Hi guys

I would like to know if you can by any chance add the functionality in controller to determine if point is inside the newly created polygon. Example code by other developer: http://www.counsellingbyabhi.com/2013/01/google-map-check-whether-point-latlong.html

MauritzKruger avatar Aug 20 '14 13:08 MauritzKruger

I need this functionality too.

sefsinalas avatar Nov 03 '15 14:11 sefsinalas

This is pretty easy to implement yourself as long as you get the reference of the real poly.

nmccready avatar Nov 03 '15 15:11 nmccready

I don't understand. Can you help me to understand? This is what i have: http://plnkr.co/edit/qaN9Ui5sBbZMQmC7vKeL?p=preview

sefsinalas avatar Nov 03 '15 16:11 sefsinalas

See https://developers.google.com/maps/documentation/javascript/3.exp/reference#LatLngBounds , method contains . Are you using polygons or polygon. I suggest polygons as getting the gObjects is already supported by control.getPlurals . You need to read the docs and search through examples. If someone else wants to go into more detail by all means do it.

nmccready avatar Nov 03 '15 16:11 nmccready