-
This is modification ol-hash(by frogcat)
-
OpenLayers v5 & es6 support
import { addHash } from './ol-hash'
- call
addHash(map)
import { Map, View } from 'ol'
import { fromLonLat } from 'ol/proj'
import { Tile as TileLayer } from 'ol/layer/'
import { OSM } from 'ol/source/'
import { addHash } from './ol-hash'
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new OSM()
})
],
view: new View({
center: fromLonLat([132.601271, 34.232102], 'EPSG:3857'),
zoom: 17.5
})
})
addHash(map)