<script>
import Baidu from '../source/Baidu.js'
import Tile from 'ol/source/Tile'
export default {
  name: 'sl-baidu-layer',
  render (h) { },
  watch: {
  },
  methods: {
    load () {
      const { map } = this
      const layer = new Tile({
        source: new Baidu({
          origin: [43.88955327932, 12.590178885765],
          url: 'http://online{0-3}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&udt=20170607&scaler=1&p=1'
        })
      })
      this.originInstance = layer
      map.addLayer(layer)
    }
  }
}
</script>
