ElemeFE / vue-amap

🌍 基于 Vue 2.x 和高德地图的地图组件
https://elemefe.github.io/vue-amap/
MIT License
3.35k stars 586 forks source link

[feat] Map Layer #51

Closed Necmttn closed 7 years ago

Necmttn commented 7 years ago

Is there any code examples or doc i can refer for it.

AxeMea commented 7 years ago

@Necmttn

Like AMap.TileLayer.Traffic , AMap.ImageLayer ?

We don't support these feature now. if you wanna it on latest version, you can do like these.

<el-amap :vid="'amap-vue'">
</el-amap>
export default {
  data() {
    return {
      events: {
        init(o) {
         // o is Gaode map instance
         // you can find it in
         // http://lbs.amap.com/api/javascript-api/example/layers/imagelayer
          var imageLayer = new AMap.ImageLayer(...);
          imageLayer.setMap(o);
        }  
      }  
    };
  }
}

But we don't recommend you to use it by this way. if you need this feature, we can add it as soon as possible

Necmttn commented 7 years ago

Yeah it would be great. let me know if is there anything i could help.

Necmttn commented 7 years ago

the main reason I needed map layers was I wanted to use http://lbs.amap.com/api/javascript-api/example/layers/satellite

but with toolbar plugin I have achieve my goal. It's also make it available traffic layer. with almost zero config.

plugin: ['ToolBar', 'OverView', {
          pName: 'MapType',
          defaultType: 0,
        }],
LabiKyo commented 7 years ago

why is this issue closed? couldn't find any info about how to use a TileLayer.