diff --git a/src/map/GpxPolyline/index.tsx b/src/map/GpxPolyline/index.tsx index 560ba5d..c870d49 100644 --- a/src/map/GpxPolyline/index.tsx +++ b/src/map/GpxPolyline/index.tsx @@ -20,13 +20,13 @@ const GpxPolyline: FC = ({ latlngs, color }) => { setLayer(item); return () => MainMap.removeLayer(item); - }, [MainMap, color, latlngs]); + }, [MainMap]); useEffect(() => { if (!layer) return; layer.setLatLngs(latlngs); - layer.options.color = color; + layer.setStyle({ color }); }, [latlngs, layer, color]); return null; diff --git a/src/styles/gpx.less b/src/styles/gpx.less index 2b47f32..f46c62c 100644 --- a/src/styles/gpx.less +++ b/src/styles/gpx.less @@ -52,6 +52,11 @@ width: 8px; height: 8px; border-radius: 100%; + cursor: pointer; + + // span { + + // } } }