<script>
import commonMixin from '@/base/mixins/common.js'
import Baidu from '@/source/Baidu.js'
export default {
  name: 'bs-baidulayer',
  render () { },
  mixins: [commonMixin('layer')],
  watch: {
  },
  methods: {
    load () {
      const { ol, map } = this
      const layer = new ol.layer.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>
