fernandovega / Google-Maps-Point-in-Polygon

Adds a containsLatLng() method to Polygon class for Google Maps API v3

Home Page:http://www.timparkin.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a Javascript Google Maps v3 extension for the Polygon class to detect whether or not a point resides within it.

Simplest Usage:

var coordinate = new google.maps.LatLng(40, -90);                                                                                                                                                                                                       
var polygon = new google.maps.Polygon([], "#000000", 1, 1, "#336699", 0.3);
var isWithinPolygon = polygon.containsLatLng(coordinate);

About

Adds a containsLatLng() method to Polygon class for Google Maps API v3

http://www.timparkin.com