diff --git a/src/map/MapRouteCoordinates.js b/src/map/MapRouteCoordinates.js index 9ad0c9b97a..9a43ce4a84 100644 --- a/src/map/MapRouteCoordinates.js +++ b/src/map/MapRouteCoordinates.js @@ -43,21 +43,19 @@ const MapRouteCoordinates = ({ name, coordinates, deviceId }) => { 'line-width': 2, }, }); - if (name) { - map.addLayer({ - source: id, - id: `${id}-title`, - type: 'symbol', - layout: { - 'text-field': '{name}', - 'text-size': 12, - }, - paint: { - 'text-halo-color': 'white', - 'text-halo-width': 1, - }, - }); - } + map.addLayer({ + source: id, + id: `${id}-title`, + type: 'symbol', + layout: { + 'text-field': '{name}', + 'text-size': 12, + }, + paint: { + 'text-halo-color': 'white', + 'text-halo-width': 1, + }, + }); return () => { if (map.getLayer(`${id}-title`)) { diff --git a/src/map/MapRoutePath.js b/src/map/MapRoutePath.js index c6790db162..d7ac2f94da 100644 --- a/src/map/MapRoutePath.js +++ b/src/map/MapRoutePath.js @@ -3,7 +3,7 @@ import { useId, useEffect } from 'react'; import { map } from './core/MapView'; import { getSpeedColor } from '../common/util/colors'; -const MapRoutePath = ({ name, positions }) => { +const MapRoutePath = ({ positions }) => { const id = useId(); const theme = useTheme(); @@ -32,21 +32,6 @@ const MapRoutePath = ({ name, positions }) => { 'line-width': 2, }, }); - if (name) { - map.addLayer({ - source: id, - id: `${id}-title`, - type: 'symbol', - layout: { - 'text-field': '{name}', - 'text-size': 12, - }, - paint: { - 'text-halo-color': 'white', - 'text-halo-width': 1, - }, - }); - } return () => { if (map.getLayer(`${id}-title`)) { @@ -85,9 +70,6 @@ const MapRoutePath = ({ name, positions }) => { map.getSource(id)?.setData({ type: 'FeatureCollection', features, - properties: { - name, - }, }); }, [theme, positions]);