I have made a web application based around an OpenLayers. I installed OpenLayers through npm, and made everything work.
Due to changes in requirements (yay), i need to remove everything node related, and replace it with local files.
All examples i have been able to find (including on OpenLayers own example page), are doing it the Node way.
So far i have downloaded the dist version of OpenLayers from here: https://openlayers.org/download/
And added that file to my project.
Now i don't get how i'm supposed to replace all my imports, with calls to this file.
This is all the imports i want to replace:
import { Map, View } from "ol";
import TileLayer from "ol/layer/Tile";
import WMTS from "ol/source/WMTS";
import WMTSTileGrid from "ol/tilegrid/WMTS";
import TileWMS from "ol/source/TileWMS";
import { get as getProjection } from "ol/proj";
import Projection from "ol/proj/Projection.js";
import { getTopLeft } from "ol/extent.js";
import { register } from "ol/proj/proj4.js";
When you add this as a normal script tag you will get a global var called ol
..
So all you would need to do is ->
const { Map, View } = ol;
const TileLayer = ol.layer.Tile;
//etc..