January 2016
Intermediate to advanced
308 pages
6h 35m
English
In the next example, called ch06_projection, we close our basic WebGIS client with a final control, which is able to change the map's projection dynamically. First, as we will need the PROJ4JS library for this example, we include it in the HTML file:
<script type="text/javascript" src="../../js/proj4js-2.3.10/proj4.js"></script>
Next, we style the control with CSS:
.notification-bar #projection {
text-align: center;
}
.notification-bar #projection select {
background: none;
border: none;
outline: 0;
}The scheme is the same as the one in the previous example. We will strip the natural look of the select element, which will contain the possible projection options. Next, we start building the control by creating two options ...
Read now
Unlock full access