|
@@ -57,27 +57,27 @@ export const useShipMapStore = defineStore('shipMap', () => {
|
|
|
state.map = map
|
|
|
state.mapFunc = mapFunc
|
|
|
state.zoom = state.map.getView().getZoom()
|
|
|
- // state.map.on('movestart', e => {
|
|
|
- // map.un('pointermove', mapPointerMove)
|
|
|
- // map.un('singleclick', mapSingleClick)
|
|
|
- // })
|
|
|
- // state.map.on('moveend', e => {
|
|
|
- // state.trackHover = new Date().getTime()
|
|
|
- // state.zoom = e.map.getView().getZoom()
|
|
|
- // switchZoom()
|
|
|
- // map.on('singleclick', mapSingleClick)
|
|
|
- // map.on('pointermove', mapPointerMove)
|
|
|
- // })
|
|
|
- // state.ws.overlayTrack = new ol.Overlay({
|
|
|
- // element: trackPointDom,
|
|
|
- // autoPan: false,
|
|
|
- // offset: [0, -22],
|
|
|
- // positioning: 'bottom-center',
|
|
|
- // stopEvent: true,
|
|
|
- // })
|
|
|
- // state.map.addOverlay(state.ws.overlayTrack)
|
|
|
+ state.map.on('movestart', e => {
|
|
|
+ map.un('pointermove', mapPointerMove)
|
|
|
+ map.un('singleclick', mapSingleClick)
|
|
|
+ })
|
|
|
+ state.map.on('moveend', e => {
|
|
|
+ state.trackHover = new Date().getTime()
|
|
|
+ state.zoom = e.map.getView().getZoom()
|
|
|
+ switchZoom()
|
|
|
+ map.on('singleclick', mapSingleClick)
|
|
|
+ map.on('pointermove', mapPointerMove)
|
|
|
+ })
|
|
|
+ state.ws.overlayTrack = new ol.Overlay({
|
|
|
+ element: trackPointDom,
|
|
|
+ autoPan: false,
|
|
|
+ offset: [0, -22],
|
|
|
+ positioning: 'bottom-center',
|
|
|
+ stopEvent: true,
|
|
|
+ })
|
|
|
+ state.map.addOverlay(state.ws.overlayTrack)
|
|
|
// 预警助手
|
|
|
- initWarningWS()
|
|
|
+ // initWarningWS()
|
|
|
}
|
|
|
const mapPointerMove = (ev) => {
|
|
|
let pixel = ev.pixel
|
|
@@ -275,11 +275,11 @@ export const useShipMapStore = defineStore('shipMap', () => {
|
|
|
})
|
|
|
}
|
|
|
const _tileWMS = new source.TileWMS({
|
|
|
- url: `/geoserver-api/geoserver/redis/wms`,
|
|
|
+ url: `/geoserver-api/geoserver/kafka/wms`,
|
|
|
params: {
|
|
|
'FORMAT': 'image/png8',
|
|
|
'VERSION': '1.1.1',
|
|
|
- LAYERS: 'redis:geo_fusion_ship',
|
|
|
+ LAYERS: 'kafka:fusion',
|
|
|
"exceptions": 'application/vnd.ogc.se_inimage',
|
|
|
// CQL_FILTER: CQL,
|
|
|
refresh: new Date().getTime()
|