BBOX vector source working
[gpl/argeo-suite.git] / js / src / geo / OpenLayersMapPart.js
index a75956680ee1e165ebf0151015d973725df8ef62..a1fc2b852f1e9a298f9bf07a2615664f31cc3f6d 100644 (file)
@@ -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
+
+}