开发者

what about google map api v2 and v3, which is better

开发者 https://www.devze.com 2022-12-24 15:39 出处:网络
I made a demo using v2, and now I want to use v3. But I found out that v3 has not as many methods as v2, e.g.:

I made a demo using v2, and now I want to use v3.

But I found out that v3 has not as many methods as v2, e.g.:

  1. map.enableGoogleBar();

  2. map.enableScrollWheelZoom();

  3. polyline.enableDr开发者_StackOverflow中文版awing()

So, is v3 powerful enough to replace v2 ???


N.B. Three years later there is obviously no reason not to use v3 of the API. Google Maps v2 is now deprecated.

Google Maps v3 is the next iteration of the API and my initial reaction would be to suggest that you use it. However, v3 is still a Google Labs product and is not as mature as the v2 API.

The initial focus for v3 was optimized performance and user experience on mobile platforms and ,as a result, some of the v2 features haven't made it into the v3 library (this gap is getting smaller). However, the performance improvements that have been made in v3 are equally applicable on the desktop, so you are faced with a performance/feature set trade off.

If there is a specific feature that is in v2 and not v3 and you aren't developing for a mobile device (and it sounds like you aren't), then you may want to use v2 and migrate to v3 once your feature is available.


In addition to Cannonade's answer, note that the scroll wheel feature can be enabled and disabled in v3, and even polygon editing is possible:

  • How to disable mouse scroll-wheel scaling with Google Maps API
  • Google Maps v3 Samples: Polygon Edit

I couldn't find any reference for the Google Bar however.

0

精彩评论

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