Unable to use api
RubenTipparach opened this issue · comments
Hi, I have a problem using Wrld in React. I had it working breifly last week, but then it failed to load the api.
eeGeoWebGL.jgz:234 L.eeGeo API unavailable _eegeoMapInitializedCallback @ eeGeoWebGL.jgz:234
u0b @ eeGeoWebGL.jgz:265
MZb @ eeGeoWebGL.jgz:265
JZb @ eeGeoWebGL.jgz:265
e.callMain.e.we @ eeGeoWebGL.jgz:360
b @ eeGeoWebGL.jgz:362
Uk @ eeGeoWebGL.jgz:363
Tk @ eeGeoWebGL.jgz:359
Ab @ eeGeoWebGL.jgz:68
h @ eeGeoWebGL.jgz:6
(anonymous) @ eeGeoWebGL.jgz:9
d.onload @ eeGeoWebGL.jgz:9
XMLHttpRequest.send (async)
(anonymous) @ eeGeoWebGL.jgz:9
files.audio @ eeGeoWebGL.jgz:9
createWrldModule @ eeGeoWebGL.jgz:10
(anonymous) @ wrld.js:23
onEmscriptenLoaded @ wrld.js:22
I used npm to install wrld.js, created a div, and called this:
this.map = Lw.map("wmap", "816e1b7f836621b9687372c0c6ee1195", {
center: [46.897753, -96.802437],
zoom: 16
});
The view appears to be rendering in 3D, but the loading icon continues spinning and no markers or any calls to the api seem to work.
Thanks,
Ruben
Hi Ruben,
The code sample you've provided looks like it has a typo in it - the line:
this.map = Lw.map("wmap", ...
should be something like
this.map = L.Wrld.map("wmap",...
Can you also confirm you've added import "wrld.js";
to the file as well.
If you've addressed both of these and it still doesn't work, would it be possible to get additional console output or is the error listed the only one you see?
I used this import * as Lw from 'wrld.js';
The issue is actually gone now, maybe something was fixed over night on the server end?