Commit 591804e9 by fengfan

map

parent 6d7360c2
...@@ -159,9 +159,9 @@ ...@@ -159,9 +159,9 @@
map: map map: map
}); });
} }
AMapUI.loadUI(['geo/DistrictExplorer'], function (DistrictExplorer) { // AMapUI.loadUI(['geo/DistrictExplorer'], function (DistrictExplorer) {
initMask(DistrictExplorer); // initMask(DistrictExplorer);
}); // });
// 获取人员信息 // 获取人员信息
$.getJSON('./personal.json').then(res => { $.getJSON('./personal.json').then(res => {
console.log(JSON.parse(res)); console.log(JSON.parse(res));
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
mask.push([bounds[i]]) mask.push([bounds[i]])
} }
map = new AMap.Map('container', { map = new AMap.Map('container', {
mask: mask, // mask: mask,
center: [ center: [
result.districtList[0].center.lng, result.districtList[0].center.lng,
result.districtList[0].center.lat result.districtList[0].center.lat
...@@ -124,10 +124,10 @@ ...@@ -124,10 +124,10 @@
// layers: [RoadNet,Satellite ]//Satellite, // layers: [RoadNet,Satellite ]//Satellite,
// layers: [road, ]//Satellite, // layers: [road, ]//Satellite,
}); });
map.add(Satellite); map.add(Satellite);//高亮mask 卫星图
map.add(CanvasLayer); map.add(CanvasLayer);// 半黑遮罩层
map.add(SatelliteDown); map.add(SatelliteDown);//底图 卫星图
map.getLayers()[0].setzIndex(1000) map.getLayers()[0].setzIndex(1000);//个性地图置顶
findsubarea(result); findsubarea(result);
// map.getLayers()[0].setOpacity(0.5) // map.getLayers()[0].setOpacity(0.5)
// var maskerIn = new AMap.Marker({ // var maskerIn = new AMap.Marker({
...@@ -159,9 +159,9 @@ ...@@ -159,9 +159,9 @@
map: map map: map
}); });
} }
AMapUI.loadUI(['geo/DistrictExplorer'], function (DistrictExplorer) { // AMapUI.loadUI(['geo/DistrictExplorer'], function (DistrictExplorer) {
initMask(DistrictExplorer); // initMask(DistrictExplorer);
}); // });
// 获取人员信息 // 获取人员信息
$.getJSON('./personal.json').then(res => { $.getJSON('./personal.json').then(res => {
console.log(JSON.parse(res)); console.log(JSON.parse(res));
...@@ -278,21 +278,23 @@ ...@@ -278,21 +278,23 @@
// } // }
// } // }
// ], // ],
zooms: [14, 20], // zooms: [1, 20],
center: new AMap.LngLat(Number(item.lon), Number(item.lat)), // center: new AMap.LngLat(Number(item.lon), Number(item.lat)),
position: new AMap.LngLat(Number(item.lon), Number(item.lat)), position: new AMap.LngLat(Number(item.lon), Number(item.lat)),
zIndex: 1000, // zIndex: 1000,
zoomStyleMapping: { // zoomStyleMapping: {
14: 0, // 14: 0,
15: 0, // 15: 0,
16: 0, // 16: 0,
17: 0, // 17: 0,
18: 0, // 18: 0,
19: 0, // 19: 0,
20: 0 // 20: 0
} // }
}); });
map.add(marker); console.log(marker);
// map.add(marker);
} }
console.log(AMap.ElasticMarker); console.log(AMap.ElasticMarker);
</script> </script>
......
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 sign in to comment