Skip to content

Commit

Permalink
fix: add editable color to linestring map
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelzinh3 committed Oct 5, 2023
1 parent dae1759 commit 4113768
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/contrib/frontend/maps/static/maps/js/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,10 @@ function addMarkers(coordinates) {
}
});


// Remove marcadores existentes
if (startPoint) map.removeLayer(startPoint);
if (endPoint) map.removeLayer(endPoint);

console.log(mapWrapper.dataset)

startPoint = L.marker([coordinates[0][1], coordinates[0][0]]);
endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]]);

Expand All @@ -87,7 +84,7 @@ function addMarkers(coordinates) {
}

function addPolyline(coordinates, properties) {
const lineColor = mapWrapper.dataset.linecolor;
const lineColor = mapWrapper.dataset.mapsLinecolor;

// Remove linha existente
if (polylineGeoJSON) map.removeLayer(polylineGeoJSON);
Expand Down

0 comments on commit 4113768

Please sign in to comment.