官术网_书友最值得收藏!

Introduction

This chapter shows us the basics and the important things that we need to know when we start creating our first web-mapping application with OpenLayers.

As we will see in this and the following chapters, OpenLayers is a big and complex framework, but at the same time, it is also very powerful and flexible.

Although we're now spoilt for choice when it comes to picking a JavaScript mapping library (as we are with most JavaScript libraries and frameworks), OpenLayers is a mature, fully-featured, and well-supported library.

In contrast to other libraries, such as Leaflet (http://leafletjs.com), which focuses on a smaller download size in order to provide only the most common functionality as standard, OpenLayers tries to implement all the required things that a developer could need to create a web Geographic Information System (GIS) application.

One aspect of OpenLayers 3 that immediately differentiates itself from OpenLayers 2, is that it's been built with the Google Closure library (https://developers.google.com/closure). Google Closure provides an extensive range of modular cross-browser JavaScript utility methods that OpenLayers 3 selectively includes.

OpenLayers 3 packs a smaller footprint than its predecessor and targets the latest HTML5 and CCS3 capabilities. The trade off, of course, is that legacy browsers will not be as fully featured (primarily, Internet Explorer lower than version 9). As the rate of modern browser adoption ever increases, this disadvantage will soon become a moot point.

The main concept in OpenLayers is, rightly, the map. It represents the view where information is rendered. The map can contain multiple layers, which can be raster or vector layers. Each layer has a data source that serves data with its own format: a .PNG image, a .KML file, and so on. In addition, the map can contain controls, which help interact with the map and its contents; these are pan, zoom, feature selection, and so on.

Let's get started with learning OpenLayers by examples.

主站蜘蛛池模板: 铜梁县| 元朗区| 巢湖市| 东安县| 安达市| 关岭| 黄石市| 德安县| 石屏县| 文化| 上蔡县| 辉南县| 克拉玛依市| 鄂温| 樟树市| 乌鲁木齐市| 奈曼旗| 静乐县| 义乌市| 沾化县| 襄樊市| 长垣县| 石台县| 浪卡子县| 浑源县| 遂昌县| 田林县| 梁山县| 佛山市| 烟台市| 铁力市| 南宫市| 康马县| 城口县| 巴林右旗| 平罗县| 台江县| 九江市| 合作市| 通城县| 阿尔山市|