开发者

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜