POST
|
The LayerList widget actually has a little animated horizontal bar for each layer while it's loading and stops when is complete. See LayerList widget | ArcGIS API for JavaScript 4.2 .
... View more
01-30-2017
05:10 AM
|
1
|
0
|
3461
|
POST
|
Kristian, Thanks so much for all this wonderful feedback and for that JS Bin link showing me how to override the sizes. Very helpful. Yes, I figured the view scale automatically determined the symbol size, just wanted to tweak it a bit. Looking forward to your blog article when it comes out. David
... View more
01-27-2017
11:58 AM
|
0
|
0
|
825
|
POST
|
Hi Kristian, Thanks for all these details! I did some investigating and it turns out I get this error when using the "streets-relief-vector" basemap in my SceneView: d {name: "size-visual-variable:insufficient-info", message: "Unable to find size scheme", details: undefined}. But it works wonderfully if I use the "topo" basemap. Yes, this is very straightforward and love all the under the hood action here. The only thing I would really want to change programmatically is the min and max symbol size (the cylinders). Is there a way to adjust those properties? I tested this with all the basemap options and there are many this will not work with. Here are the results with their error messages: "streets" - works great "satellite" - [esri.views.SceneView] #pixelSizeAt() Scene view cannot be used before it is ready "hybrid" - works great "topo" - works great "gray" - works great "dark-gray" - [esri.views.SceneView] #pixelSizeAt() Scene view cannot be used before it is ready "oceans" - [esri.views.SceneView] #pixelSizeAt() Scene view cannot be used before it is ready "national-geographic" - works great "terrain" - [esri.views.SceneView] #pixelSizeAt() Scene view cannot be used before it is ready "osm" - [esri.views.SceneView] #pixelSizeAt() Scene view cannot be used before it is ready "dark-gray-vector" - [esri.views.SceneView] #pixelSizeAt() Scene view cannot be used before it is ready "gray-vector" - init.js:308 [esri.views.SceneView] #pixelSizeAt() Scene view cannot be used before it is ready "streets-vector" - [esri.views.SceneView] #pixelSizeAt() Scene view cannot be used before it is ready "topo-vector" - [esri.views.SceneView] #pixelSizeAt() Scene view cannot be used before it is ready "streets-night-vector" - d {name: "size-visual-variable:insufficient-info", message: "Unable to find size scheme", details: undefined} "streets-relief-vector" - d {name: "size-visual-variable:insufficient-info", message: "Unable to find size scheme", details: undefined} "streets-navigation-vector" - d {name: "size-visual-variable:insufficient-info", message: "Unable to find size scheme", details: undefined} Thank you, David
... View more
01-27-2017
05:37 AM
|
0
|
2
|
825
|
POST
|
So I love this great sample with the slider: Generate univariate continuous size and color visualization in 3D | ArcGIS API for JavaScript 4.2 and I want to do something just like this but instead using a simple schools wpoint FeatureLayer with number of students instead of cities with population like the sample shows. So I add in my code essentially based just like the sample code but just switching out for my schools FeatureLayer. I then get this error: there was an error: d {name: "size-visual-variable:insufficient-info", message: "Unable to find size scheme", details: undefined}. Turns out I need to set up my visualVariables (and statistics too) inside the colorAndSizeRendererCreator.createContinuousRenderer(params): var sizeVV = response.size.visualVariable;
var colorVV = response.color.visualVariable;
sliderParams.statistics = response.statistics;
sliderParams.visualVariables = [sizeVV, colorVV]; Turns out the FetureLayer in the sample has this all set up with "Drawing Info" in the FeatureLayer's service: https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/Enriched%20World%20Cities/FeatureServer/0 . So how do I set up these important statistics and visualVariables for my schools FeatureLayer by JS code. The snippets below the map in this sample page (Generate univariate continuous size and color visualization in 3D | ArcGIS API for JavaScript 4.2 ) are quite confusing. Is this refereing to the assigned renderer in my renderer: property in my FeatureLayer? // set the renderer to the layer povLyr.renderer = response.renderer; Ande where exacttly atre these sizeVV and colorVV coming from? They are not set up in my rendere. visualVariables: [ sizeVV, colorVV ]? // size/color visual variables returned from createContinuousRenderer(), There must be a straightforward code example to set up a common slider scenario with size, color, field max/min values, etc. The set-up for the Thematic multivariate 3D visualization shows very well the symbolization syntax (Thematic multivariate visualization (3D) | ArcGIS API for JavaScript 4.2 ) for this slide example I'm pretty lost. Any help is very much appreciated. Much Thanks, David
... View more
01-26-2017
09:27 AM
|
0
|
4
|
1695
|
POST
|
Are there shortcut keys available or a way to program shortcut keys to pan, tilt, and rotate the 3D view in a SceneView?
... View more
01-25-2017
01:37 PM
|
0
|
2
|
1540
|
POST
|
Rene, Ok this is great! Thanks so much for pointing me in the right direction. Here is my code snippet for clicking on the SceneView and getting elevation to apear in text display in lower-right corner of map. In Require([.... "esri/layers/FeatureLayer",
"dojo/promise/all", Get that handy World Elevation Layer: // Create elevation layer
var worldGround = new ElevationLayer({
url: "http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
});
//Construct Map
var map = new Map({
basemap: "streets-relief-vector",
showAttribution: false,
//ground: "world-elevation"
ground: {
layers: [worldGround]
}
}); Code that gets elevation: //Click on View for elevation to display
var resultsContainer = document.getElementById("resultsDiv");
view.on("click", function (event) {
resultsContainer.innerHTML = "Querying elevation...";
// Query both elevation layers for the elevation at the clicked map position
var position = event.mapPoint;
var queryWorldElevation = worldGround.queryElevation(
position);;
// When both query promises resolve execute the following code
all([queryWorldElevation])
.then(function (results) {
var posBeforeLandslide = results[0].geometry;
// Compute and display the difference in elevation
var elevationMeters = Math.abs(posBeforeLandslide.z);
elevationFeet = (elevationMeters / 0.3048);
resultsContainer.innerHTML = "Elevation: " +
elevationMeters.toFixed(2) + " meters, " + elevationFeet.toFixed(0) + " feet";
})
.otherwise(function (error) {
resultsContainer.innerHTML = "Elevation query failed (" +
error.message + ")";
});
}); My elevation display div in <body>: <!-- Display coordinates -->
<span id="resultsDiv" style="position:absolute; right:15px; bottom:30px; font-size:15px; color: cornflowerblue; font-weight: bold; color:#759dc0; z-index:50;">Click map for elevation</span>
... View more
01-25-2017
07:47 AM
|
1
|
0
|
496
|
POST
|
Is there a way to click the SceneView to capture the elevation info of the the default "world-elevation" layer ? Getting coordinates can be done fairly easily (see code below) but can the same kind of thing be done to get an elevation reading when the user clicks on the SceneView? The ImageServiceIdentifyTask seems to be only for an added custom ElevationLayer and the documentation is a bit confusing. //Click on View for coordinates to display view.on("click", function (event) { // Get the coordinates of the click on the view var lat = Math.round(event.mapPoint.latitude * 1000) / 1000; var lon = Math.round(event.mapPoint.longitude * 1000) / 1000; setTimeout(function () { dom.byId("info").innerHTML = lat + ", " + lon; }, 50); });
... View more
01-24-2017
01:51 PM
|
0
|
3
|
1248
|
POST
|
OK, thanks so much Raluca. He is the code that worked for me. Code from David Coley at this post https://community.esri.com/message/636169-jsapi-40-popup-set-highlight-graphic-on-feature-layer-click?q=4%20highlight%20cli… helped as well. view.on("click", function (event) { //hitTest used to create a selection graphic for the popup
view.hitTest(event.screenPoint).then(function (response) { //screenPoint
var resultGraphic = response.results[0].graphic;
var symbol = new PointSymbol3D({
symbolLayers: [new ObjectSymbol3DLayer({
width: 400,
height: 400,
anchor: "bottom",
resource: {
primitive: "cube"
},
material: {
color: [85, 255, 0, 0.5]
}
})]
});
view.graphics.removeAll();
if (resultGraphic) {
var selectionGraphic = resultGraphic.clone();
selectionGraphic.symbol = symbol;
view.graphics.add(selectionGraphic);
}
});
});
... View more
01-24-2017
01:34 PM
|
0
|
0
|
329
|
POST
|
Robert, yep, that did it. Thanks so much! I did also see your setTimeout solution for another post in using view.goTo. Looks like a common theme here in use of the 3D SceneView.
... View more
01-24-2017
12:02 PM
|
0
|
0
|
503
|
POST
|
Ah yes, I see those 3D labels in the sample now. I must have been seeing things, I'm getting old. My source layer came from HTTP instead of HTTPS which was the problem. I do happen to have this Feature layer on HTTPS in a different server so that should do the trick. Didn't see this important detail in the documentation so much thanks for this tip. Wonder why you have to have HTTPS for labels? I don't need it for other 3D symbols of the FeatureLayer such as points.
... View more
01-24-2017
11:53 AM
|
0
|
1
|
426
|
POST
|
Is there a way to have my 3D point symbols (primitive: "cube" in this case) highlighted in some way when I click them for a popup in the 3D SceneView?
... View more
01-24-2017
05:28 AM
|
0
|
2
|
1298
|
POST
|
Does the sample here Get started with popups | ArcGIS API for JavaScript 4.2 work in SceneView? Can I capture coordinates in a SceneView? Can they be captured with mouse-move or mouse-drag events?
... View more
01-24-2017
05:25 AM
|
0
|
2
|
1549
|
POST
|
I would like to get 3D labels to appear from my FeatureLayers just like what is shown on the image of County labels here: LabelSymbol3D | API Reference | ArcGIS API for JavaScript 4.2 . The code snipped looks easy enough but does not seem to work for me an no labels appear. A sample link is listed in the page above but no 3D labels appear there as well and that sample has the same code snippet: Flat vs. volumetric 3D symbol layers | ArcGIS API for JavaScript 4.2 . Is there code missing to get these 3D labels to appear for you FeatureLayer?
... View more
01-24-2017
05:18 AM
|
0
|
4
|
1382
|
Title | Kudos | Posted |
---|---|---|
1 | 10-08-2015 06:32 AM | |
1 | 10-07-2015 07:26 AM | |
1 | 06-13-2016 02:02 PM | |
1 | 06-17-2016 07:23 AM | |
1 | 03-07-2016 05:54 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|