|
@@ -1,6 +1,6 @@
|
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
|
import { nanoid } from 'nanoid';
|
|
import { nanoid } from 'nanoid';
|
|
-import { deepClone } from '@/utils';
|
|
|
|
|
|
+import { deepClone, initDrag } from '@/utils';
|
|
import { mergeGeoJsonPolygons, wgs_gcj_encrypts } from '@/utils/gisUtils';
|
|
import { mergeGeoJsonPolygons, wgs_gcj_encrypts } from '@/utils/gisUtils';
|
|
|
|
|
|
export function useAMap(options) {
|
|
export function useAMap(options) {
|
|
@@ -257,6 +257,7 @@ export function useAMap(options) {
|
|
// 打开InfoWindow,并设置其内容和位置
|
|
// 打开InfoWindow,并设置其内容和位置
|
|
infoWindow.setContent(content);
|
|
infoWindow.setContent(content);
|
|
infoWindow.open(map, lnglat);
|
|
infoWindow.open(map, lnglat);
|
|
|
|
+ initDrag(infoWindow.dom);
|
|
// 解决2.0版本无法滚动问题
|
|
// 解决2.0版本无法滚动问题
|
|
infoWindow.on('mouseover', () => map.setStatus({ zoomEnable: false }));
|
|
infoWindow.on('mouseover', () => map.setStatus({ zoomEnable: false }));
|
|
infoWindow.on('mouseout', () => map.setStatus({ zoomEnable: true }));
|
|
infoWindow.on('mouseout', () => map.setStatus({ zoomEnable: true }));
|