Merge pull request #1007 from zaakzaku/byamba

Improved performance of camera shot markers
pull/1009/head
Piero Toffanin 2021-06-24 14:18:43 -04:00 zatwierdzone przez GitHub
commit a061af7727
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 7 usunięć

Wyświetl plik

@ -221,11 +221,6 @@ class Map extends React.Component {
// Add camera shots layer if available
if (meta.task && meta.task.camera_shots && !this.addedCameraShots){
const cameraMarker = L.AwesomeMarkers.icon({
icon: 'camera',
markerColor: 'blue',
prefix: 'fa'
});
const shotsLayer = new L.GeoJSON.AJAX(meta.task.camera_shots, {
style: function (feature) {
@ -236,8 +231,12 @@ class Map extends React.Component {
}
},
pointToLayer: function (feature, latlng) {
return L.marker(latlng, {
icon: cameraMarker
return new L.CircleMarker(latlng, {
color: '#3498db',
fillColor: '#3498db',
fillOpacity: 0.9,
radius: 10,
weight: 1
});
},
onEachFeature: function (feature, layer) {