升级到 Google 地图版本 3,还是转到 OpenLayers?
我管理一些学术网络地图软件的开发,用于创作地理数据集。这是一个用于创建历史地图的相当简单的界面。该项目基于 Google 地图 v.2,由于 v.2 将于 2013 年停产,因此我们认为应该尽早升级到 v.3。
事实证明,这是一项艰巨的工作,需要完全重新思考应用程序的地图部分如何工作。我们必须重写所有自定义 Gmap 控件,重构应用程序的多个部分,以及其他一些重大更改 - 例如,v.3 不像 v.2 那样与 Google Earth 集成,而我们使用 Google Earth很多。正因为如此,并且因为我们开始使用 Gmap 本身不支持的更多功能(例如 WMS 地图),我一直在想是否值得从 Gmap 切换到 OpenLayers。据我了解,OpenLayers 具有 Google 地图的所有功能,对 WMS 具有本机支持并支持更多数据格式,让我们可以使用所有 Google 图像,并且可以与 KML 配合使用。
我向社区提出的问题是针对了解 OpenLayers 和 Google 地图的人:您能否告诉我从 Gmap v.2 升级到 v.3 的工作量与从 Gmap v.2 到 OpenLayers 的完整移植相比如何?我们还应该注意哪些其他缺点?
我们最关心的问题之一:我们经常使用 Google 地球。如果我们使用 OpenLayers,我们就必须自己同步 Earth 和 OpenLayers,但听起来这也是我们在 Gmap v.3 中必须做的事情。据我所知,OpenLayers 没有对 Google Earth 或任何类型的 3D 地理浏览器的本机支持,但有一些项目(例如 this) 试图弥补这一差距。这该是多么令人头疼的事情啊?
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 Earth 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
非常有趣的问题!
升级到较新版本的 Google 地图应该会更省时,因为您已经有了工作代码,即使您必须进行重大更改,您也应该能够重用代码库的某些部分。这只是我的猜测,因为如果不看代码就很难更精确:)
您仍然应该看看 OpenLayers。您提到您已经需要 WMS 支持,并且可能还有更多 OpenLayers 支持而 Google 地图不支持的功能。 OpenLayers 支持多种数据源,是开放的并遵循 OGC 标准。它支持 Google 地图,如果您有一天决定更改为 Bing、Yahoo 或您自己的地图,您只需要对代码进行微小的更改。
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.
我也有同样的情况。我研究了 openlayers 并开始实现 openlayers 中的一些功能。我能够用 openlayers 中的几行代码替换大量的 google 地图 api 代码。所以我继续前进,很快我就在 openlayers 中进行了重新开发,并将所需的 javascript 减少了一半以上!我还可以做更多的事情!从各种格式导出、导入现在只是代码行而不是人行。一路开放图层!
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!