|
POST
|
You should change the highlight colors in your if then statements Like here: if (value = HW: Private) if (value = HW: Private) {
view.highlightOptions = {
color:[160, 32, 240]
};
} Here is a simple codepen app shows how it is done: https://codepen.io/U_B_U/pen/poVLyzr?editors=1000
... View more
09-29-2022
09:07 AM
|
0
|
0
|
2012
|
|
POST
|
Hi there, You can use geometryEngine.clip() method. This method only allows you to clip geometries based on envelope. So not sure if it works for your case.
... View more
09-23-2022
09:01 AM
|
0
|
0
|
763
|
|
POST
|
Hi there, You could to something like the following, however, I must admit that this is probably not supported. You can check the attribute value and reset the MapView.highlightOptions object before you setting the layerView.highlight. if (valueOfSomething <= 80){
view.highlightOptions = {
color:[160, 32, 240]
};
}
else {
view.highlightOptions = {
color: "orange"
};
}
... View more
09-23-2022
08:56 AM
|
0
|
0
|
2063
|
|
POST
|
Hi there, FeatureLayer.queryFeatures() should work reliably. If you are seeing issues with it can you please provide me with a reproducible case? Graphic.getObjectId() method does return values from the `oid` field of the layer if one exists. Not all fields that are called objectid is the oid field of the FeatureLayer. You can get the actual oil field of your layer by checking FeatureLayer.objectIdField. This property returns the name of the layer's oid field and Graphic.getObjectId() reads values from this oid field. I created this simple codepen app showcasing what I explained above: https://codepen.io/U_B_U/pen/gOzxNBa?editors=1000 Open the console to see the results of Graphic.getObjectId, feature.attributes[layer.objectIdField] and feature.attributes.OBJECTID. As you can see the first two do return the values from the OID field while OBJECTID is just another field in the layer. Hope this makes sense.
... View more
09-22-2022
09:07 AM
|
1
|
0
|
1249
|
|
POST
|
Hi there, As you guessed, it is not possible to create FeatureLayer directly from the JSON object at the moment. We have a plan to add support for this, however, I do not know what the timeline is.
... View more
09-22-2022
07:53 AM
|
1
|
1
|
1409
|
|
POST
|
The error is being thrown because you are not finding the right layers from your web map. First of all, the layers you are looking for are in a group layer: https://www.arcgis.com/sharing/rest/content/items/6a98a932b16142ae9d262e3e48a021a3/data?f=json So you need to loop through the layers in your group layer to find the right layers: webmap.layers.forEach((layer) => {
console.log(layer.title, layer.type);
if (layer.type === "group") {
layer.layers.forEach((subLayer) => {
console.log(subLayer.title);
if (subLayer.title === "Entire Structure") {
EntireStructureLayer = {
layer: subLayer,
}
}
});
}
}); Secondly, you are doing the following where EntireStructure does not exist. You must set this to a valid layer instance. See the code above. if (layer.title === "Entire Structure") {
EntireStructureLayer = {
layer: EntireStructure,
}
} Lastly, DamageAreasmultipatch does not exist. Please take a look at your web map from the link provided above. if(layer.title === "DamagedAreasmultipatch") This codepen shows how Editor can be set up: https://codepen.io/U_B_U/pen/bGMRvmr?editors=1000 The search widget is also throwing an error about Display field and the codepen shows the working version.
... View more
09-20-2022
08:35 AM
|
1
|
1
|
3909
|
|
POST
|
Hi there, The view.graphics.remove(graphic) should work without any issues as we don't have any known issues for this. If it is not working, can you please provide a simple reproducible case? Here is a very simple test case showing that it works: https://codepen.io/pen?&editors=100
... View more
09-20-2022
08:01 AM
|
0
|
0
|
1020
|
|
POST
|
Hi there, Have you looked at this sample? This sample allows users select features on the map by drawing rectangles: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=highlight-features-by-geometry The sample sets the FeatureTable.highlightOnRowSelectEnabled to false. You can comment out this line in the FeatureTable constructor. It also sets the LayerView.featureEffect and you can remove that logic. Other than that it does what you are looking for.
... View more
09-20-2022
07:59 AM
|
1
|
1
|
3399
|
|
POST
|
Hi there, Based on the image you provided, you seem to be querying features within one mile of the circle itself? This is just a guess! I looked at the code you provided but it was hard to follow with lots of lines. Can you please provide a simple repro case or at least remove the irrelevant lines from your code? This is a really simple test app that shows point features being selected within 200 miles of the clicked location: https://codepen.io/U_B_U/pen/yLjbwXj?editors=1000
... View more
09-19-2022
09:07 AM
|
2
|
1
|
3413
|
|
POST
|
Hi there, This is working as expected from what I can see. The Vector tile service metadata has the maxzoom defined as 15. In the JS API, LODs come from the first layer in the map. There are only 15 LODs for this service, hence why you can't pass that zoom level. You can however, disable lods by setting on the MapView.constraints.lods yourself. You can set the LODs by calling TileInfo.create(), define your own LODs, or set empty lods (constraints.lods = []). If you set it empty then you have to use scales to zoom in and out instead. In any case, the following code snippet shows how to create the LODs to match the ArcGIS online Web Mercator tiling scheme. Once this is set you will be able to zoom past level 15. Hope this helps, let view = new MapView({
map: map,
center: [10.0959, 53.454],
zoom: 14,
container: "viewDiv",
constraints: {
lods: TileInfo.create().lods
}
});
... View more
09-14-2022
01:42 PM
|
2
|
1
|
5401
|
|
POST
|
Hi there, You may find this blog by @ReneRubalcava useful: https://odoe.net/blog/when-are-layers-done. Use the reactiveUtils instead of watchUtils.
... View more
09-13-2022
04:00 PM
|
0
|
3
|
1673
|
|
POST
|
Hi there, You can loop through all operational layers in your web map after all resources are laded and find the layer you need. The following code should get you started: webmap.loadAll().then(()=>{
// loop through all operational layers in your webmap
webmap.layers.forEach((layer)=>{
console.log("layer.id", layer.id, layer);
// check your layer here
});
}); This sample also shows how to get a layer at the specified index. https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=featureeffect-drop-shadow
... View more
09-12-2022
10:05 AM
|
1
|
2
|
2508
|
|
POST
|
Hi there, Hope I did not misunderstand you request. Sounds like you want to zoom to the search location and show the popup but does not want to the point graphic at the location. If this is what you want to you can just the Search.resultGraphicEnabled to false in the widget's constructor. const searchWidget = new Search({
view: view,
resultGraphicEnabled: false
});
... View more
09-12-2022
08:16 AM
|
1
|
0
|
820
|
|
POST
|
Hi there, You could use FeatureLayer.customParameters property to set the token for the given service. The customParameters get appended to all network requests associated with the service. Hope this makes sense. let layer = new MapImageLayer({
url: serviceUrl,
customParameters: {
"token": "my-token"
}
});
... View more
09-09-2022
08:08 AM
|
0
|
0
|
1017
|
|
POST
|
Hi there, There are no known problems with setting definitionExpression on a layer after the layer is loaded. This very simple codepen shows that it is working: https://codepen.io/U_B_U/pen/dyebObx?editors=100 The app waits for the layerView is created for the layer and sets the definition expression.
... View more
08-31-2022
08:10 AM
|
0
|
0
|
1309
|
| 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
|