osrd
osrd copied to clipboard
front: `TypeError: map.setLayerProperty is not a function` on maps
Open the console and go to for example : http://localhost:3000/carto/48.4881/2.177/10.1191/0/0
You should see the following warning in the console :
layer.js:107 TypeError: map.setLayerProperty is not a function
at diffLayerStyles (layer.js:86:1)
at updateLayer (layer.js:105:1)
at Layer (layer.js:139:1)
at renderWithHooks (react-dom.development.js:14985:1)
at mountIndeterminateComponent (react-dom.development.js:17811:1)
at beginWork (react-dom.development.js:19049:1)
at beginWork$1 (react-dom.development.js:23940:1)
at performUnitOfWork (react-dom.development.js:22776:1)
at workLoopSync (react-dom.development.js:22707:1)
at renderRootSync (react-dom.development.js:22670:1)
at performSyncWorkOnRoot (react-dom.development.js:22293:1)
at react-dom.development.js:11327:1
at unstable_runWithPriority (scheduler.development.js:468:1)
at runWithPriority$1 (react-dom.development.js:11276:1)
at flushSyncCallbackQueueImpl (react-dom.development.js:11322:1)
at flushSyncCallbackQueue (react-dom.development.js:11309:1)
at scheduleUpdateOnFiber (react-dom.development.js:21893:1)
at dispatchAction (react-dom.development.js:16139:1)
at ResizeObserver.<anonymous> (static-map.js:161:1)
After some investigations it comes from here : https://github.com/DGEXSolutions/osrd/blob/dev/front/src/common/Map/Layers/TracksGeographic.js#L32-L57
We've got two layers with the same id. I don't know the impact of changing one of those ID .