Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.enableDrawing()

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

like image 614
zjm1126 Avatar asked Dec 17 '22 01:12

zjm1126


2 Answers

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.

like image 65
RedBlueThing Avatar answered Jan 07 '23 23:01

RedBlueThing


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.

like image 39
Daniel Vassallo Avatar answered Jan 07 '23 23:01

Daniel Vassallo