最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Upgrading to v3 from v2 of google maps API, suggestions - Stack Overflow

programmeradmin3浏览0评论

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 click). The implementation has very poor design which is causing some problem, So now I need to revamp the core implementation to better design. I was thinking of upgrading to version 3 of google maps API. Please suggest, if that's a good thing to do and my all features will be running fine(or I will get replacement for all the features mentioned) in less time. Or should I stick to the version 2 of the google maps API?

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 click). The implementation has very poor design which is causing some problem, So now I need to revamp the core implementation to better design. I was thinking of upgrading to version 3 of google maps API. Please suggest, if that's a good thing to do and my all features will be running fine(or I will get replacement for all the features mentioned) in less time. Or should I stick to the version 2 of the google maps API?

Share Improve this question edited Dec 26, 2012 at 15:53 Vishwanath asked Oct 1, 2010 at 12:09 VishwanathVishwanath 6,0046 gold badges40 silver badges57 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

I remend 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)

  1. 暂无评论