|
POST
|
Thank you so much for the shapefile. I will test it as soon as I can and will let you know what we find out.
... View more
11-30-2022
11:54 AM
|
0
|
0
|
3741
|
|
POST
|
Thank you so much for providing me with the cog file. So several things. The imagery is black for two reasons. First, the pixel values for your COG file ranges between -55 to -227 and it has 153 unique values. However, you are looping through where i=0 to max number and applying the i value to uniqueValueInfo.value which does not exist in your image. Even if you fix this your image will be still black. See the following for why. Second and the more important reason is that your cog tif file has pixel type of Int32 which translates to ImageryTileLayer.rasterInfo.pixelType of "S32". So I must amend my previous statement about assigning UniqueValueRenderer to an ImageryTileLayer... the following conditions must be met: The image must have only one band. Image must either -- have a raster attribute table: you can use any numeric or string field from the table in UV. --or u8 / s8 pixel type: you can only use "Value" field. To apply UniqueValueRenderer to your COG you need to add attribute table to your image or change the pixel type to either u8 or s8. I have tested the image by changing the image pixel type and verified that it works. The u8 pixel values must range between 0 - 255, and s8 pixel values must range between -128 - 127. See pixelType doc for more info on pixel value ranges. To convert your COG to have pixelType of u8 or s8, it is probably easiest to use ArcGIS PRO. First use, Plus function geoprocessing tool with a constant number (256 for example) + your tif. You know your data better so please adjust accordingly. Then use the Copy Raster Geoprocessing tool to convert the tif file to COG. For example, I did use the following params. Then I use able to add and assign UVR to your COG successfully. I used only 10 color combos for the following image...
... View more
11-30-2022
11:49 AM
|
1
|
1
|
4701
|
|
POST
|
Hi there, Would be you able to share the json polygon geometry so that we can repro the behavior and debug? Thanks, -Undral
... View more
11-30-2022
07:54 AM
|
0
|
0
|
3756
|
|
POST
|
Assuming you have a categorical data. Not sure why it is still black. I cant think of anything else without looking at the image itself. Can you share your COG?
... View more
11-29-2022
08:12 AM
|
0
|
1
|
4745
|
|
POST
|
Hi there, It looks like your COG file has more than one band (based on your code snippet). The UniqueValueRenderer cannot be applied to a service or COG that has more than one band. To assign UniqueValueRenderer to an ImageryTileLayer with COG the following two conditions must be met: The COG file must have only one band. Set the UVR.field to "Value". The Raster.ServicePixelValue field is only used for popupTemplate. You can find the more info about it from here: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryTileLayer.html#rasterFields. Hope this helps.
... View more
11-28-2022
11:21 AM
|
1
|
1
|
4760
|
|
POST
|
Hi there, Glad you are trying out support for adding COG to ImageryTileLayer. So we looked into this and indeed your COG file has unsupported settings. We added support for your unique case where the change is: Added support for an internal noData pixel Mask, in addition to noDataValue. Corresponding tags are PHOTOMETRICINTERPRETATION = 4 (transparency mask), NEWSUBILETYPE = 5 (source level) or 4 (pyramids) In addition, PHOTOMETRICINTERPRETATION is YCbCr, or CMYK are supported only if compression is JPEG, that means result is in RGB space. This is done as part of JPEG decoding. I will let you know when we have this support on our next version. Hope you can test it out and give your feedback. Cheers, -Undral
... View more
11-17-2022
09:28 AM
|
1
|
0
|
1528
|
|
POST
|
Hi there, You should use client-side FeatureLayer instead of GraphicsLayer if you want to filter features based on attributes. We have couple of samples that showcase how to create client-side feature layer from graphics https://next.sites.afd.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection/ https://next.sites.afd.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection-edits/ FeatureLayer.source SDK help talks about how to create client-side layers: https://next.sites.afd.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source With all this said, you still must use GraphicsLayer then you could query all graphics in your GraphicsLayerView and set the visibility of graphics to false based on your needs. You can do something like this: view.whenLayerView(graphicsLayer).then(function(layerView){
layerView.queryGraphics().then(function(results){
results.forEach((item)=>{
console.log(graphic?.attributes)
if (graphic?.attributes?.Name){ // set your requirement here
graphic.visible = false;
}
});
});
});
... View more
11-17-2022
09:16 AM
|
1
|
0
|
1729
|
|
POST
|
Hi there, It is hard to suggest anything without a repro case. Are you working with a FeatureLayer that references a feature service or is this a client-side FeatureLayer? You should see the updated values for feature services without having to do anything as long as applyEdits resolves successfully. For client-side featureLayer, you have to query the updated features once applyEdits resolves successfully. It is explained in this document: https://next.sites.afd.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits This very simple sample shows and explains this workflow: https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection-edits/
... View more
11-17-2022
09:00 AM
|
1
|
4
|
2502
|
|
BLOG
|
This release adds beta support for adding Cloud Optimized GeoTiff (COG) files to an ImageryTileLayer via the URL property. COG files can take advantage of all the capabilities of ImageryTileLayer. See the ImageryTileLayer with COG sample for more information. We also added a section for Referencing Cloud Optimized GeoTiff URL in the overview of ImageryTileLayer SDK document. Please watch the video below to learn more about this feature. Please leave me a message if you have questions or feedback. Happy coding!
... View more
11-15-2022
04:23 PM
|
5
|
3
|
2728
|
|
POST
|
Hi there, You cannot do that! The source of the layer cannot be changed once the layer is loaded. You have to create new FeatureLayers for each portalItem! You can then toggle the layer visibilities to show only one layer at a time.
... View more
11-09-2022
07:57 AM
|
0
|
1
|
1368
|
|
POST
|
Hi there, Can you please provide a test case for this one so that we can take a look at it. Thanks.
... View more
10-14-2022
10:05 AM
|
0
|
0
|
1848
|
|
POST
|
Hi there, Can you please create a simple repro case? Seems like an app specific issue. You can use this codepen app as a starting point: https://codepen.io/U_B_U/pen/GRdeogw?editors=100
... View more
10-14-2022
08:33 AM
|
0
|
3
|
2640
|
|
POST
|
Popups will show for visible features on the map and you can zoom to an extent based on the filter. You need add that logic after you apply the filter. document.getElementById("statesFIPS").addEventListener("change", () => {
view.allLayerViews.forEach((lv) => {
if (lv.layer.type === "feature") {
lv.filter = {
where: "STATE_FIPS = '" +
document.getElementById("statesFIPS").value +"'"
};
// ZOOM HERE
}
});
});
... View more
10-11-2022
09:44 AM
|
1
|
0
|
2380
|
|
POST
|
Hi there, The FeatureFilter sample you referenced can only be used for feature based layers like FeatureLayer, CSVLayer, GeoJSONLayer etc. I created a simple test app that filters FeatureLayersViews based on same field names. In the app, I am only checking if the layer type is feature and set the filter. You should probably add more checks to make sure you are getting the right FeaturelayerViews. https://codepen.io/U_B_U/pen/QWrzyeQ?editors=100
... View more
10-11-2022
09:00 AM
|
1
|
0
|
2395
|
|
POST
|
Hey there, You can listen to Sketch widget's update event and its payload returns array of selected graphics. sketch.on("update", (event)=>{
console.log("selected graphics for update", event.graphics);
});
... View more
10-10-2022
12:37 PM
|
1
|
0
|
818
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-17-2025 03:29 PM | |
| 1 | 07-09-2025 08:48 AM | |
| 2 | 07-08-2025 08:09 AM | |
| 2 | 07-07-2025 03:57 PM | |
| 1 | 06-11-2025 03:25 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-01-2025
08:03 AM
|