jdavis
jdavis

Reputation: 8655

Google Maps Javascript API v3 - How to perform some of the more advanced functions

I am trying to create functionality like can be found in this example...

http://googlemapsapi.blogspot.com/2008/05/love-my-maps-use-its-line-and-shape.html

Where the user of the page can draw a polygon on the map by clicking to create the points in the polygon. It seems like all the examples I'm finding of this functionality are in v2 of the API and whenever I try to mimic such functionality using v3 I get a bunch of errors saying objects don't exist and so on. Is it possible to create this same functionality using v3 of the framework? Or will I have to use v2 of the framework.

Thanks

Upvotes: 1

Views: 223

Answers (1)

Niklas Wulff
Niklas Wulff

Reputation: 3524

There was a lot of namespaces and object names that changed from v2 to v3, so you won't be able to use the code as it is. But it's not only a name change that is required, the functions have changed slightly as well. I'm pretty sure you won't be forced to use v2 to draw lines, although it will take some effort to copy the functionality to a v3 app.

Upvotes: 1

Related Questions