January 2016
Intermediate to advanced
308 pages
6h 35m
English
In the first example (ch04_getattribute), we will learn how to access attribute data stored in the features and communicate them to the user. We will use a very particular feature of OpenLayers 3: the overlay. As a first step, we will create some simple rules to be applied on our overlays:
.popup {
border: 1px solid grey;
background-color: rgba(255,255,255,1);
border-radius: .5em;
}Overlays are geographically bounded HTML elements, which scale with the current resolution. They are stored separately from layers and other elements of the library, allowing us to have full control over them. As they are not parts of the canvas, we can easily style them with CSS.
For this task, we simply register a click event ...
Read now
Unlock full access