import ol from 'openlayers'
import 'openlayers/css/ol.css'
import BsMap from './map/Map.vue'
import BsView from './map/MapView.vue'
import BsStaticMap from './map/StaticMap.vue'
import BsMeasure from './controls/Measure.vue'
import BsNavigation from './controls/Navigation.vue'
import BsDraw from './controls/Draw.vue'
import BsOverviewMap from './controls/OverviewMap.vue'
import BsZoomBar from './controls/ZoomBar.vue'
// import BSzoomControl from './controls/zoomControl.vue'
import BsToolBar from './controls/ToolBar.vue'
import BsSelect from './controls/Select.vue'
import BsSnap from './controls/Snap.vue'
import BsEdit from './controls/Edit.vue'
import BsFeature from './controls/Feature.vue'
// import BsLoading from './controls/Loading.vue'
import BsStaticLayer from './layers/StaticLayer.vue'
import BsSuperMapLayer from './layers/SuperMapLayer.vue'
import BsBaiDuLayer from './layers/BaiDuLayer.vue'
import BsGaoDeLayer from './layers/GaoDeLayer.vue'
import BsGoogleLayer from './layers/GoogleLayer.vue'
import BsTianLayer from './layers/TianLayer.vue'
import BsWtmsLayer from './layers/WtmsLayer.vue'
import BsInfoWindow from './overlays/InfoWindow.vue'
import BstwinkFeature from './overlays/twinkFeature.vue'
import BsContextMenu from './context-menu/Menu.vue'
import BsLayer from './layers/VectorLayer.vue'
import BsLayerControl from './controls/LayerControl.vue'
import {
  generateID, getMapResolutions
} from './base/util.js'
import BsCompass from './controls/compass.vue'
import BsMapTypeSwitch from './controls/mapTypeSwitch.vue'
import {
  convertToFeature
} from './base/GeometryUtil'
import {
  getSybmol
} from './base/SymbolUtil'
export default {
  install(Vue) {
    Vue.prototype.ol = ol
    Vue.component('bs-map', BsMap)
    Vue.component('bs-view', BsView)
    Vue.component('bs-infowindow', BsInfoWindow)
    Vue.component('bs-twinkfeature', BstwinkFeature)
    Vue.component('bs-layer', BsLayer)
    Vue.component('bs-overview', BsOverviewMap)
    Vue.component('bs-layercontrol', BsLayerControl)
    Vue.component('bs-toolbar', BsToolBar)
    Vue.component('bs-measure', BsMeasure)
    Vue.component('bs-navigation', BsNavigation)
    Vue.component('bs-compass', BsCompass)
    Vue.component('bs-mapTypeSwitch', BsMapTypeSwitch)
    Vue.component('bs-zoombar', BsZoomBar)
    Vue.component('bs-draw', BsDraw)
    Vue.component('bs-contextmenu', BsContextMenu)
    Vue.component('bs-select', BsSelect)
    Vue.component('bs-snap', BsSnap)
    Vue.component('bs-edit', BsEdit)
    Vue.component('bs-feature', BsFeature)
      // Vue.component('bs-zoomControl', BSzoomControl)
      // Vue.component('bs-loading', BsLoading)
    Vue.component('bs-staticlayer', BsStaticLayer)
    Vue.component('bs-supermaplayer', BsSuperMapLayer)
    Vue.component('bs-wtmslayer', BsWtmsLayer)
    Vue.component('bs-baidulayer', BsBaiDuLayer)
    Vue.component('bs-gaodelayer', BsGaoDeLayer)
    Vue.component('bs-googlelayer', BsGoogleLayer)
    Vue.component('bs-tianlayer', BsTianLayer)
    Vue.component('bs-staticmap', BsStaticMap)
      // Vue.component('bm-point-collection', BmPointCollection)
      // Vue.component('bm-polyline', BmPolyline)
      // Vue.component('bm-polygon', BmPolygon)
      // Vue.component('bm-circle', BmCircle)
      // Vue.component('bm-ground', BmGround)
      // Vue.component('bm-label', BmLabel)
      // Vue.component('bm-info-window', BmInfoWindow)
      // Vue.component('bm-overlay', BmOverlay)
  }
}

export {
  BsMap,
  BsView,
  BsLayer,
  BsInfoWindow,
  BstwinkFeature,
  BsOverviewMap,
  BsLayerControl,
  BsNavigation,
  BsZoomBar,
  BsToolBar,
  BsDraw,
  BsMeasure,
  BsContextMenu,
  BsSelect,
  BsSnap,
  BsEdit,
  BsFeature,
  // BSzoomControl,
  // BsLoading,
  BsStaticLayer,
  BsSuperMapLayer,
  BsWtmsLayer,
  generateID,
  convertToFeature,
  getSybmol,
  getMapResolutions
}
