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).
This commit is contained in:
34
examples/zoom.js
Normal file
34
examples/zoom.js
Normal file
@@ -0,0 +1,34 @@
|
||||
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
|
||||
});
|
||||
Reference in New Issue
Block a user