Giter Site home page Giter Site logo

amap-js's Introduction

Hi! I'm Derek

用奉献精神和爱

I'm a Frontend Developer from China.

Top projects:

  • JueJin Helper 稀土掘金助手:签到、抽奖、沾喜气、消除Bug、海底掘金游戏、自动化工作流。
  • JueJin Numpuzz 一款稀土掘金 "数字谜题" 游戏快速解题运算助手.
  • Stocks Browser Extension 股票浏览器扩展: 轻松地跟踪您的股票和市场.
  • AMapJS 高德地图加载模块.

Languages and Tools:

javascript typescript vue react nodejs chrome-extension electron

DerkLi's Github Status

amap-js's People

Contributors

createitv avatar iderekli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

amap-js's Issues

how to load amap loca library

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

vue 项目中加载多次

import AMapJS from "amap-js";

多个页面引入的话就会加载多次 js 文件,怎么才能只加载一次呢

ES 方式 import 模块提示错误

ERROR  Failed to compile with 8 errors               friendly-errors 14:07:52

These dependencies were not found:                    friendly-errors 14:07:52
                                                      friendly-errors 14:07:52
* @babel/runtime-corejs2/core-js/promise in ./node_modules/amap-js/es/load.js, ./node_modules/amap-js/es/loaders/amap-jsapi-loader.js
* @babel/runtime-corejs2/core-js/reflect/construct in ./node_modules/amap-js/es/loaders/amap-jsapi-loader.js
* @babel/runtime-corejs2/core-js/symbol in ./node_modules/amap-js/es/loaders/amap-jsapi-loader.js
* @babel/runtime-corejs2/helpers/esm/extends in ./node_modules/amap-js/es/loaders/amap-jsapi-loader.js
* @babel/runtime-corejs2/helpers/esm/getPrototypeOf in ./node_modules/amap-js/es/loaders/amap-jsapi-loader.js
* @babel/runtime-corejs2/helpers/esm/inheritsLoose in ./node_modules/amap-js/es/loaders/amap-jsapi-loader.js
* @babel/runtime-corejs2/helpers/esm/possibleConstructorReturn in ./node_modules/amap-js/es/loaders/amap-jsapi-loader.js

相关依赖没有打包?

快速入门代码需要完善

import AMapJS from "amap-js";
// or
// import { AMapLoader, AMapUILoader, LocaLoader, ... } from 'amap-js';

// 创建AMapLoader
const loader = new AMapJS.AMapLoader({
  key: "您申请的高德Key值",
  version: "2.0",
  plugins: []
});

// 调用 load 方法完成加载并调用执行回调。
loader
  .load()
  .then(() => {
    // 加载完成
    console.log(AMap);
  })
  .catch(e => {
    // 加载失败
  });
  1. console.log(Amap)Amap从哪里来
  2. 应该加一点稍微进阶一点的能力,比如说加一个Walking的路线

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.