maptalks / maptalks.three

A maptalks layer to render with three.js.
https://deyihu.github.io/maptalks.three.website/
MIT License
567 stars 129 forks source link

coordinate type is error,it should be Coordinate #299

Open deyihu opened 3 years ago

deyihu commented 3 years ago

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 commented 10 months ago

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 commented 3 weeks ago

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

https://github.com/maptalks/maptalks.three/blob/24399847dc926640d311cd547dec2ad88328703b/rollup.config.js#L84

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

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

@Vairgrys

NozoSen commented 3 weeks ago

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