Commit 6803348d by fengfan

map

parent f6a4dce2
......@@ -62,8 +62,32 @@
});
var SatelliteDown = new AMap.TileLayer.Satellite({
rejectMapMask: true,
// opacity:0.1,
zIndex: 0
});
//定义中国东南西北端点
var pNW = { lat: 59.1, lng: 73.1 }
var pNE = { lat: 59.1, lng: 136.1 }
var pSE = { lat: 3.1, lng: 136.1 }
var pSW = { lat: 3.1, lng: 73.1 }
var maskTileLayerBounds =new AMap.Bounds(pSW, pNE)
var canvas = document.createElement('canvas');
canvas.width = canvas.height = 200;
var context = canvas.getContext('2d')
context.fillStyle = 'rgb(0,0,0)';
context.fillRect(0,0,200,200);
var CanvasLayer = new AMap.CanvasLayer({
rejectMapMask: true,
opacity:0.9,
zIndex:8,
canvas: canvas,
bounds: new AMap.Bounds(
[pSW.lng, pSW.lat],
[pNE.lng, pNE.lat]
),
zooms: [3, 18],
});
// debugger
var RoadNet = new AMap.TileLayer.RoadNet({
rejectMapMask: true,
mapStyle: 'amap://styles/' + styleId
......@@ -90,7 +114,7 @@
result.districtList[0].center.lng,
result.districtList[0].center.lat
],
// mapStyle: 'amap://styles/' + styleId,
mapStyle: 'amap://styles/' + styleId,
disableSocket: true,
viewMode: '3D',
showLabel: false,
......@@ -101,7 +125,9 @@
// layers: [road, ]//Satellite,
});
map.add(Satellite);
map.add(CanvasLayer);
map.add(SatelliteDown);
map.getLayers()[0].setzIndex(1000)
findsubarea(result);
// map.getLayers()[0].setOpacity(0.5)
// var maskerIn = new AMap.Marker({
......
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