|
@@ -20,14 +20,14 @@ export function invokeParamsMap(mapId, ActionName, params) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-export function addPointSearchFun(mapId) {
|
|
|
+export function addJuHePointSearchFun(mapId) {
|
|
|
invokeParamsMap(mapId, 'MapClickAll', {
|
|
|
status: true,
|
|
|
is_draw: true,
|
|
|
is_code: false
|
|
|
});
|
|
|
}
|
|
|
-export function addPointSearch() {
|
|
|
+export function addJuHePointSearch() {
|
|
|
invokeParams('MapClickAll', {
|
|
|
status: true,
|
|
|
is_draw: true,
|
|
@@ -41,23 +41,22 @@ export function addPointSearch() {
|
|
|
* @param {*} param.imageUrl 打点图标,需要使用new URL(``, import.meta.url).href转为链接
|
|
|
* @param {*} param.url 数据源接口地址
|
|
|
*/
|
|
|
-export function addPoint(name) {
|
|
|
+export function addJuHePoint(name, data, label) {
|
|
|
invokeParams('ShowData', {
|
|
|
name: name,
|
|
|
data: {
|
|
|
- url: './Data/area.json',
|
|
|
- parsedata: 'function(d){return d}',
|
|
|
+ content: data,
|
|
|
parsegeometry: 'function(item){return {x:Number(item.x),y:Number(item.y)}}'
|
|
|
},
|
|
|
legendVisible: false,
|
|
|
popupEnabled: false,
|
|
|
renderer: {
|
|
|
type: 'simple',
|
|
|
- label: '测试车辆',
|
|
|
+ label: label,
|
|
|
visualVariables: [],
|
|
|
symbol: {
|
|
|
type: 'simple-marker',
|
|
|
- size: 30,
|
|
|
+ size: 15,
|
|
|
color: 'rgba(0,128,255,0.4)',
|
|
|
outline: {
|
|
|
width: 0.5,
|
|
@@ -71,7 +70,7 @@ export function addPoint(name) {
|
|
|
},
|
|
|
featureReduction: {
|
|
|
type: 'cluster',
|
|
|
- clusterRadius: '100px',
|
|
|
+ clusterRadius: '150px',
|
|
|
popupTemplate: {
|
|
|
title: 'Cluster summary',
|
|
|
content: 'This cluster represents {cluster_count} earthquakes.',
|
|
@@ -85,8 +84,8 @@ export function addPoint(name) {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- clusterMinSize: '24px',
|
|
|
- clusterMaxSize: '60px',
|
|
|
+ clusterMinSize: '20px',
|
|
|
+ clusterMaxSize: '50px',
|
|
|
labelingInfo: [
|
|
|
{
|
|
|
deconflictionStrategy: 'none',
|
|
@@ -109,6 +108,61 @@ export function addPoint(name) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+// 简单打点
|
|
|
+export function addPoint(data, name) {
|
|
|
+ invokeParams('ShowData', {
|
|
|
+ name: name,
|
|
|
+ data: {
|
|
|
+ content: data,
|
|
|
+ parsegeometry: 'function(item){return {x:Number(item.x),y:Number(item.y)}}'
|
|
|
+ },
|
|
|
+ legendVisible: false,
|
|
|
+ popupEnabled: false,
|
|
|
+ renderer: {
|
|
|
+ type: 'simple',
|
|
|
+ label: '测试车辆',
|
|
|
+ visualVariables: [],
|
|
|
+ symbol: {
|
|
|
+ type: 'simple-marker',
|
|
|
+ size: 10,
|
|
|
+ color: 'rgba(0,128,255,0.4)',
|
|
|
+ outline: {
|
|
|
+ width: 0.5,
|
|
|
+ color: '#0080FF'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+// 简单打点
|
|
|
+export function replacePoint(data, name) {
|
|
|
+ invokeParams('ShowData', {
|
|
|
+ name: name,
|
|
|
+ mode: 'replace',
|
|
|
+ data: {
|
|
|
+ content: data,
|
|
|
+ parsegeometry: 'function(item){return {x:Number(item.x),y:Number(item.y)}}'
|
|
|
+ },
|
|
|
+ legendVisible: false,
|
|
|
+ popupEnabled: false,
|
|
|
+ renderer: {
|
|
|
+ type: 'simple',
|
|
|
+ label: '测试车辆',
|
|
|
+ visualVariables: [],
|
|
|
+ symbol: {
|
|
|
+ type: 'simple-marker',
|
|
|
+ size: 10,
|
|
|
+ color: 'rgba(0,128,255,0.4)',
|
|
|
+ outline: {
|
|
|
+ width: 0.5,
|
|
|
+ color: '#0080FF'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 带图标打点
|
|
|
* @param {*} name 打点方法name,关闭时可做标识用
|
|
@@ -147,7 +201,7 @@ export function addImagePoint(name, params) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-//电线面隐藏
|
|
|
+//点线面隐藏
|
|
|
export function closePoint(name) {
|
|
|
invokeParams('ShowData', {
|
|
|
name: name,
|
|
@@ -282,6 +336,7 @@ export function startBidding(visible = true) {
|
|
|
type: 'point', //'point',
|
|
|
visible: visible,
|
|
|
isTools: true,
|
|
|
+ isLocate: true,
|
|
|
position: 'top-right',
|
|
|
activeSymbol: {
|
|
|
type: 'simple-marker',
|
|
@@ -296,12 +351,12 @@ export function startBidding(visible = true) {
|
|
|
}
|
|
|
|
|
|
//画线
|
|
|
-export function addPolyLine(data) {
|
|
|
+export function addPolyLine(data, name) {
|
|
|
invokeParams('ShowData', {
|
|
|
- name: 'car_layer1',
|
|
|
+ name: name || 'layer1',
|
|
|
type: 'polyline',
|
|
|
data: {
|
|
|
- url: data,
|
|
|
+ content: data,
|
|
|
parsegeometry: "function(item){return [Number(item['x']), Number(item['y'])]}"
|
|
|
},
|
|
|
legendVisible: false,
|
|
@@ -317,7 +372,7 @@ export function addPolyLine(data) {
|
|
|
type: 'line',
|
|
|
size: 2,
|
|
|
material: {
|
|
|
- color: 'black'
|
|
|
+ color: 'red'
|
|
|
},
|
|
|
cap: 'round',
|
|
|
join: 'round'
|
|
@@ -398,3 +453,29 @@ export function addArcgisMap() {
|
|
|
type: 'wmts'
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+//开始输出点坐标点
|
|
|
+export function startOutputPoint() {
|
|
|
+ invokeParams('outputClickPosition', {
|
|
|
+ type: 'position',
|
|
|
+ mode: 'start',
|
|
|
+ popupEnabled: false,
|
|
|
+ symbol: {
|
|
|
+ type: 'simple-marker',
|
|
|
+ size: 6,
|
|
|
+ color: 'black',
|
|
|
+ outline: {
|
|
|
+ width: 0.5,
|
|
|
+ color: 'white'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+//关闭输出点坐标
|
|
|
+export function closeOutputPoint() {
|
|
|
+ invokeParams('outputClickPosition', {
|
|
|
+ type: 'position',
|
|
|
+ mode: 'stop'
|
|
|
+ });
|
|
|
+}
|