Commit 72685f74 authored by 高晓帆's avatar 高晓帆

fix

parent aee8262a
{
"SERVICE_IP": "126.0.0.34:1234",
"MAP_CENTER": [39.74441007068,111.24544532751],
"version": "1.1.3"
}
\ No newline at end of file
{
"SERVICE_IP": "172.16.0.114:1234",
"MAP_CENTER": [39.74441007068,111.24544532751],
"version": "1.1.3"
}
\ No newline at end of file
{
"SERVICE_IP": "126.0.0.34:1234",
"MAP_CENTER": [39.74441007068,111.24544532751],
"version": "1.1.3"
}
\ No newline at end of file
{
"SERVICE_IP": "126.0.0.34:1234",
"MAP_CENTER": [39.74441007068,111.24544532751],
"version": "1.1.3"
}
\ No newline at end of file
{
"SERVICE_IP": "126.0.0.34:1234",
"MAP_CENTER": [39.74441007068,111.24544532751],
"version": "1.1.3"
}
\ No newline at end of file
{
"SERVICE_IP": "172.16.0.114:1234",
"MAP_CENTER": [39.74441007068,111.24544532751],
"version": "1.1.3"
}
\ No newline at end of file
{
"SERVICE_IP": "172.16.0.114:1234",
"MAP_CENTER": [39.74441007068,111.24544532751],
"version": "1.1.3"
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
const namergbaMap = {
'aliceblue': 'rgba(240,248,255)',
'antiquewhite': 'rgba(250,235,215)',
'aqua': 'rgba(0,255,255)',
'auqamarin': 'rgba(127,255,170)',
'azure': 'rgba(240,255,255)',
'beige': 'rgba(107,142,35)',
'bisque': 'rgba(255,228,196)',
'black': 'rgba(0,0,0)',
'blanchedalmond': 'rgba(255,235,205)',
'blue': 'rgba(0,0,255)',
'blueviolet': 'rgba(138,43,226)',
'brown': 'rgba(165,42,42)',
'brulywood': 'rgba(222,184,135)',
'cadetblue': 'rgba(95,158,160)',
'chartreuse': 'rgba(127,255,0)',
'chocolate': 'rgba(210,105,30)',
'coral': 'rgba(255,127,80)',
'cornflowerblue': 'rgba(100,149,237)',
'cornislk': 'rgba(255,248,220)',
'crimson': 'rgba(220,20,60)',
'cyan': 'rgba(0,255,255)',
'darkblue': 'rgba(0,0,139)',
'darkcyan': 'rgba(0,139,139)',
'darkgray': 'rgba(169,169,169)',
'darkgreen': 'rgba(0,100,0)',
'darkkhaki': 'rgba(189,183,107)',
'darkmagenta': 'rgba(139,0,139)',
'darkorange': 'rgba(255,140,0)',
'darkorchid': 'rgba(153,50,204)',
'darkred': 'rgba(139,0,0)',
'darksalmon': 'rgba(233,150,122)',
'darkseagreen': 'rgba(143,188,143)',
'darkslateblue': 'rgba(72,61,139)',
'darkslategray': 'rgba(47,79,79)',
'darkturquoise': 'rgba(0,206,209)',
'darkvoilet': 'rgba(148,0,211)',
'deeppink': 'rgba(255,20,147)',
'deepskyblue': 'rgba(0,191,255)',
'dimgray': 'rgba(105,105,105)',
'doderblue': 'rgba(30,144,255)',
'firebrick': 'rgba(178,34,34)',
'floralwhite': 'rgba(255,250,240)',
'forestgreen': 'rgba(34,139,34)',
'fuchsia': 'rgba(255,0,255)',
'gainsboro': 'rgba(220,220,220)',
'ghostwhite': 'rgba(248,248,255)',
'gold': 'rgba(255,215,0)',
'goldenrod': 'rgba(218,165,32)',
'gray': 'rgba(128,128,128)',
'green': 'rgba(0,128,0)',
'greenyellow': 'rgba(173,255,47)',
'honeydew': 'rgba(240,255,240)',
'hotpink': 'rgba(255,105,180)',
'indianred': 'rgba(205,92,92)',
'indigo': 'rgba(75,0,130)',
'ivory': 'rgba(255,255,240)',
'khaki': 'rgba(240,230,140)',
'lavender': 'rgba(230,230,250)',
'lavenderblush': 'rgba(255,240,245)',
'lawngreen': 'rgba(124,252,0)',
'lemonchiffon': 'rgba(255,250,205)',
'lightblue': 'rgba(173,216,230)',
'lightcoral': 'rgba(240,128,128)',
'lightcyan': 'rgba(225,255,255)',
'lightgoldenrodyellow': 'rgba(250,250,210)',
'lightgreen': 'rgba(144,238,144)',
'lightgrey': 'rgba(211,211,211)',
'lightpink': 'rgba(255,182,193)',
'lightsalmon': 'rgba(255,160,122)',
'lightseagreen': 'rgba(32,178,170)',
'lightskyblue': 'rgba(135,206,250)',
'lightslategray': 'rgba(119,136,153)',
'lightsteelblue': 'rgba(176,196,222)',
'lightyellow': 'rgba(255,255,224)',
'lime': 'rgba(0,255,0)',
'limegreen': 'rgba(50,205,50)',
'linen': 'rgba(250,240,230)',
'magenta': 'rgba(255,0,255)',
'maroon': 'rgba(128,0,0)',
'mediumaquamarine': 'rgba(0,250,154)',
'mediumblue': 'rgba(0,0,205)',
'mediumorchid': 'rgba(186,85,211)',
'mediumpurple': 'rgba(147,112,219)',
'mediumslateblue': 'rgba(123,104,238)',
'mediumspringgreen': 'rgba(245,255,250)',
'mediumturquoise': 'rgba(72,209,204)',
'mediumvioletred': 'rgba(199,21,133)',
'midnightblue': 'rgba(25,25,112)',
'mintcream': 'rgba(0,255,127)',
'mistyrose': 'rgba(255,228,225)',
'moccasin': 'rgba(255,228,181)',
'navajowhite': 'rgba(255,222,173)',
'navy': 'rgba(0,0,128)',
'oldlace': 'rgba(253,245,230)',
'olive': 'rgba(128,128,0)',
'olivedrab': 'rgba(85,107,47)',
'orange': 'rgba(255,165,0)',
'orangered': 'rgba(255,69,0)',
'orchid': 'rgba(218,112,214)',
'palegodenrod': 'rgba(238,232,170)',
'palegreen': 'rgba(152,251,152)',
'paleturquoise': 'rgba(175,238,238)',
'palevioletred': 'rgba(219,112,147)',
'papayawhip': 'rgba(255,239,213)',
'peachpuff': 'rgba(255,218,185)',
'peru': 'rgba(205,133,63)',
'pink': 'rgba(255,192,203)',
'plum': 'rgba(221,160,221)',
'powderblue': 'rgba(176,224,230)',
'purple': 'rgba(128,0,128)',
'red': 'rgba(255,0,0)',
'rosybrown': 'rgba(188,143,143)',
'royalblue': 'rgba(65,105,225)',
'saddlebrown': 'rgba(139,69,19)',
'salmon': 'rgba(250,128,114)',
'sandybrown': 'rgba(244,164,96)',
'seagreen': 'rgba(46,139,87)',
'seashell': 'rgba(255,245,238)',
'sienna': 'rgba(160,82,45)',
'silver': 'rgba(192,192,192)',
'skyblue': 'rgba(135,206,235)',
'slateblue': 'rgba(106,90,205)',
'slategray': 'rgba(112,128,144)',
'snow': 'rgba(255,250,250)',
'springgreen': 'rgba(60,179,113)',
'steelblue': 'rgba(70,130,180)',
'tan': 'rgba(210,180,140)',
'teal': 'rgba(0,128,128)',
'thistle': 'rgba(216,191,216)',
'tomato': 'rgba(255,99,71)',
'turquoise': 'rgba(64,224,208)',
'violet': 'rgba(238,130,238)',
'wheat': 'rgba(245,222,179)',
'white': 'rgba(255,255,255)',
'whitesmoke': 'rgba(245,245,245)',
'yellow': 'rgba(255,255,0)'
}
export { namergbaMap }
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -238,8 +238,8 @@ function dealMapPath(value, layerName, color) { ...@@ -238,8 +238,8 @@ function dealMapPath(value, layerName, color) {
mapLayers[`${layerName}Buffer`] = `${layerName}Buffer` mapLayers[`${layerName}Buffer`] = `${layerName}Buffer`
} else { } else {
// console.log(map) // console.log(map)
value!=null&&map.removeLayer('map', layerName) value != null && map.removeLayer('map', layerName)
value!=null&&map.removeLayer('map', layerName + 'Buffer') value != null && map.removeLayer('map', layerName + 'Buffer')
} }
} }
...@@ -319,7 +319,7 @@ function dealSafe(vehicleID, safe) { ...@@ -319,7 +319,7 @@ function dealSafe(vehicleID, safe) {
getLineWidth: 0.4 getLineWidth: 0.4
}, vehicleID + i) }, vehicleID + i)
} else { } else {
map.creatCircle({coordinates:[vehicleLongtitude, vehicleLatitude]}, { map.creatCircle({ coordinates: [vehicleLongtitude, vehicleLatitude] }, {
getFillColor: f => map.convertColor(safe_color, 0.4), getFillColor: f => map.convertColor(safe_color, 0.4),
getLineColor: f => map.convertColor(safe_color), getLineColor: f => map.convertColor(safe_color),
getLineWidth: 0.4, getLineWidth: 0.4,
...@@ -341,7 +341,7 @@ function dealTraj(vehicleID, traj) { ...@@ -341,7 +341,7 @@ function dealTraj(vehicleID, traj) {
const zIndex = LAYER_PROPOITY['traj'] const zIndex = LAYER_PROPOITY['traj']
if ([1, 20, 21].includes(vehicleType) && radius) { if ([1, 20, 21].includes(vehicleType) && radius) {
map.creatCircle({coordinates:[vehicleLongtitude, vehicleLatitude]}, { map.creatCircle({ coordinates: [vehicleLongtitude, vehicleLatitude] }, {
getFillColor: f => map.convertColor('#FFA500'), getFillColor: f => map.convertColor('#FFA500'),
getLineColor: f => map.convertColor('#FFA500'), getLineColor: f => map.convertColor('#FFA500'),
getLineWidth: 1, getLineWidth: 1,
...@@ -350,6 +350,7 @@ function dealTraj(vehicleID, traj) { ...@@ -350,6 +350,7 @@ function dealTraj(vehicleID, traj) {
safeTrajs[vehicleID]['circle'] = vehicleID safeTrajs[vehicleID]['circle'] = vehicleID
} else { } else {
if (dealedData && !dealedData.length) return; if (dealedData && !dealedData.length) return;
if (dealedData == undefined) return;
const lineGeo = turf.lineString([...map.coorReverse(JSON.parse(JSON.stringify(dealedData)))]) const lineGeo = turf.lineString([...map.coorReverse(JSON.parse(JSON.stringify(dealedData)))])
// safeTrajs[vehicleID]['path'] = path // safeTrajs[vehicleID]['path'] = path
let bufferLine = turf.buffer(lineGeo, trajPathWid / 2, { units: "meters" }) let bufferLine = turf.buffer(lineGeo, trajPathWid / 2, { units: "meters" })
...@@ -481,7 +482,7 @@ function dealObtacleData(value) { ...@@ -481,7 +482,7 @@ function dealObtacleData(value) {
}, 'obstacle') }, 'obstacle')
map.setLayerSortName('buffer', 'obstacleBuffer') map.setLayerSortName('buffer', 'obstacleBuffer')
map.creatCircle({coordinates:[centerLon, centerLat]}, { map.creatCircle({ coordinates: [centerLon, centerLat] }, {
getFillColor: f => map.convertColor(centerColor, 0.5), getFillColor: f => map.convertColor(centerColor, 0.5),
getLineColor: f => map.convertColor(centerColor, 0.5), getLineColor: f => map.convertColor(centerColor, 0.5),
getLineWidth: 0, getLineWidth: 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment