- Mastering OpenLayers 3
- Gábor Farkas
- 265字
- 2021-07-16 09:33:47
Before getting started
Take a look at the code provided with the book. You should see a js
folder in which the required libraries are stored. For the first few chapters, ol.js
, and ol.css
in the ol3-3.11.0
folder will be sufficient. The code is also available on GitHub. You can download a copy from the following URL: https://github.com/GaborFarkas/mastering_openlayers3/releases. Take a look at the following screenshot:

Note
You can download the latest release of OpenLayers 3 from its GitHub repository at https://github.com/openlayers/ol3/releases. For now, grabbing the distribution version (v3.11.0-dist.zip
) should be enough.
Creating a working environment
There is a security restriction in front end development, called Cross Origin Resource Sharing (CORS). By default, this restriction prevents the application from grabbing content from a different domain. On top of that, some browsers disallow reaching content from the hard drive when a web page is opened from the file system. To prevent this behavior, please make sure you possess one of the following:
- A running web server (highly recommended)
- Firefox web browser with
security.fileuri.strict_origin_policy
set tofalse
(you can reach flags in Firefox by openingabout:config
from the address bar) - Google Chrome web browser started with the
--disable-web-security
parameter (make sure you have closed every other instance of Chrome before disabling security) - Safari web browser with Disable Local File Restrictions (in the Develop menu, which can be enabled in the Advanced tab of Preferences)
Tip
You can easily create a web server if you have Python 2 with SimpleHTTPServer
, or if you have Python 3 with http.server
. For basic tutorials, you can consult the appropriate Python documentation pages.
- Boost.Asio C++ Network Programming(Second Edition)
- 大話PLC(輕松動(dòng)漫版)
- ExtGWT Rich Internet Application Cookbook
- Docker and Kubernetes for Java Developers
- 數(shù)據(jù)庫(kù)原理及應(yīng)用(Access版)第3版
- 體驗(yàn)設(shè)計(jì)原理:行為、情感和細(xì)節(jié)
- Visual Basic程序設(shè)計(jì)教程
- QGIS By Example
- 深入理解Elasticsearch(原書第3版)
- Keras深度學(xué)習(xí)實(shí)戰(zhàn)
- 西門子S7-200 SMART PLC編程從入門到實(shí)踐
- Android開發(fā)三劍客:UML、模式與測(cè)試
- OpenCV with Python By Example
- GameMaker Essentials
- Qt 4開發(fā)實(shí)踐