This is the pan buttons for panning north, south, east and west on the map. The will appear at the extremes of the map element. You can adjust this by setting an offset.
Unless explicitly stated by using the fullsize flag, these will resize depending on the size of the map.
You may also use your own icon.
// Will dynamically adjust the size of the icon depending on the map size
var north = new EMS.Control.PanButton("n");// Will always use the large sized icon
var north = new EMS.Control.PanButton("n", {fullsize: true});// Will always use the small sized icon
var north = new EMS.Control.PanButton("n", {fullsize: false});// Will be 20 pixels from the edge of the map element
var north = new EMS.Control.PanButton("n", {offset: 20});// Custom icon is used, this will not resize dynamically
var icon = new OpenLayers.Icon("north.png", new OpenLayers.Size(16, 20));
var north = new EMS.Control.PanButton("n", {icon: icon});| EMS. | This is the pan buttons for panning north, south, east and west on the map. |
| Constants | |
| FULLSIZE_THRESHOLD | {OpenLayers.Size} is the size of the map which, if in a dynamic state, the controls will change from miniture to fullsize or the other way around. |
| Properties | |
| id | {String} Prefix to the div.id |
| type | {String} One of n, s, e, w |
| icon | {OpenLayers.Icon} is the icon used as the display. |
| offset | {Mixed} is an OpenLayers.Pixel or integer. |
| fullsize | {Boolean} Small pan buttons or large. |
| Constructor | |
| EMS. | Create an instance of EMS.Control.PanButton. |
| Functions | |
| destroy | |
| draw | Constructs contents of the control. |
{OpenLayers.Size} is the size of the map which, if in a dynamic state, the controls will change from miniture to fullsize or the other way around.
{OpenLayers.Icon} is the icon used as the display. This will be created if not set.
{Mixed} is an OpenLayers.Pixel or integer. Offset for the pan arrow and the outer edge of the map.
Create an instance of EMS.Control.PanButton.
| type | {String} One of n, s, e, w. |
| options | {Object} Extra options to override existing properties or add new ones. These are: fullsize, icon and offset. |
destroy: function()
Constructs contents of the control.
draw: function()