ol.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * @Description: ol
  3. * @Author: Napier
  4. * @LastEditors: Napier
  5. * @LastEditTime: 2021-09-06 12:20:24
  6. */
  7. import View from 'ol/View'
  8. import Map from 'ol/Map'
  9. import Feature from 'ol/Feature'
  10. import Overlay from 'ol/Overlay'
  11. import Tile from 'ol/layer/Tile'
  12. import Image from 'ol/layer/Image'
  13. import Vector from 'ol/layer/Vector'
  14. import XYZ from 'ol/source/XYZ'
  15. import WMTS from 'ol/source/WMTS'
  16. import VectorSource from 'ol/source/Vector'
  17. import WFS from 'ol/format/WFS'
  18. import GeoJSON from 'ol/format/GeoJSON'
  19. import OSM from 'ol/source/OSM.js'
  20. import TileWMS from 'ol/source/TileWMS.js'
  21. import ImageWMS from 'ol/source/ImageWMS.js'
  22. import Point from 'ol/geom/Point'
  23. import Style from 'ol/style/Style'
  24. import Stroke from 'ol/style/Stroke'
  25. import Fill from 'ol/style/Fill'
  26. import {transform, fromLonLat, toLonLat} from 'ol/proj'
  27. import ImageStyle from 'ol/style/Image'
  28. import Icon from 'ol/style/Icon'
  29. import Draw from 'ol/interaction/Draw'
  30. import Circle from 'ol/style/Circle'
  31. import ZoomToExtent from 'ol/control/ZoomToExtent'
  32. import { buffer } from 'ol/extent'
  33. import {unByKey} from 'ol/Observable'
  34. let ol = {
  35. View: View,
  36. Map: Map,
  37. Feature: Feature,
  38. Overlay: Overlay,
  39. observable: {
  40. unByKey: unByKey
  41. },
  42. geom: {
  43. Point: Point
  44. },
  45. layer: {
  46. Tile: Tile,
  47. Image: Image,
  48. Vector: Vector,
  49. },
  50. control: {
  51. ZoomToExtent: ZoomToExtent
  52. },
  53. source: {
  54. Vector: VectorSource,
  55. WMTS: WMTS,
  56. OSM: OSM,
  57. TileWMS: TileWMS,
  58. ImageWMS: ImageWMS,
  59. XYZ: XYZ,
  60. },
  61. format: {
  62. WFS: WFS,
  63. GeoJSON: GeoJSON,
  64. },
  65. style: {
  66. Style: Style,
  67. Stroke: Stroke,
  68. Fill: Fill,
  69. Image: ImageStyle,
  70. Icon: Icon,
  71. Circle: Circle,
  72. },
  73. interaction: {
  74. Draw: Draw
  75. },
  76. proj: {
  77. transform: transform,
  78. fromLonLat: fromLonLat,
  79. toLonLat: toLonLat,
  80. },
  81. extent: {
  82. buffer: buffer
  83. }
  84. }
  85. export default ol