-
ol is not defined of "ol": "7.1.0", |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
What were you trying to do? Where were you looking for import { Map, View } from 'ol';
const map = new Map({
view: new View({
center: [0, 0],
zoom: 2
})
}); ? |
Beta Was this translation helpful? Give feedback.
-
but,I don't understand why the previous project was written differently If I continue to use ol.layer.Tile, I will make an error: ol is not defined |
Beta Was this translation helpful? Give feedback.
-
If you want to use the |
Beta Was this translation helpful? Give feedback.
If you want to use the
ol.layer.Tile
syntax, you need to use the legacy build, which you find in the package as well (./dist/ol.js
).