OpenLayers 및 Google지도? [닫은]
Google지도를 몇 번 사용했지만 OpenLayers가 궁금 합니다.
코딩을 시작하기 전에 몇 가지 질문이 있습니다.
- Google지도 대신 OpenLayers를 사용하는 이유는 무엇입니까?
- 어쨌든 OSS 라이센스를 제외하고
- OpenLayers를 절대 사용하지 말 것을 권장하는 상황이 발생 했습니까?
- 스택 오버플로에서 "OpenLayers"에 대한 검색을 수행했습니다 . 많은 답변이 없습니다. 이 솔루션이 많이 사용되지 않는다는 의미입니까? 프로젝트의 장기적인 생존 가능성에 문제가 될 수 있습니까?
- 이미 OpenLayers를 사용한 적이있는 분들을 위해 : 일반적으로 발생할 수있는 함정 / 문제가 있습니까?
- 여러 곳에서 사용할 수있는지도가 있습니까, 아니면 많은지도가 없습니까?
- 즉, 저는 프랑스에 있으며 적어도 대도시에서 일하기 위해서는 신청서가 필요합니다 ... 괜찮습니까?
- 그렇지 않은 경우 OpenLayer의 레이어 및 시각화를 쉽게 찾아 통합 할 수 있습니까?
- 도로를 표시 할 API가 있습니까?
- 예를 들어, 단방향 도로 만 표시합니다.
- 그렇다면 어떻게 할 수 있습니까? 도로 정보가 포함 된 파일이 있어야하고지도에 직접 표시해야합니까?
- OpenLayers에 대한 좋은 자습서를 알고 있습니까?
나는 그것을 아직 시도하지 않았으며, 그것들은 단지 파란 질문에서 벗어났습니다 ...
이것들은 정말 좋은 질문입니다! 저는 전문적인 OpenLayers 개발자이자 팬이므로 이러한 관점에서 귀하의 질문을 해결해 드리겠습니다.
Google지도 대신 OpenLayers를 사용하는 이유는 무엇입니까?
- 융통성 : 귀하는 특정지도 제공 업체 또는 기술과 관련이 없습니다. 언제든지 변경할 수 있으며 전체 코드를 다시 작성할 필요는 없습니다. Google, Yahoo, Microsoft, WMS, ArcGIS Server, MapServer 등이 모두 기본적으로 지원됩니다.
- 벡터 지원 : 점, 폴리 라인 및 다각형을 더 잘 지원합니다.
- 제어 : 필요한 새로운 기능을 추가 할 수 있습니다. 필자는 개인적으로 OpenLayers 용 플러그인 3 개를 작성했으며 그 중 2 개는 소스의 일부일 것입니다.
- 디버깅 : 소스 코드를 단계별로 볼 수있을 때 훨씬 쉽게 디버깅 할 수 있습니다!
나는 프로젝트의 장기적인 생존 가능성에 대해 전혀 걱정하지 않을 것입니다. 최고의 오픈 소스 클라이언트 측 매핑 라이브러리입니다.
발생할 수있는 일반적인 함정 / 문제가 있습니까?
- 내가 겪었던 가장 큰 함정은 Web Mercator (Google) 프로젝션과 협력하는 것입니다. Google, Yahoo 및 Microsoft 기본 맵을 사용하여 WGS 84 와 같이 일반적이고 실제 투영되는 벡터 데이터를 OpenLayers 맵 에 표시하기가 어려울 수 있습니다 . 예는 당신의 친구입니다.
자바 스크립트 프레임 워크 호환성
- 나는 모든 작업에 jQuery 프레임 워크를 사용하며 OpenLayers 다음에 jQuery를 참조하는 것이 유일한 문제입니다. 그 외에는 원활한 항해였습니다.
- 성능이 훌륭합니다! 유일한 문제는 맵 서버에 있거나 너무 많은 벡터를 맵에 추가하는 것입니다.
여러 곳에서 사용할 수있는지도가 있습니까?
- 내가 말했듯이 전 세계 어디에서나 거의 모든 소스에서베이스 맵을 사용할 수 있습니다.
도로를 표시 할 API가 있습니까?
- CloudMade를 확인하겠습니다! 는 OpenStreetMap 프로젝트를 맵 타일 서비스로 변환하고 사용자 정의 스타일을 허용합니다. 나는 당신이 (예를 들어) 일방 통행로를 특정 방식으로 스타일링 할 수 있다고 생각합니다. CloudMade 개발자 영역 .
OpenLayers에 대한 좋은 자습서를 알고 있습니까?
- 튜토리얼을 모르지만 OpenLayers 예제에는 많은 예제가 있습니다.
이것이 유용하기를 바랍니다. 그리고 질문이 있으시면 Stack Overflow를 사용하고 있습니다!
반드시 OpenLayers 또는 Google Maps의 문제는 아닙니다. OpenLayers에서지도 배경으로 Google지도를 사용할 수 있습니다. 좀 더 구체적인 답변 :
왜 OpenLayers인가?
- OpenLayers는 서로 다른 소스 (Google지도 배경, WMS 오버레이, KML 또는 GML 파일의 벡터 데이터 또는 WFS 등)의지도를 결합 할 수 있습니다.
- Google지도보다 OpenLayers 스타일을 훨씬 더 많이 지정할 수 있습니다
- 오픈 소스, 디버깅 할 때 소스 코드를 확인할 수 있습니다
- 지도에서 높은 정밀도가 필요한 경우 Google지도보다는 적합한지도 서버 백엔드와 함께 OpenLayers를 사용하여 더 나은지도 투영을 얻으십시오 (Google지도는 지구가 완벽한 구라고 가정합니다)
함정
- 크로스 사이트 스크립팅 제한으로 인해 다른 서버에서 벡터 (WFS) 데이터를 사용하려면 프록시가 필요합니다
공연
- 지도 백엔드의 속도에 주로 의존
- 많은 벡터 기능을 표시하려면 (제한은 브라우저에 따라 다르지만 한 번에 200 이상이라고 함) 시간이 걸리지 만 OpenLayers의 문제보다 브라우저가 더 중요합니다.
자바 스크립트 프레임 워크
- 예를 들어 ExtJS + OpenLayers 인 GeoExt를 살펴보십시오.
사용 가능한지도
- OpenLayers에는 맵 백엔드가 제공되지 않습니다. Google Maps, Yahoo Maps, MS Virtual Earth 등을 사용하거나 WMS 및 WFS 서비스를 사용할 수 있습니다.
I haven't seen much of a presence from OpenLayers users on SO but they're out there. The OpenLayers mailing lists are pretty active (I'm on Users and Dev and see anywhere from 50-100 emails a day discussing various things. You can search the lists from those links too.).
I can't answer all your questions but one thing I'll put out there is that OpenLayers and google maps aren't mutually exclusive. OpenLayers is a javascript library and you can use it to interact with google maps. Check out this example: OpenLayers using google maps. And here's the main OpenLayers examples page.
One point that hasn't been fully made here is that using OpenLayers avoids various restrictions Google places on the terms of service for its map APIs, including:
You can't legally use a Google map solely in a section of your site that requires payment to access, or for a private site that the public can't sign up for (e.g. a corporate intranet). (IANAL, but see Terms of Service, 9.1 and the FAQ)
You can't legally (or practically) use the Google API for offline applications (i.e. where the tiles are served from your own machine). Even if there weren't legal restrictions, Google makes this technically very difficult, while OpenLayers makes it easy.
Google reserves the right to shut down access to the API if you're showing a map with content it finds objectionable. The example given in the FAQ is a map of illegal drugs, which gives a good sense of the gray areas this restriction might cover.
See this FAQ and the Terms of Service for more details.
All that said, as a long-time Google Maps developer who recently started using OpenLayers, I feel that Google Maps has better documentation, a larger user community, and a clearer and more stable API than OpenLayers. So you have to make a trade-off somewhere.
It really depends on what you want to use the map for. To simply plot points on a map, Google Maps will be fine. The map layers for Google Maps are also quite detailed. OpenLayers on the other hand offers far more functionality and is very extensible.
OpenLayers have lots of examples to get you started.
As for maps, OpenLayers is only an API so you need to supply it will map layers. The Google Maps API will be limited to the map layers supplied by google. With OpenLayer you can display pretty much any publicly available map service (WMS, WFS, TMS, WMS-C). A very good example is openstreetmap.org - (global streets map collected by the community). OSM can be added to openlayers as a TMS layer. Check out this example for instructions.
Some clients may refuse, or have strong reservations, about using Google Maps. They may have valid concerns that Google may introduce advertising or change the API without notice. However Google Maps does have the benefit of integrating with other Google services (placemarks, adding photos, geocoding services). As its the web you can always combine many different mapping services and APIs.
I agree with all answers, but there is one very important point that nobody mentions. OpenLayers and Google Maps have different targets.
OpenLayer is an excellent framework to display geodata, but Google Maps is a pool of services that include a framework to display geodata among other services.
So, Google Maps expose a lot services and features that OpenLayes do not have. Some examples of Google Maps features and services are region localization, sensor detection (for device with GPS) and user localization, geocoding and reverse geocoding, street view, etc.
I have used both APIs. I make a software for corporations and this software requires mapping but not all clients have a GoogleMaps license, so I need to support both types of maps.
I have made a common API for abstracting the differences between them and let me tell you, some stuff is easier to do in one than the other. Like limiting the bounds of where you can pan the map to, it is a lot easier to do in OpenLayers, but heatmaps are easier to use on GoogleMaps (it is officially supported by google, unlike the available OpenLayers plugins).
OpenLayers support offline maps. Some of my users are in private intranets without internet connection.
GoogleMaps has two absolutely must have plugins, MarkCluster and Spiderfier that makes possible visualizing a huge numbers of markers.
GoogleMaps InfoWindows are easier to use and have better usability than the OpenLayers.Popups. These are the little windows that can open when you click in a marker. Googlemaps InfoWindows are also a lot more pretty by default, you have to do some CSS wizardry with the Popups.
GoogleMaps has streetview which is useful sometimes.
GoogleMaps has more features that you might need. Although many features are present in OpenLayers too, but not officially supported.
Usually in the end you should go with OpenLayers because of the reduced headache you might get from licensing and bandwith usage from googlemaps. Both handle basic mapping (ie, displaying markers on top of a map) very well. Unless you can find a specific feature you need from one that is not present on the other you should go for OpenLayers. See this for more information about googlemaps billing and when you can use it for free.
Also GoogleMaps has its basic geolocation type as 'LatLng' and Openlayers use 'LonLat' which drives me freaking nuts because I keep mistaking the order of the parameters in function calls.
In addition to those who mentioned speed problems, I would like to add that IE's VML renderer can get really slow with a vector layer with many features. One user mentioned about 200. That's about exactly what I can add before IE slows down considerable to the point of freezing. If you add features that are text labels, you can add half less, probably because internally each text label consists of two VML elements.
In Google you may create a custom GOverlay whose content is a "div", which gets rendered without problems in IE.
A couple of things I would add, from two perspectives: client usage and data derving.
Client usage:
- What are you clients used to using currently? Change can be difficult.
- How much functionality do you really need? OpenLayers has quite a bit, but if you are not using it...
Data serving:
Are you serving KML data? If so, both OpenLayers and Google Maps will work with it, and you are probably going to have to decide based upon client usage.
Are you serving other types of data services? (WMS, WFS, CSV, etc.) If so, then OpenLayers very likely has examples and support for it.
OL has a large fanbase and is perhaps the most used Opensource geothing used in the world.
You dont see that many threads and posts about it in this cyberplace because people here tend to discuss other kind of techs, like JSF and Mobile (non geo), not because OL is like struts.
However Ol has some drawbacks, mainly that it's so low level that you have to write lots of code to do common ops. That can work in the good way too, because as a developer a: you have all the code upfront and b: tweaking and customizing is very easy.
There are more sophisticated free geotools, but all they do is call openlayers and abstract some of the more boring chores.
So use it confidently. It's mature, robust and it's not going to die in the foreseable future. However if you want to speed up your developing process you should try the other tools that mount in top of it.
have a nice day
참고URL : https://stackoverflow.com/questions/1237187/openlayers-vs-google-maps
'IT' 카테고리의 다른 글
Chrome에서 탭이 비활성 상태 일 때 setInterval도 작동하게하려면 어떻게해야하나요? (0) | 2020.05.26 |
---|---|
mongodb에서 여러 배열 요소를 업데이트하는 방법 (0) | 2020.05.26 |
JQuery Selector에서 DOM 요소를 얻는 방법 (0) | 2020.05.26 |
자바 스크립트가 자바 스크립트와 관련이없는 이유는 무엇입니까? (0) | 2020.05.26 |
왜 진술 (j ++)인가? (0) | 2020.05.26 |