You are previewing OpenLayers Cookbook.
O'Reilly logo
OpenLayers Cookbook

Book Description

The best method to learn the many ways OpenLayers can be used to render data on maps is to dive straight into these recipes. With a mix of basic and advanced techniques, it’s ideal for JavaScript novices and experts alike.

  • Understand the main concepts about maps, layers, controls, protocols, events etc

  • Learn about the important tile providers and WMS servers

  • Packed with code examples and screenshots for practical, easy learning

  • In Detail

    Data visualization and analysis has become an important task for many companies. Understanding the basic concepts of GIS and knowing how to visualize data on a map is a required ability for many professionals today. OpenLayers is a JavaScript library to load, display, and render maps from multiple sources on web pages.

    "OpenLayers Cookbook" teaches how to work with OpenLayers, one of the most important and complete open source JavaScript libraries. Through an extensive set of recipes, this book shows how to work with the main concepts required to build a GIS web application– maps, raster and vector layers, styling, theming, and so on.

    "OpenLayers Cookbook" includes problem solving and how-to recipes for the most common and important tasks. A wide range of topics are covered.

    The range of recipes includes: creating basic maps, working with raster and vector layers, understanding events and working with main controls, reading features from different data sources, styling features, and understanding the underlying architecture.

    "OpenLayers Cookbook" describes solutions and optimizations to problems commonly found.

    "

    Table of Contents

    1. OpenLayers Cookbook
      1. Table of Contents
      2. OpenLayers Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
        2. Why Subscribe?
        3. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Web Mapping Basics
        1. Introduction
        2. Creating a simple full screen map
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Different ways to include OpenLayers
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Understanding base and non-base layers
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Avoiding the need of a base layer
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        6. 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
        7. Managing map's stack layers
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        8. Managing map's controls
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        9. Moving around the map view
          1. How to do it...
          2. How it works...
          3. See also
        10. Restricting the map extent
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
      9. 2. Adding Raster Layers
        1. Introduction
        2. Using Google Maps imagery
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        3. Using Bing imagery
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Adding WMS layer
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        5. Wrapping the date line options
          1. How to do it...
          2. How it works...
          3. See also
        6. Changing the zoom effect
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        7. Changing the layer opacity
          1. How to do it...
          2. How it works...
          3. See also
        8. Using WMS with single tile mode
          1. How to do it...
          2. How it works...
          3. See also
        9. Buffering the layer data to improve the map navigation
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        10. Creating an image layer
          1. How to do it...
          2. How it works...
          3. See also
        11. 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. See also
        5. Reading and creating features from a WKT
          1. How to do it...
          2. How it works...
          3. See also
        6. Adding markers to the map
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        7. Using point features as markers
          1. How to do it...
          2. How it works...
          3. See also
        8. Working with popups
          1. How to do it...
          2. How it works...
          3. See also
        9. Adding features from a WFS server
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        10. Using the cluster strategy
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        11. Filtering features in WFS requests
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        12. Reading features directly using Protocols
          1. How to do it...
          2. How it works...
          3. There's more...
          4. 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. There's more...
            1. Another way to register an event listener
          4. See also
        3. Implementing a work in progress indicator for map layers
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        4. Listening for vector layer features' events
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        5. Listening for non-OpenLayers events
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Stop observing
          4. 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. Adding a navigation history control
          1. How to do it...
          2. How it works...
          3. See also
        4. Working with geolocation
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Placing controls outside the map
          1. How to do it...
          2. How it works...
          3. See also
        6. Editing features on multiple vector layers
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        7. Modifying features
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        8. Measuring distances and areas
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        9. Getting feature information from data source
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        10. Getting information from the WMS server
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
      13. 6. Theming
        1. Introduction
        2. Understanding how themes work using the img folder
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        3. Understanding how themes work using the theme folder
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        4. Delimiting tiles in a raster layer
          1. How to do it...
          2. How it works...
          3. See also
        5. Creating a new OpenLayers theme
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Starting actions outside the controls
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      14. 7. Styling Features
        1. Introduction
        2. Styling features using symbolizers
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Improving style using StyleMap and the replacement of feature's attributes
          1. How to do it...
          2. How it works...
          3. See also
        4. Playing with StyleMap and the render intents
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        5. Working with unique value rules
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        6. Defining custom rules to style features
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        7. Styling clustered features
          1. How to do it...
          2. How it works...
          3. See also
      15. 8. Beyond the Basics
        1. Introduction
        2. Working with projections
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Retrieving remote data with OpenLayers.Request
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        4. Creating a custom control
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        5. Creating a custom renderer
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        6. Selecting features intersecting with a line
          1. How to do it...
          2. How it works...
          3. See also
        7. Making an animation with image layers
          1. How to do it...
          2. How it works...
          3. See also
      16. Index