OpenLayers 3.x Cookbook - Second Edition
eBook - ePub

OpenLayers 3.x Cookbook - Second Edition

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

OpenLayers 3.x Cookbook - Second Edition

About this book

Over 50 comprehensive recipes to help you create spectacular maps with OpenLayers 3About 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 industryWho This Book Is ForIf 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 GeolocationIn DetailOpenLayers 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 approachThis 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.

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 more here.
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 1000+ topics, we’ve got you covered! Learn more here.
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 here.
Yes! You can use the Perlego app on both iOS or 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 3.x Cookbook - Second Edition by Peter J. Langley, Antonio Santiago Perez, Antonio Santiago Perez in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in JavaScript. We have over one million books available in our catalogue for you to explore.

OpenLayers 3.x Cookbook Second Edition


Table of Contents

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

OpenLayers 3.x Cookbook Second Edition

Copyright Ā© 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: August 2012
Second edition: March 2016
Production reference: 1180316
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-775-6
www.packtp...

Table of contents

  1. OpenLayers 3.x Cookbook Second Edition