Skip to content
Snippets Groups Projects
Commit 76a8efae authored by Oleksandr Husak's avatar Oleksandr Husak
Browse files

display all history point

parent d2470710
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,7 @@ Connection settings ...@@ -79,7 +79,7 @@ Connection settings
"refSystemId": "ROOT", "refSystemId": "ROOT",
"point": { "point": {
"latitude": 51.02535, "latitude": 51.02535,
"longitude": 13.72285 "longitude": 13.72319
}, },
"accuracy": 1 "accuracy": 1
} }
......
...@@ -74,7 +74,21 @@ export class MapComponent implements OnInit { ...@@ -74,7 +74,21 @@ export class MapComponent implements OnInit {
// --- Leyers for markers // --- Leyers for markers
if (key in this.markOverlays) { if (key in this.markOverlays) {
console.log(this.markOverlays) console.log(this.markOverlays)
this.markOverlays[key].clearLayers(); // this.markOverlays[key].clearLayers();
var myIconReplc = L.Icon.extend({
options: {}
});
this.markOverlays[key].eachLayer(layer => {
if (!(layer instanceof L.Circle)) {
this.map.removeLayer(layer)
}
});
} else { } else {
this.markOverlays[key] = L.layerGroup().addTo(<L.Map>this.map) this.markOverlays[key] = L.layerGroup().addTo(<L.Map>this.map)
} }
...@@ -122,6 +136,7 @@ export class MapComponent implements OnInit { ...@@ -122,6 +136,7 @@ export class MapComponent implements OnInit {
if (key=="ROOT") { if (key=="ROOT") {
// Root Marker // Root Marker
this.markOverlays[key].clearLayers();
let marker = L.marker(globPos, { let marker = L.marker(globPos, {
icon: L.icon({ icon: L.icon({
iconSize: [40, 40], iconSize: [40, 40],
...@@ -135,9 +150,6 @@ export class MapComponent implements OnInit { ...@@ -135,9 +150,6 @@ export class MapComponent implements OnInit {
} else { } else {
// --- Marker config // --- Marker config
let serialNum = Object.keys(this.markOverlays).indexOf(key) let serialNum = Object.keys(this.markOverlays).indexOf(key)
// if (serialNum == 0 && Object.keys(this.markOverlays).length > 1) {
// serialNum = 1
// }
var markerConf = getMarkerConfig(serialNum) var markerConf = getMarkerConfig(serialNum)
let marker = L.marker(globPos, { let marker = L.marker(globPos, {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment