OpenLayers Cookbook
eBook - ePub

OpenLayers Cookbook

  1. 300 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

OpenLayers Cookbook

About this book

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.

Approach

This cookbook follows a problem-solution approach to doing important tasks and is packed with examples accompanied by the necessary code and screenshots.

Who this book is for

If you are a GIS-related professional with some basic knowledge of web technologies and want to start or gain in-depth knowledge of creating web mapping applications, this book is written for you

The recipes are appropriately mixed to suit JavaScript newbies or experts and cover basic to advanced topics on OpenLayers.

Trusted by 375,005 students

Access to over 1 million titles for a fair monthly price.

Study more efficiently using our study tools.

OpenLayers Cookbook


Table of Contents

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

Table of contents

  1. OpenLayers Cookbook

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access OpenLayers Cookbook by Antonio Santiago Perez in PDF and/or ePUB format, as well as other popular books in Informatique & Sciences générales de l'informatique. We have over one million books available in our catalogue for you to explore.