开发者

Upgrade to Google Maps version 3, or go to OpenLayers?

I manage the development of some academic web mapping software for authoring collections of geographic data. It's a fairly simple interface for creating historic maps. The project is based on Google Maps v.2, and because v.2 is going to be discontinued in 2013, we thought we'd bite the bullet early and upgrade to v.3.

It turns out that's a big job that requires completely rethinking how the map part of our application works. We have to rewrite all our custom Gmap controls, restructure several parts of the application, and a few other big changes--for example, v.3 doesn't integrate with Google Earth as well as v.2, and we use Google Ea开发者_如何学编程rth a lot. Because of this, and because we're starting to use more features that Gmap doesn't support natively (like WMS maps), I've been wondering if it might be worth switching from Gmap to OpenLayers. From what I understand, OpenLayers has all the features of Google Maps, has native support for WMS and supports many more data formats, lets us use all the Google imagery anyway, and works with KML.

My question to the community is for people who know OpenLayers and Google Maps: can you give me an idea of how the workload for upgrading from Gmap v.2 to v.3 compares to a complete port from Gmap v.2 to OpenLayers? And what other downsides should we be aware of?

One of our biggest concerns: we use Google Earth a lot. If we went to OpenLayers, we'd have to synchronize Earth and OpenLayers ourselves, but it sounds like that's what we'd have to do in Gmap v.3 as well. From what I've read, OpenLayers doesn't have native support for Google Earth or any kind of 3D geobrowser, but there are some projects (like this) that try to bridge the gap. How much of a headache would this be?


Very interesting question!

Upgrade to newer version of Google Maps should be less time consuming because you already have working code and even though you make will have to make big changes you should be able to reuse some parts of the codebase. That's only my guess, because it's hard to be more precise without seeing the code :)

You should still take a look at OpenLayers. You mentioned that you already need WMS support and probably there are more features out there that OpenLayers supports and Google Maps doesn't. OpenLayers supports a wide variety of datasources, is open and follows OGC standards. It has support for Google Maps, and if you one day decide to change to Bing, Yahoo or your own maps you will only need to make minor changes to your code.


I was in the same situation. I took a look at openlayers and started implementing some of the functionality in openlayers. I was able to replace SOOOOO much google maps api code with just a few lines in openlayers. So i kept going, in no time i had re-developed in openlayers and cut down the javascript required to do so by more than half! I am also able to do much more! exporting, importing from all sorts of formats is now just lines of code rather than man lines. OpenLayers all the way!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜