|
@@ -193,26 +193,26 @@
|
|
|
_coordinates1.push(Number(_position1[1]))
|
|
|
_coordinates1.push(Number(_position1[0]))
|
|
|
let _obj1 = {
|
|
|
- "type": "Feature",
|
|
|
- "properties": {
|
|
|
- "type": i,
|
|
|
+ 'type': 'Feature',
|
|
|
+ 'properties': {
|
|
|
+ 'type': i,
|
|
|
},
|
|
|
- "geometry": {
|
|
|
- "type": "Point",
|
|
|
- "coordinates": _coordinates1
|
|
|
+ 'geometry': {
|
|
|
+ 'type': 'Point',
|
|
|
+ 'coordinates': _coordinates1
|
|
|
}
|
|
|
}
|
|
|
let _position11 = _data.startPlace ? _data.startPlace.split(',') : []
|
|
|
_coordinates11.push(Number(_position11[1]))
|
|
|
_coordinates11.push(Number(_position11[0]))
|
|
|
let _obj11 = {
|
|
|
- "type": "Feature",
|
|
|
- "properties": {
|
|
|
- "type": i,
|
|
|
+ 'type': 'Feature',
|
|
|
+ 'properties': {
|
|
|
+ 'type': i,
|
|
|
},
|
|
|
- "geometry": {
|
|
|
- "type": "Point",
|
|
|
- "coordinates": _coordinates11
|
|
|
+ 'geometry': {
|
|
|
+ 'type': 'Point',
|
|
|
+ 'coordinates': _coordinates11
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -236,27 +236,27 @@
|
|
|
_marker.name = _data.name
|
|
|
this.markerList.push(_marker)
|
|
|
let _obj2 = {
|
|
|
- "type": "Feature",
|
|
|
- "properties": {
|
|
|
+ 'type': 'Feature',
|
|
|
+ 'properties': {
|
|
|
|
|
|
},
|
|
|
- "geometry": {
|
|
|
- "type": "LineString",
|
|
|
- "coordinates": _coordinates2
|
|
|
+ 'geometry': {
|
|
|
+ 'type': 'LineString',
|
|
|
+ 'coordinates': _coordinates2
|
|
|
}
|
|
|
}
|
|
|
_features2.push(_obj2)
|
|
|
}
|
|
|
this.mapPointData = {
|
|
|
- "type": "FeatureCollection",
|
|
|
- "features": _features1
|
|
|
+ 'type': 'FeatureCollection',
|
|
|
+ 'features': _features1
|
|
|
}
|
|
|
this.mapLineData = {
|
|
|
- "type": "FeatureCollection",
|
|
|
- "features": _features2
|
|
|
+ 'type': 'FeatureCollection',
|
|
|
+ 'features': _features2
|
|
|
}
|
|
|
- console.log("this.mapPointData", this.mapPointData)
|
|
|
- console.log("this.mapPointData", this.mapLineData)
|
|
|
+ console.log('this.mapPointData', this.mapPointData)
|
|
|
+ console.log('this.mapPointData', this.mapLineData)
|
|
|
|
|
|
},
|
|
|
loadmap(val) {
|
|
@@ -289,7 +289,7 @@
|
|
|
map.add(marker);
|
|
|
marker.setLabel({
|
|
|
offset: new AMap.Pixel(0, 0), //设置文本标注偏移量
|
|
|
- content: "<div class = 'maker-item'>" + this.markerList[i].name + "</div>", //设置文本标注内容
|
|
|
+ content: '<div class = \'maker-item\'>' + this.markerList[i].name + '</div>', //设置文本标注内容
|
|
|
direction: 'right' //设置文本标注方位
|
|
|
|
|
|
});
|