iDerekLi / amap-js

基于AMap高德地图构建的API加载器。
https://iderekli.github.io/amap-js
MIT License
30 stars 10 forks source link

how to load amap loca library #19

Closed tenstep closed 4 years ago

tenstep commented 4 years ago

there's loca-loader.js in lib directory, but how to use it? When i use it the same like AMapLoader, errors would appear as follow:

TypeError: amap_js__WEBPACK_IMPORTED_MODULE_10__.default.LocaLoader is not a constructor

iDerekLi commented 4 years ago

LocaLoader will be released in the next version. Currently it can be used directly by reference:

import LocaLoader from "amap-js/lib/loaders/loca-loader";
iDerekLi commented 4 years ago

🥳The new version has been released! ! ! Update and install v2.0.3 and higher (including v2.0.3) to use LocaLoader.