<script>
import Gaode from '../source/Gaode.js'
import Tile from 'ol/source/Tile'
export default {
  name: 'sl-gaode-layer',
  render (h) { },
  watch: {
  },
  methods: {
    load () {
      const { map } = this
      const layer = new 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>
