This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const renderer = new UniqueValueRenderer({ | |
| valueExpression: "$feature.pred_party", | |
| defaultSymbol: createSymbol("lightgray"), | |
| uniqueValueInfos: partyCodes.map(party => { | |
| return { | |
| value: party.field, | |
| symbol: createSymbol(party.color) | |
| } | |
| }) | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const electionLayer = new CSVLayer({ | |
| url: "./data/election_uat_final.csv", | |
| copyright: "BEC, ANCPI", | |
| title: "European Parliament Elections 2019 - Results in Romania" | |
| }); | |
| map.add(electionLayer); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const radius = 6358137; // approximate Earth radius in meters | |
| const origin = new Point({ | |
| x: 0, y: 0, z: -(2 * radius) | |
| }); | |
| const oceanSurface = new Graphic({ | |
| geometry: origin, | |
| symbol: { | |
| type: "point-3d", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fetchTile(level, row, col) { | |
| return this._elevation.fetchTile(level, row, col).then( | |
| function(data) { | |
| for (let i = 0; i < data.values.length; i++) { | |
| if (data.values[i] >= 0) { | |
| data.values[i] = data.values[i] * 60; | |
| } | |
| else { | |
| data.values[i] = data.values[i] * 40; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const basemap = new Basemap({ | |
| baseLayers: [ | |
| new TileLayer({ | |
| url: "https://tiles.arcgis.com/tiles/nGt4QxSblgDfeJn9/arcgis/rest/services/terrain_with_heavy_bathymetry/MapServer" | |
| }) | |
| ] | |
| }); | |
| const map = new Map({ | |
| basemap: basemap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #viewDiv canvas { | |
| filter: drop-shadow(0px 0px 5px rgb(86, 72, 31)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const view = require("esri/views/View").views.getItemAt(0); | |
| (function() { | |
| const p = view.camera.position; | |
| if (p.spatialReference.isWebMercator || p.spatialReference.isWGS84) { | |
| console.log(` | |
| { | |
| position: [ | |
| ${p.longitude.toFixed(8)}, | |
| ${p.latitude.toFixed(8)}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const hillsLayer = new FeatureLayer({ | |
| url: "https://services2.arcgis.com/cFEFS0EWrhfDeVw9/arcgis/rest/services/HillsZurichDemo/FeatureServer", | |
| elevationInfo: { | |
| mode: "absolute-height", | |
| featureExpressionInfo: { | |
| expression: "Pow(Geometry($feature).Z, 1.2)" | |
| } | |
| }, | |
| renderer: { | |
| type: "simple", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const renderer = { | |
| type: "simple", | |
| symbol: { | |
| type: "polygon-3d", | |
| symbolLayers: [{ | |
| type: "extrude", | |
| material: { | |
| color: [86, 72, 31] | |
| }, | |
| size: 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const contourLayer = new FeatureLayer({ | |
| url: "https://services2.arcgis.com/cFEFS0EWrhfDeVw9/arcgis/rest/services/ContourLinesZurichDemo/FeatureServer", | |
| elevationInfo: { | |
| mode: "absolute-height", | |
| featureExpressionInfo: { | |
| expression: "Pow($feature.elevation,1.2)" | |
| } | |
| }, | |
| renderer: { | |
| type: "simple", |