
OpenLayers Cookbook

Another different and drastic way to change the look of our applications is to place the controls outside the map and attach them to our own components.
Most of the OpenLayers controls have two features:
They realize some action (edit features, create a line, and so on)
They know how to render themselves on top of the map
To achieve the goal of this recipe, the idea is to separate the visualization from the action that the control does. This way, we can create some buttons and activate or deactivate a control depending on the button that is pressed:
As we can see in the screenshot, we are going to create a toolbar and place:
The same set of controls we can find in OpenLayers.Control.EditingToolbar
, which will allow us to draw points, lines, and polygons
A dropdown button that will allow us to start the OpenLayers.Control.Measure
action
We are going to use the Dojo Toolkit framework (http://dojotoolkit.org/) which we have used along with the source...
Change the font size
Change margin width
Change background colour