|
POST
|
According to the doc, we need to listen to the 'calciteDropdownSelect' event on the calcite-dropdown element. In your code you retrieve the selected item information later on, so you can use the 'selectedItems' property to discover this information. Here's a slightly updated version of your CodePen that shows these concepts: https://codepen.io/john-grayson/pen/JjNappM
... View more
08-04-2021
01:34 PM
|
1
|
1
|
3403
|
|
POST
|
Hard to tell what could be going on with the data/symbol/code unless we can experience your specific issue. Here's the doc in case there's something in there that might help: RealWorldSize and a sample (with Codepen you might be able to fork/modify to your data/symbol) Also, according to the doc, for CIM symbols "...the size value is only applied to the largest symbol layer instead of the full symbol. All other symbol layers will scale proportionally."
... View more
08-04-2021
08:12 AM
|
0
|
0
|
1182
|
|
POST
|
Do you have a very simple codepen (or similar) showing the issue?
... View more
08-03-2021
08:21 AM
|
0
|
1
|
1193
|
|
POST
|
But what types of values are you getting and how do they compare to the current MapView extent and SR? Setting a MapView extent to your specific extent is something you should be able to test via a simple codepen that doesn't use ExB or widgets. Also, you should check out the SketchViewModel as it will provides a way for the user to interactively create an extent that you could then zoom to.
... View more
08-02-2021
03:10 PM
|
1
|
1
|
4844
|
|
POST
|
As you've noted above some layer properties are loaded async, so I like to wait for a layer to be loaded before I try to update the properties. If this doesn't solve it then maybe you have a different problem from the original issue so starting a new question might help, and having a codepen (or similar) so we can experience the issue would be helpful. view.when(()=>{
returnedLayer = view.map.layers.find((layer)=>{
return layer.id === "SITG_OPENDATA_01_2709";
});
returnedLayer.load().then(()=>{
if (returnedLayer.popupTemplate.outFields == null ) {
// set the outFields on the template
returnedLayer.popupTemplate.outFields = ["*"];
returnedLayer.popupTemplate.returnGeometry = true;
}
});
//Now you have to wait for the viewModel to be active
view.watch("popup.viewModel.active",()=>{
console.log(view.popup.selectedFeature.geometry.type);
});
});
... View more
07-27-2021
08:08 AM
|
1
|
1
|
1800
|
|
POST
|
You can also try the pointFromDistance() method: Geodetically computes the location at a defined distance and direction from a known location.
... View more
07-20-2021
05:56 PM
|
0
|
0
|
4364
|
|
POST
|
It can depend on many, many things and there are probably several ways to do most steps depending on the application requirements. Do you control the image service? Do you control the polygon vector data? Is it necessary for the application to allow for the polygon vector data to come from a shapefile? What is the desired user experience? What is the desired output? As you can see there are too many things involved to provide a simple answer. Here's a quick example of one way in which you can use the Clip raster function, but how this raster function is applied in your use-case will depend on the image service you use and how it's configured. I hope this helps. https://codepen.io/john-grayson/pen/ExmXBLr https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm https://desktop.arcgis.com/en/arcmap/latest/manage-data/raster-and-images/clip-function.htm
... View more
07-19-2021
03:45 PM
|
1
|
1
|
4239
|
|
POST
|
In looking at your other question, an important concept to understand is that the buffer/circle constructed to filter the data is based on a pixel location and distances, but what you get back from converting the shapefile are vector based geometries. The first step in combining these concepts is that you will need to re-write the calls to the ImageryLayer to include your vector based geometry filter (a geometry from one of the converted shapefile layers) before retrieving the pixels. You can use the 'Clip' raster function to help with this task. You could then create the chart from those returned pixels. What you want to do will require a lot of changes to the code, but it should be possible. This process will result in a different user experience from the sample as you will loose the interactive calculations, which will now only happen when the view extent changes.
... View more
07-19-2021
08:47 AM
|
1
|
3
|
4246
|
|
POST
|
Instead of 'loadAll()' you can also target specific properties. Try 'load()' and and see if the internal Web Scene properties you want to access/change are available. You can also try the various methods available via 'watchUtils' to discover when specific properties are defined or changed. Also, if wanting to modify layer properties that are loaded asynchronously you can use the 'load()' method for only the layers you need to modify. Here is one of many approaches you could take depending on the application and web scene content. const map = new WebScene({...});
// slides are part of the web scene [not tested] //
watchUtils.whenDefined(map, 'presentation', presentation =>{
if(presentation && presentation.slides){
// do something with slides now that they're available...
}
});
const view = new SceneView({
map: map
});
view.when(()=> {
view.map.layers.forEach(layer => {
if(listOfLayersToChange.includes(layer.title)){
// only wait for load of specific layers you need to change
layer.load().then(()=>{
// change layer settings that were loaded asyncronously
});
}
});
});
... View more
07-16-2021
08:31 AM
|
0
|
0
|
666
|
|
POST
|
'WebScene.when()' just tells you the JS instance is ready, so you can for example set it as the 'map' property of the SceneView. It does not however tell us its internal properties that rely on asynchronous calls are ready, that is what the 'load()' and 'loadAll()' are for. This follows the 'loadable' pattern in the JS API. That specific example doesn't show this pattern because it doesn't try to use WebScene properties before they're ready. In your use-case, you're looking to modify layer properties and access the slides, and for this use-case you need to wait until the WebScene has retrieved and set these internal properties correctly.
... View more
07-15-2021
08:21 AM
|
0
|
0
|
3570
|
|
POST
|
The 'when()' method tells us that the JS instance is ready to interact with in code. You can use 'load()' or 'loadAll()' to ensure all of the resources that need to be loaded asynchronously are available. Also, your code tries to create the SceneView outside of (before) the WebScene 'when()' call resolves. In certain circumstances this will matter because even though the SceneView instance is ready, the WebScene resources you want to use might not be loaded. Hopefully these small changes will help in your app. https://codepen.io/john-grayson/pen/BaRpbzY
... View more
07-14-2021
08:56 AM
|
1
|
3
|
3586
|
|
POST
|
Could it be that the web scene is not fully loaded before you try to call applyTo? Do you have a very simple codepen showing the basic steps you're taking in your code?
... View more
07-13-2021
02:42 PM
|
1
|
9
|
3598
|
|
POST
|
Hey Rob! I've used the 'calciteComboboxItemChange' event in a recent app and it seems to do what I needed. Here's a codepen showing how I use it: https://codepen.io/john-grayson/pen/zYwBVBZ
... View more
07-09-2021
08:34 AM
|
1
|
0
|
1782
|
|
POST
|
Try to ensure the layer is loaded: featureLayer.load().then(() => {
console.log(featureLayer.title, featureLayer.fields);
});
... View more
07-09-2021
08:09 AM
|
0
|
1
|
4357
|
|
POST
|
Check out the labelPoints method: https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geometryService.html#labelPoints
... View more
07-03-2021
05:25 PM
|
0
|
0
|
3044
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-07-2024 04:14 PM | |
| 1 | 02-23-2024 12:40 PM | |
| 1 | 03-01-2024 10:48 AM | |
| 2 | 08-03-2023 02:34 PM | |
| 2 | 07-19-2023 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-24-2024
06:01 PM
|