Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coordinate type is error,it should be Coordinate #299

Open
deyihu opened this issue Apr 6, 2021 · 3 comments
Open

coordinate type is error,it should be Coordinate #299

deyihu opened this issue Apr 6, 2021 · 3 comments

Comments

@deyihu
Copy link
Collaborator

deyihu commented Apr 6, 2021

If you report this error

you need

  
import * as maptalks from 'maptalks';
import * as THREE from 'three';
import { ThreeLayer } from 'maptalks.three';

instead of

//import * as maptalks from 'maptalks/dist/maptalks.js';
import * as maptalks from 'maptalks/dist/maptalks.min.js';
import * as THREE from 'three';
import { ThreeLayer } from 'maptalks.three';

Otherwise, the webpack will be packaged maptalks.es.js and maptalks.js/maptalks . min.js

@Vairgrys
Copy link

hi, i'm trying to translate to spanish this tool, but im getting this error, i'm aware about the usage that makes this error, but i need to integrate the lib into a project while coding my fork of maptalks, i use npm link to point to the package while is runing on build mode so it would listen to the changes every time it gets builded.

npm link path/to/forked/maptalks/
is creating this path in package.json using the js file
image

Is this correct? or i am missing something else?

@deyihu
Copy link
Collaborator Author

deyihu commented Aug 23, 2024

You don't need to package maptalks. Wait until maptalks is modified before packaging. Generally, packaging tools will provide externals functionality

external: ['maptalks', 'three'],

https://rollupjs.org/configuration-options/#output-globals

<script src='your maptalks files '></script>

@Vairgrys

@NozoSen
Copy link

NozoSen commented Aug 23, 2024

hi, I work in an index.html format. Is there a way to fix this issue with it?
I am quite new to this so I use the exemples from the maptalks website, and they are in html so i've gone for that. here are the imports I have :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants