Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (75 sloc) 2.23 KB
import WebScene = require("esri/WebScene");
import SceneLayer = require("esri/layers/SceneLayer");
import FeatureLayer = require("esri/layers/FeatureLayer");
import SimpleRenderer = require("esri/renderers/SimpleRenderer");
import PolygonSymbol3D = require("esri/symbols/PolygonSymbol3D");
import ClassBreaksRenderer = require("esri/renderers/ClassBreaksRenderer");
import MeshSymbol3D = require("esri/symbols/MeshSymbol3D");
import FillSymbol3DLayer = require("esri/symbols/FillSymbol3DLayer");
import SolidEdges3D = require("esri/symbols/edges/SolidEdges3D");
const webscene = new WebScene({
portalItem: {
id: "7c694e6a153345b1b882ba1bc59f96eb"
}
});
const buildingsLayer = new SceneLayer({
url: "http://services2.arcgis.com/cFEFS0EWrhfDeVw9/ArcGIS/rest/services/STM____F_Helsinki__Textured_buildings_with_attributes/SceneServer/layers/0",
elevationInfo: {
mode: "absolute-height",
offset: -2
},
renderer: new ClassBreaksRenderer({
field: "yearCompleted",
defaultSymbol: new MeshSymbol3D({
symbolLayers: [
new FillSymbol3DLayer({
material: {
color: "#ffffff",
colorMixMode: "replace"
},
edges: new SolidEdges3D({
color: [0, 0, 0, 0.9],
size: 1
})
})
]
}),
classBreakInfos: [{
minValue: 0,
maxValue: 1875,
symbol: new MeshSymbol3D({
symbolLayers: [
new FillSymbol3DLayer({
material: {
color: "#ffcc00",
colorMixMode: "replace"
},
edges: new SolidEdges3D({
color: [128, 102, 0, 1],
size: 2
})
})
]
})
}
]
})
});
const oldAreaLayer = new FeatureLayer({
url: "https://services2.arcgis.com/cFEFS0EWrhfDeVw9/ArcGIS/rest/services/helsinki_construction_area/FeatureServer/0",
renderer: new SimpleRenderer({
symbol: new PolygonSymbol3D({
symbolLayers: [new FillSymbol3DLayer({
material: {
color: "#ffcc00"
}
})]
})
}),
elevationInfo: {
mode: "on-the-ground"
},
opacity: 0.5
});
webscene.addMany([oldAreaLayer, buildingsLayer]);
export default webscene;
You can’t perform that action at this time.