You are previewing OpenLayers 3.x Cookbook - Second Edition.
O'Reilly logo
OpenLayers 3.x Cookbook - Second Edition

Book Description

Over 50 comprehensive recipes to help you create spectacular maps with OpenLayers 3

About This Book

  • Create highly customized mapping apps for the web with rich interactivity and diverse content using JavaScript

  • See how successful mapping apps work and how they integrate with third-party services

  • Packed full of code examples, screenshots, and explanations from professionals in the industry

  • Who This Book Is For

    If you are a GIS-related professional with basic knowledge of web technologies and want to gain in-depth knowledge of creating web mapping applications, then this book is for you. The recipes will be appropriately mixed to suit JavaScript beginners or experts and cover basic to advanced topics on OpenLayers.

    What You Will Learn

  • Create stunning maps, and understand projection

  • Add customized raster and vector layers

  • Work with important tile providers

  • Work with OGC, WMS, and WFS compliant servers

  • Read/write features from/to different data sources

  • Style features to improve their visualization

  • Understand events and work with the main controls

  • Enhance maps with HTML5 technologies such as Geolocation

  • In Detail

    OpenLayers 3 is one of the most important and complete open source JavaScript mapping libraries today.

    Throughout this book, you will go through recipes that expose various features of OpenLayers 3, allowing you to gain an insight into building complex GIS web applications.

    You will get to grips with the basics of creating a map with common functionality and quickly advance to more complicated solutions that address modern challenges. You will explore into maps, raster and vector layers, and styling in depth. This book also includes problem solving and how-to recipes for the most common and important tasks.

    Style and approach

    This book teaches you how to create stunning maps that are highly interactive and visually appealing with the help of 50 handpicked recipes. Each recipe will address your need to visualize data on a map. Just follow the steps in the recipes to create maps of your choice in no time.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. OpenLayers 3.x Cookbook Second Edition
      1. Table of Contents
      2. OpenLayers 3.x Cookbook Second Edition
      3. Credits
      4. About the Authors
      5. About the Reviewer
      6. www.PacktPub.com
        1. eBooks, discount offers, and more
          1. Why Subscribe?
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Sections
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Web Mapping Basics
        1. Introduction
        2. Creating a simple fullscreen map
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        3. Playing with the map's options
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Managing the map's stack layers
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        5. Managing the map's controls
          1. How to do it…
          2. How it works…
          3. See also
        6. Moving around the map view
          1. How to do it…
          2. How it works…
          3. See also
        7. Restricting the map's extent
          1. How to do it…
          2. How it works…
          3. See also
      9. 2. Adding Raster Layers
        1. Introduction
        2. Using Bing imagery
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Using OpenStreetMap imagery
          1. How to do it…
          2. How it works…
          3. There's more...
          4. See also
        4. Adding WMS layers
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        5. Changing the zoom effect
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        6. Changing layer opacity
          1. How to do it…
          2. How it works…
          3. See also
        7. Buffering the layer data to improve map navigation
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        8. Creating an image layer
          1. How to do it…
          2. How it works…
          3. See also
        9. Setting the tile size in WMS layers
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
      10. 3. Working with Vector Layers
        1. Introduction
        2. Adding a GML layer
          1. How to do it…
          2. How it works…
          3. See also
        3. Adding a KML layer
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        4. Creating features programmatically
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        5. Exporting features as GeoJSON
          1. How to do it…
          2. How it works…
          3. See also…
        6. Reading and creating features from a WKT
          1. How to do it…
          2. How it works…
          3. See also
        7. Using point features as markers
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        8. Removing or cloning features using overlays
          1. How to do it…
          2. How it works…
          3. See also
        9. Zooming to the extent of a layer
          1. How to do it…
          2. How it works…
        10. Adding text labels to geometry points
          1. How to do it…
          2. How it works…
        11. Adding features from a WFS server
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        12. Using the cluster strategy
          1. How to do it…
          2. How it works…
          3. See also
        13. Reading features directly using AJAX
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        14. Creating a heat map
          1. How to do it…
          2. How it works…
          3. See also
      11. 4. Working with Events
        1. Introduction
        2. Creating a side-by-side map comparator
          1. How to do it…
          2. How it works…
          3. See also
        3. Implementing a work-in-progress indicator for map layers
          1. How to do it…
          2. How it works…
          3. See also
        4. Listening for the vector layer features' events
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        5. Listening for mouse or touch events
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        6. Using the keyboard to pan or zoom
          1. How to do it…
          2. How it works…
          3. See also
      12. 5. Adding Controls
        1. Introduction
        2. Adding and removing controls
          1. How to do it…
          2. How it works…
          3. See also
        3. Working with geolocation
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Placing controls outside the map
          1. How to do it…
          2. How it works…
          3. See also
        5. Drawing features across multiple vector layers
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        6. Modifying features
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        7. Measuring distances and areas
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        8. Getting feature information from a data source
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        9. Getting information from a WMS server
          1. How to do it…
          2. How it works…
          3. See also
      13. 6. Styling Features
        1. Introduction
        2. Styling layers
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Styling features based on geometry type
          1. How to do it…
          2. How it works…
          3. See also
        4. Styling based on feature attributes
          1. How to do it…
          2. How it works…
          3. See also
        5. Styling interaction render intents
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        6. Styling clustered features
          1. How to do it…
          2. How it works…
          3. See also
      14. 7. Beyond the Basics
        1. Introduction
        2. Working with projections
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Creating a custom control
          1. How to do it…
          2. How it works…
          3. See also
        4. Selecting features by dragging out a selection area
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        5. Transitioning between weather forecast imagery
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Using the custom OpenLayers library build
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Drawing in freehand mode
          1. How to do it…
          2. How it works…
          3. See also
        8. Modifying layer appearance
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Adding features to the vector layer by dragging and dropping them
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        10. Making use of map permalinks
          1. How to do it…
          2. How it works…
          3. See also
      15. Index