Time for action – extending ol.control.Control to make your own control
Let's get started. Contrary to most examples, it will need more code than usual. So, to keep things simple, we will explain how to build the sample by retrieving the various code files instead of inlining it. After these operations, we will focus on the important parts of the code to understand them:
- Go to the samples directory and retrieve all the
cssclass with the
assets/css/samples.cssand copy paste them in your own
- If you don't already have it from Chapter 8, Interacting with Your Map ...