The zoom control allows for zoom in/out links that can be styled with CSS.
Note: This change was originally captured in #269. It involves nice additions thanks @ahocevar. The changes were unintentionally merged and then reverted with fb3caf1561, so the history of commits is not immediately apparent (though still likely there somewhere due to the magic of git).
35 lines
827 B
JavaScript
35 lines
827 B
JavaScript
var map = new OpenLayers.Map({
|
|
div: "map",
|
|
layers: [new OpenLayers.Layer.OSM()],
|
|
controls: [
|
|
new OpenLayers.Control.Navigation({
|
|
dragPanOptions: {
|
|
enableKinetic: true
|
|
}
|
|
}),
|
|
new OpenLayers.Control.Attribution(),
|
|
new OpenLayers.Control.Zoom()
|
|
],
|
|
center: [0, 0],
|
|
zoom: 1
|
|
});
|
|
|
|
var map2 = new OpenLayers.Map({
|
|
div: "map2",
|
|
layers: [new OpenLayers.Layer.OSM()],
|
|
controls: [
|
|
new OpenLayers.Control.Navigation({
|
|
dragPanOptions: {
|
|
enableKinetic: true
|
|
}
|
|
}),
|
|
new OpenLayers.Control.Attribution(),
|
|
new OpenLayers.Control.Zoom({
|
|
zoomInId: "customZoomIn",
|
|
zoomOutId: "customZoomOut"
|
|
})
|
|
],
|
|
center: [0, 0],
|
|
zoom: 1
|
|
});
|