aws-amplify / maplibre-gl-js-amplify

Apache License 2.0
14 stars 10 forks source link

the map is not loading #225

Closed abhirpat closed 1 year ago

abhirpat commented 1 year ago

I am getting below error in browser console maplibre-gl-js-amplify 3.1.0 using version 2.4.0 of maplibre-gl 605dc0a9-69a1-4cd8-9f0c-cf4a2d32bec9:1 Uncaught ReferenceError: g is not defined

If I change version to 1.5.3, the map will load fine however it crashes when using "drawPoints" from "maplibre-gl-js-amplify".

main.74261051.js:2 Error: There is already a source with this ID at r.addSource (main.74261051.js:2:1199380) at i.addSource (main.74261051.js:2:1400678) at kE (main.74261051.js:2:5884418) at main.74261051.js:2:5889520 at ls (main.74261051.js:2:1631845) at Pu (main.74261051.js:2:1650819) at t.unstable_runWithPriority (main.74261051.js:2:1677438) at Qi (main.74261051.js:2:1593465) at wu (main.74261051.js:2:1650570) at main.74261051.js:2:1650481

zchenwei commented 1 year ago

Hi @abhirpat, do you use CRA 4 to scaffold you project? This is a known issue with CRA4 and you can follow troubleshooting here <- https://ui.docs.amplify.aws/react/getting-started/troubleshooting#create-react-app

abhirpat commented 1 year ago

I resolved the issue. We are good.