Closed mcastro-lqd closed 7 months ago
Somehow this is caused when the webpack prod config is used or the node_env is set to 'production'
. Can be replicated by adding optimization: { nodeEnv: 'production' }
to webpack.dev.js
. I don't really know what's the problem. Have you seen anything like that before @vellip @hom3mad3 ?
Ohh, interesting. Can't say I have. Does it log anything to the console?
@vellip nothing I could see, it's super weird
@goapunk seems to work when I set the center
prop on the map
@vellip do you know why it fixes it ? :sweat_smile: and would you create a PR if you have time ? :)
@CarolingerSeilchenspringer should we prioritize this as it makes testing of anything which requires choosing a point on a map impossible? (e.g. you can't create any mapideas, proposals,...)
@vellip do you know why it fixes it ? 😅 and would you create a PR if you have time ? :)
Ah sorry. I am not sure. I think the map needs a center before it works but I can't explain why it would only be the case in production mode. I'd have to have a closer look, which would probably take more time than I can offer this week. A quick fix would probably just be to set center={[0,0]}
and the code should after initiation jump to either the marker or polygon (if set) anyway.
@vellip no worries, I can also push a temporary fix for now. Setting the center doesn't work because somehow the order of execution seems different. The callback which sets the polygon center is called before the map reference is created, so it doesn't do anything as there's no map yet (at least that's what seemed to happen)
URL: https://meinberlin-design-dev.liqd.net/budgeting/create/module/burgerinnenhaushalt-2-phasen-12/ user: moderator/initiator/Admin expected behaviour: to be able to add the pin in the map behaviour: Map is grey and not clickable important screensize: Both device & browser: Safari