Undocumented editable Polygon/Polyline support

520 views
Skip to first unread message

Tom Payne

unread,
Nov 11, 2011, 11:39:32 AM11/11/11
to google-map...@googlegroups.com
Hi,

Google Maps API v2 supported editable polygons and polylines.

Google Maps API v3 does not support this, however, the feature seems
to exist but is undocumented.

If you create a polygon or polyline and call .set('editable', true)
you get an editable feature and can listen for MVCArray array events
on the feature's path.

Is this feature likely to make it into the "official" Google Maps API
v3? Could it be removed soon?

The reason is that I need *exactly* this feature for an application,
and I'd rather avoid writing my own editable polyline/polygon code if
I can rely on Google Maps API v3 implementation.

Many thanks,
Tom

Stephen

unread,
Nov 14, 2011, 12:25:33 PM11/14/11
to google-map...@googlegroups.com

Tom Payne

unread,
Nov 15, 2011, 5:18:50 AM11/15/11
to google-map...@googlegroups.com
Many thanks Stephen.

Regards,
Tom

> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-maps-js-api-v3/-/WQ88126P0bUJ.
> To post to this group, send email to google-map...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-js-a...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>

Gary Little

unread,
Nov 15, 2011, 12:27:27 PM11/15/11
to Google Maps JavaScript API v3
I've figured out how to make the custom area polygons editable on my
interactive real estate map.... and it works great! The key is to add
listeners for the insert_at, remove_at, and set_at events of the path
of the polygon. That's where you would save the new vertices of the
polygon.

Gary

On Nov 15, 2:18 am, Tom Payne <t...@tompayne.org> wrote:
> Many thanks Stephen.
>
> Regards,
> Tom
>
> On 14 November 2011 18:25, Stephen <slubow...@gmail.com> wrote:
>
>
>
> > Its on its way in. Looks like the API was finally updated in V 3.7 (
> >http://code.google.com/p/gmaps-api-issues/wiki/JavascriptMapsAPIv3Cha...) but
> > they haven't yet updated the documentation
> > See http://code.google.com/p/gmaps-api-issues/issues/detail?id=2432&can=1...

Gary Little

unread,
Nov 15, 2011, 7:09:03 PM11/15/11
to Google Maps JavaScript API v3
See http://googlegeodevelopers.blogspot.com/2011/11/make-your-map-interactive-with-shape.html

On Nov 15, 9:27 am, Gary Little <g...@luxcentral.com> wrote:
> I've figured out how to make the custom area polygons editable on my
> interactive real estate map.... and it works great! The key is to add
> listeners for the insert_at, remove_at, and set_at events of the path
> of the polygon. That's where you would save the new vertices of the
> polygon.
>
> Gary
>
> On Nov 15, 2:18 am, Tom Payne <t...@tompayne.org> wrote:
>
>
>
> > Many thanks Stephen.
>
> > Regards,
> > Tom
>
> > On 14 November 2011 18:25, Stephen <slubow...@gmail.com> wrote:
>
> > > Its on its way in. Looks like the API was finally updated in V 3.7 (
> > >http://code.google.com/p/gmaps-api-issues/wiki/JavascriptMapsAPIv3Cha...but

Joseph Elfelt

unread,
Nov 15, 2011, 8:50:30 PM11/15/11
to Google Maps JavaScript API v3
Thanks for the 'head's up' Larry.
Lots to learn.

Chris Broadfoot

unread,
Nov 15, 2011, 9:34:10 PM11/15/11
to google-map...@googlegroups.com
Thanks all. We announced this new feature ("Drawing Tools") at Google Developer Day in Sydney.

See the blog post for some details:

And see the docs here:

Cheers
On Wed, Nov 16, 2011 at 12:50 PM, Joseph Elfelt <joseph...@gmail.com> wrote:
Thanks for the 'head's up' Larry.
Lots to learn.
--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.

Joseph Elfelt

unread,
Nov 15, 2011, 10:21:32 PM11/15/11
to Google Maps JavaScript API v3
I meant thanks Gary! Sorry!
Reply all
Reply to author
Forward
0 new messages