Files
openlayers/examples/zoom.js
Tim Schaub 8d6bddf0ac A simple zoom control with zoom in/out links.
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).
2012-03-05 22:11:36 -07:00

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
});