Upgrading to v3 from v2 of google maps API, suggestions

前端 未结 1 777
野性不改
野性不改 2021-01-03 09:18

I have full fledged integration of google maps version 2 in my web application, with features like get directions, cluster markers, tabbed info window, context menu(right cl

相关标签:
1条回答
  • 2021-01-03 10:09

    I recommend you upgrade to v3. I upgraded my site a few months ago (and blogged about the experience). A few things to keep in mind:

    • No more API key.
    • The marker and info window API has changed, for the better.
    • No more AJAX helper stuff. If you are using GXMLHttp, you will need to swap over to a new AJAX wrapper (Jquery, mootools etc).
    • Check your lat/lngs are in the right order. GPoint takes x and y (longitude and latitude). v3 has a latlng object, so your params might be backwards.
    • Styled maps - You will be able to customize your color scheme in v3.
    • Don't think you can turn on the Google earth plugin in a single line of code like you could in v2 (not 100% on this, so please correct me if I am wrong).

    Once you are done, you will be happy to make the change. Pages load faster, zooming is smoother (polyines scale as you zoom instead of disappearing) and the mobile experience is much better.

    0 讨论(0)
提交回复
热议问题