+
+ addPoint(lng, lat, style) {
+ let vectorSource = new VectorSource({
+ features: [new Feature({
+ geometry: new Point(fromLonLat([lng, lat]))
+ })]
+ });
+ this.#map.addLayer(new VectorLayer({ source: vectorSource }));
+ }
+
+ addUrlLayer(url, format) {
+ let vectorSource;
+ if (format === 'GEOJSON') {
+ vectorSource = new VectorSource({ url: url, format: new GeoJSON() })
+ }
+ else if (format === 'GPX') {
+ vectorSource = new VectorSource({ url: url, format: new GPX() })
+ }
+ this.#map.addLayer(new VectorLayer({
+ source: vectorSource,
+ }));
+ }