GithubHelp home page GithubHelp logo

Comments (6)

AxeMea avatar AxeMea commented on May 19, 2024

@zhangwei900808

你好,能贴下你的代码吗?

from vue-amap.

zhangwei900808 avatar zhangwei900808 commented on May 19, 2024
<template lang="html">
  <div class="amap-wrapper">
    <el-amap vid="amapDemo">
    </el-amap>
  </div>

</template>

<script>
export default {

}
</script>

<style lang="css">
.amap-wrapper {
  width: 500px;
  height: 500px;
}
</style>

from vue-amap.

zhangwei900808 avatar zhangwei900808 commented on May 19, 2024
<template lang="html">
  <map></map>
</template>

<script>
import Vue from 'vue'
// 引入vue-amap
import AMap from 'vue-amap';
import map from '../components/Map.vue'
Vue.use(AMap);

// 初始化vue-amap
AMap.initAMapApiLoader({
    // 高德的key
    key: '',
    // 插件集合
    plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor']
});

export default {
  components:{
    map
  }
}
</script>

<style lang="css">
</style>

from vue-amap.

zhangwei900808 avatar zhangwei900808 commented on May 19, 2024

能看出来什么问题吗

from vue-amap.

AxeMea avatar AxeMea commented on May 19, 2024

你能把 map 这个命名换一下吗比如换成 custom-map 这种,试一下。

from vue-amap.

zhangwei900808 avatar zhangwei900808 commented on May 19, 2024

对的,我刚换成下面那样就好了,原来是命名规范问题,谢了

export default {
  components:{
    'el-map':map
  }
}

from vue-amap.

Related Issues (20)

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.