Cover
Copyright
Credits
About the Author
About the Reviewer
www.PacktPub.com
Table of Contents
Preface
Chapter 1: Creating Simple Maps with OpenLayers 3
Before getting started
Creating a working environment
Structure of OpenLayers 3
Building the layout
Creating the appeal
Writing the code
Using the API documentation
Understanding type definitions
Debugging the code
Summary
Chapter 2: Applying Custom Styles
Before getting started
Basic considerations
Customizing the default appearance
Identifying the classes
Styling the controls
Customizing the attribution control
Creating a custom zoom control with CSS
Styling vector layers
Customizing the appearance with JavaScript
Changing the overview map and the scale bar
Truncating the coordinate control
Changing the attribution
Creating a WebGIS client layout
Building the HTML
Styling the layout
Writing the code
Summary
Chapter 3: Working with Layers
Before getting started
Using a proxy
Resources to use
Basic considerations
Building a layer tree
Styling the layer tree
Creating a layer tree constructor
Adding layers dynamically
Creating the interface
Extending the constructor
Fetching the WMS metadata
Adding WMS layers
Adding WFS layers
WFS considerations
Adding vector layers with the File API
Creating the interface
Building the method
Adding vector layers with a library
Removing layers dynamically
Extending a constructor
Changing layer attributes
Styling active layers
Extending the method
Changing the layer order with the Drag and Drop API
Clearing the message bar
Summary
Chapter 4: Using Vector Data
Before getting started
Accessing attributes
Writing the code
Setting attributes
Styling the form
Writing the code
Validating attributes
Adjusting the styles
Building headers
Writing the code
Creating thematic layers
Extending the layer tree
Creating choropleth maps
Creating categorized maps
Saving vector data
Saving in arbitrary formats
Saving with WFS-T
Modifying the geometry
Summary
Chapter 5: Creating Responsive Applications with Interactions and Controls
Before getting started
Basic considerations
Building the toolbar
Mapping interactions to controls
Creating the control
Adding and removing the control
Adding a selection control
Building a set of feature selection controls
Styling the controls
Creating the selection tools
Adding new vector layers
Creating the HTML and the CSS
Extending the layer tree
Building a set of drawing tools
Writing the method
Modifying and snapping to features
Extending the method
Creating new interactions
Understanding ol.interaction.Pointer
Removing features
Dragging features
Extending the method
Building a measuring control
Creating the interaction
Doing geodesic measurements
Calculating lengths even more precisely
Summary
Chapter 6: Controlling the Map – View and Projection
Before getting started
Basic considerations
Customizing a view
Constraining a view
Creating a navigation history
Working with extents
Creating a zoom control
Extending the toolbar
Rotating a view
Changing the map's projection
Creating custom animations
Building the control
Creating animations
Summary
Chapter 7: Mastering Renderers
Before getting started
Using different renderers
Creating a WebGL map
Drawing lines and polygons with WebGL
Blending layers
Clipping layers
Exporting a map
Creating a raster calculator
Raster 101
Operating with pixels
Creating a convolution matrix
How convolution works
Converting an image to 8-bit
Implementing the Sobel filter
Normalizing an image
Finalizing a control
Clipping a layer with WebGL
Writing programs
Creating a clipping mask
Summary
Chapter 8: OpenLayers 3 for Mobile
Before getting started
Basic considerations
Responsive styling with CSS
Writing the style sheet
Constructing the map
Generating geocaches
Adding device-dependent controls
Adding controls for touch devices
Adding controls for desktop computers
Vectorizing the mobile version
Making the mobile application interactive
Summary
Chapter 9: Tools of the Trade: Integrating Third-Party Applications
Before getting started
Exporting a QGIS project
Installing the qgis2web plugin
Inspecting the project
Exporting a map
Salvaging the results
Importing shapefiles
Editing the HTML file
Replacing a function
Spatial analysis with Turf
Preparing an example
Implementing a buffer operation
Implementing a merge operation
Implementing the self-intersect operation
Spatial analysis with JSTS
Implementing operations
3D rendering with Cesium
Preparing a map
Creating a control
Observing a terrain
Extending the Cesium scene
Summary
Chapter 10: Compiling Custom Builds with Closure
Before getting started
Configuring Node JS
Installing Node JS on Windows
Installing Node JS on Linux
Resolving dependencies
Compiling OpenLayers 3
Building default versions
Understanding a configuration file
Building OpenLayers 3 with a subset of features
Bundling an application with
OpenLayers 3
Editing the application
Creating a configuration file
Fixing the application
Extending OpenLayers 3
Creating rich documentation with JSDoc
Customizing the documentation
Summary
Index