user1759484 user1759484 - 29 days ago 8
Javascript Question

Save google map polygon into MySQL


Possible Duplicate:

Google Maps Save Polygon and points in MySQL using PHP




In my project i have to provide the client(food company) with a google map on which it will define its custom local areas by drawing polygon on google map. I have done up to this.

What i want is to know how to save this polygon so that i can determine whether a customer(whose latlong is known) is within tat area or not.Im using google map api 3.

Answer Source

There is no method provided by Google to save a polygon to MySql. If you have the polygon displayed on the map, iterate through the vertices of the polygon and send them to your server for storage in MySql.

Here is an example, outputs the modified polygons as JSON or KML, modified from this project