DEMO
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="https://cdn-webgl.wrld3d.com/wrldjs/dist/latest/wrld.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.1/leaflet.css" rel="stylesheet" />
<title>My 3D test</title>
</head>
<body>
<div id="map" style=" 600px; height: 400px;"/>
<script src = "map.js"></script>
</body>
</html>
var map = L.eeGeo.map('map', '08642e3ee49efa6eb9b95bd46d246886', {
center: [51.50636846275352,-0.1219678466524272],
zoom: 15
});
var oPolygonPoints = [
[51.522771, -0.125772],
[51.521520, -0.124192],
[51.520631, -0.126358],
[51.521963, -0.127895]
];
var oPolygonPoints2 = [
[51.532771, -0.135772],
[51.531520, -0.134192],
[51.530631, -0.136358],
[51.531963, -0.137895]
];
for(var i = 0; i <= 150; i++){
L.Wrld.polygon(oPolygonPoints, {
altitudeOffset: i,
offsetFromSeaLevel: false
}).setColor([1, 1, 0, 0]).addTo(map);
}
for(var i = 0; i <= 300; i++){
L.Wrld.polygon(oPolygonPoints2, {
altitudeOffset: i,
offsetFromSeaLevel: false
}).setColor([1, 1, 0, 0]).addTo(map);
}
效果