Closed JanTrunecek closed 2 months ago
import mgrs from "mgrs";
proj4.mgrs = mgrs;
Does that work for you? Note that this is what proj4
does by default, so you should not need to do it manually.
The proble is I'm using pycharm and dont have any buil plug in so I'm doing everything manually as well as dependencies so I have to link thing manually
Maybe what is the main file to link in this liberary? I assumed its this on the bassis that its the only .js file with actuall code.
If you're looking for the CommonJS file, that's dist/mgrs.js
in the mgrs package.
I was using the mgrj.js from the main directory so I changed them but this one doesnt have a defaul export either. It seams I will have to get some tool to instal the lib for me. Thank you for ur time.
mgrs.js
in the root folder requires node or a bundler, and it only has named exports.
How can I make or where do I get a default function mgrs that proj4 requiers me to to have.
import mgrs from "../../mgrs/mgrs.js";
proj4.mgrs = mgrs;
I'm held up on this for weeks and cant find a way to fix it anywhere on the internet.