<script>
import commonMixin from '@/base/mixins/common.js'
import Gaode from '@/source/Gaode.js'
export default {
  name: 'bs-gaodelayer',
  render () { },
  mixins: [commonMixin('layer')],
  watch: {
  },
  methods: {
    load () {
      const { ol, map } = this
      const layer = new ol.layer.Tile({
        source: new Gaode({
          url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}'
        })
      })
      this.originInstance = layer
      map.addLayer(layer)
    }
  }
}
</script>
