SamSamskies / react-map-gl-geocoder

React wrapper for mapbox-gl-geocoder for use with react-map-gl
MIT License
122 stars 29 forks source link

react-map-gl-geocoder in electron-react-boilerplate #78

Closed vlady-yakymenko closed 4 years ago

vlady-yakymenko commented 4 years ago

Hi @SamSamskies, I am using react-map-gl and react-map-gl-geocoder in Electron App(https://github.com/electron-react-boilerplate/electron-react-boilerplate), it works well in dev mode, but on production mode, it is showing errors like image

if you can let me know any thought on this, it would be great! Thanks I just followed this one:https://codesandbox.io/s/l7p179qr6m, working well on dev mode.

SamSamskies commented 4 years ago

Hi @vlady-yakymenko, does your app work in production mode if you remove the react-map-gl-geocoder component from your render function? Like is there a map showing on the page if you remove the geocoder, but leave the react-map-gl instance? If the map isn't working, you'll need to fix that first. react-map-gl-geocoder will only work if the map is created successfully. If your app does work without rendering the geocoder, could you list what versions you're using for react-map-gl and react-map-gl-geocoder.

vlady-yakymenko commented 4 years ago

Hi @SamSamskies thanks for the quick response! when I remove the react-map-gl-geocoder, react-map-gl is not rendering map, just showing blank page but no bugs showing. Is there any solution to make react-map-gl working correctly on production mode? dev mode is working well.

SamSamskies commented 4 years ago

I'm not sure. I haven't used react-map-gl with Electron before. You can try raising an issue with react-map-gl https://github.com/visgl/react-map-gl/issues.