Browse Source

gis pinter img

dev
巴林闲侠 2 years ago
parent
commit
5cfd4b99ed
  1. BIN
      web/client/assets/images/gis/pointer.png
  2. 22
      web/client/src/sections/quanju/containers/public/olMap.js

BIN
web/client/assets/images/gis/pointer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

22
web/client/src/sections/quanju/containers/public/olMap.js

@ -164,7 +164,7 @@ const OlMap = (props) => {
setPointItem(d) setPointItem(d)
olMap.addOverlay('pointClickOpen', { olMap.addOverlay('pointClickOpen', {
id: 'pointClickOpen', id: 'pointClickOpen',
offset: [0, 25], // 偏移 offset: [0, 4], // 偏移
position: [d.longitude, d.latitude], // 坐标 position: [d.longitude, d.latitude], // 坐标
autoPan: true, autoPan: true,
autoPanMargin: 100, autoPanMargin: 100,
@ -178,9 +178,8 @@ const OlMap = (props) => {
], ],
style: { style: {
icon: { icon: {
src: '/assets/images/worker.png', src: '/assets/images/gis/pointer.png',
// anchor: [0.5, 1], scale: 1, // 图标引用
scale: 0.08, // 图标引用
}, },
// stroke: { width: 1, color: '#ffff00' }, // stroke: { width: 1, color: '#ffff00' },
// circle: { // circle: {
@ -191,9 +190,8 @@ const OlMap = (props) => {
}, },
selectStyle: { selectStyle: {
icon: { icon: {
src: '/assets/images/worker.png', src: '/assets/images/gis/pointer.png',
// anchor: [0.5, 1], scale: 1, // 图标引用
scale: 0.08, // 图标引用
}, },
// circle: { // circle: {
// radius: 16, // 直径 // radius: 16, // 直径
@ -224,7 +222,7 @@ const OlMap = (props) => {
setPointItem(d) setPointItem(d)
olMap.addOverlay('pointClickOpen', { olMap.addOverlay('pointClickOpen', {
id: 'pointClickOpen', id: 'pointClickOpen',
offset: [0, 25], // 偏移 offset: [0, 4], // 偏移
position: [d.longitude, d.latitude], // 坐标 position: [d.longitude, d.latitude], // 坐标
// position: [115.944220000000, 28.545380000000], // position: [115.944220000000, 28.545380000000],
autoPan: true, autoPan: true,
@ -240,14 +238,14 @@ const OlMap = (props) => {
], ],
style: { style: {
icon: { icon: {
src: '/assets/images/worker.png', src: '/assets/images/gis/pointer.png',
scale: 0.08, // 图标引用 scale: 1, // 图标引用
}, },
}, },
selectStyle: { selectStyle: {
icon: { icon: {
src: '/assets/images/worker.png', src: '/assets/images/gis/pointer.png',
scale: 0.08, // 图标引用 scale: 1, // 图标引用
}, },
}, },
layerName: 'geometry_road_' + index layerName: 'geometry_road_' + index

Loading…
Cancel
Save