Files
openlayers/examples/button-title.js
2022-08-22 19:26:23 +02:00

27 lines
553 B
JavaScript

import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
const map = new Map({
layers: [
new TileLayer({
source: new OSM(),
}),
],
target: 'map',
view: new View({
center: [-8730000, 5930000],
rotation: Math.PI / 5,
zoom: 8,
}),
});
document
.querySelectorAll('.ol-zoom-in, .ol-zoom-out, .ol-rotate-reset')
.forEach(function (el) {
new bootstrap.Tooltip(el, {
container: '#map',
});
});