import Map from 'ol/Map.js';
import View from 'ol/View.js';
-import OSM from 'ol/source/OSM.js';
-import TileLayer from 'ol/layer/Tile.js';
import { fromLonLat, getPointResolution } from 'ol/proj.js';
import VectorSource from 'ol/source/Vector.js';
import Feature from 'ol/Feature.js';
super(mapName);
this.#map = new Map({
layers: [
- // new TileLayer({
- // source: new SentinelCloudless(),
- // }),
- // new TileLayer({
- // source: new OSM(),
- // opacity: 0.4,
- // transition: 0,
- // }),
],
- // view: new View({
- // center: [0, 0],
- // zoom: 2,
- // }),
+ // view: new View({
+ // projection: 'EPSG:4326',
+ // center: [0, 0],
+ // zoom: 2,
+ // }),
target: this.getMapName(),
});
+ //this.#map.getView().set('projection', 'EPSG:4326', true);
}
/* GEOGRAPHICAL METHODS */
this.#map.getView().setZoom(zoom);
}
- setCenter(lng, lat) {
- this.#map.getView().setCenter(fromLonLat([lng, lat]));
+ setCenter(lat, lon) {
+ this.#map.getView().setCenter(fromLonLat([lon, lat]));
}
addPoint(lng, lat, style) {
});
vectorLayer.setStyle(olStyleFunction);
}
-}
\ No newline at end of file
+}