X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=js%2Fsrc%2Fgeo%2FOpenLayersMapPart.js;h=a1fc2b852f1e9a298f9bf07a2615664f31cc3f6d;hb=9cfc7842603c9c09d686ab9972099ed0a7c22a6e;hp=a75956680ee1e165ebf0151015d973725df8ef62;hpb=8a490e540ac623b3545b1bd3da65ecbf2e4b6436;p=gpl%2Fargeo-suite.git diff --git a/js/src/geo/OpenLayersMapPart.js b/js/src/geo/OpenLayersMapPart.js index a759566..a1fc2b8 100644 --- a/js/src/geo/OpenLayersMapPart.js +++ b/js/src/geo/OpenLayersMapPart.js @@ -4,8 +4,6 @@ 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'; @@ -37,21 +35,15 @@ export default class OpenLayersMapPart extends MapPart { 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 */ @@ -282,4 +274,5 @@ export default class OpenLayersMapPart extends MapPart { }); vectorLayer.setStyle(olStyleFunction); } -} \ No newline at end of file + +}