Looking for a script for loading, drawing, and saving polygons to MySQL

1,072 views
Skip to first unread message

lawa

unread,
Nov 4, 2010, 1:28:28 PM11/4/10
to Google Maps JavaScript API v3
Hi all,

I'm totally new to the Google Maps API and I'm trying to locate
something that doesn't seem to exist: the ability to load, draw/edit,
and save polygons to a database.

GeometryControls did this - almost - for V2, but I'd rather not be
stuck in the past. I know that drawing, editing, and deleting polygons
is possible in V3 (I love the midpoint-editing style from
http://www.birdtheme.org/useful/v3tool.html and http://nettique.free.fr/gmap/toolbar.html
and would like to implement this style).

My questions are:
a. Is there any example code like this?
b. If so, what are the licenses? I could probably turn the second link
I posted into something useful, but I can't find a license file for
it.

If not, any tips? Probably something to do with saving the MVCArray to
a DB and running load() on initialize()? I want to load a page, show
all the polys that have been created, add, edit, or delete them, then
resave on a button press. I want the ability to name the polygons, and
will be integrating PHP to pass along the author and time created.

Thanks in advance - I'll be very appreciative for any samples or
examples you may find, especially with a liberal license.

John M Phillips

unread,
Nov 5, 2010, 6:15:09 PM11/5/10
to Google Maps JavaScript API v3
As far as I know, this will require the following steps:

1: the google map api to draw the map and overlay.

2: java script connecting to form elements to store the
coordinates.

3: submit the form data to the server

4: server script connects to mysql database to update
the data.

My suggestion is to start from the server end first, build
a classic cgi-bin script to allow manually entering the
data.

Next connect the javascript to the same form elements
and verify that you can update the local data. Then
connect it all together.

On Nov 4, 1:28 pm, lawa <sieg...@gmail.com> wrote:
> Hi all,
>
> I'm totally new to the Google Maps API and I'm trying to locate
> something that doesn't seem to exist: the ability to load, draw/edit,
> and save polygons to a database.
>
> GeometryControls did this - almost - for V2, but I'd rather not be
> stuck in the past. I know that drawing, editing, and deleting polygons
> is possible in V3 (I love the midpoint-editing style fromhttp://www.birdtheme.org/useful/v3tool.htmlandhttp://nettique.free.fr/gmap/toolbar.html
Reply all
Reply to author
Forward
0 new messages