|
@@ -161,7 +161,7 @@
|
|
|
AMapLoader.load({
|
|
|
"key": "211dd6f989e719022aaf47ddb0659c47", // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
|
"version": "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
|
- "plugins": ['plugin=AMap.Scale', 'AMap.ToolBar','AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Geocoder', 'AMap.DistrictSearch'],
|
|
|
+ "plugins": ['plugin=AMap.Scale', 'AMap.ToolBar'],
|
|
|
"Loca": { // 是否加载 Loca, 缺省不加载
|
|
|
"version": '2.0.0' // Loca 版本,缺省 1.3.2
|
|
|
},
|
|
@@ -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' //设置文本标注方位
|
|
|
|
|
|
});
|