|
POST
|
Hi there, This is not possible out of the box in the API. We can look into adding this for the popup feature menu. However, I do not know if this will be implemented or when it will be implemented. If we add this feature, I will be sure to update. In meantime, do you think you can use approached used in this sample? https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=featurelayerview-query You could update the sample to listen to mouseover event of the listNodes. listNode.addEventListener("mouseover", onListClickHandler);
... View more
01-27-2022
10:40 AM
|
1
|
1
|
7310
|
|
POST
|
Hi there, So I looked your test app. I'd suggest adding your search results to a different layer and order the features in that layer by their ObjectIds in descending order to ensure that the latest feature is always displayed over other features. You can order the features by setting orderBy property on the layer. I created this simple codepen app to show how this would work: https://codepen.io/U_B_U/pen/XWzbJbq In this app, I am creating a client-side FeatureLayer as shown below. Notice that I am setting the orderBy parameter to order features by their ObjectIds in descending order. let searchLayer;
view.whenLayerView(jsonLayer).then(() =>{
searchLayer = new FeatureLayer({
source: [],
copyright: "USU",
popupTemplate: jsonLayertemplate,
fields: jsonLayer.fields,
renderer: jsonLayerRenderer,
orderBy: {
field: "OBJECTID",
order: "descending"
},
objectIdField: "OBJECTID",
geometryType: "point",
});
map.add(searchLayer);
}); Then when the search is completed, you add the search result to this layer as shown below. searchWidget.on('select-result',function(event){
layer = event.result.feature.layer;
const adds = {
addFeatures: [event.result.feature]
};
searchLayer.applyEdits(adds);
});
I noticed that UniqueValueRenderer you are assigning to your GeoJSONLayer is incomplete. You need to make sure all unique values are included in the renderer. Otherwise, orderBy won't work properly. For example, I had to add general type in the renderer like the following: {
value: "general",
symbol: {
type: "picture-marker",
url: 'https://webdev.usu.edu/map2/images/icons/interest.png',
width: '32px',
height: '37px'
}
},
{
value: "general building",
symbol: {
type: "picture-marker",
url: 'https://webdev.usu.edu/map2/images/icons/interest.png',
width: '32px',
height: '37px'
}
}, Hope this helps,
... View more
01-27-2022
09:41 AM
|
0
|
0
|
2537
|
|
POST
|
Hi there, So our documentation is missing the url parameter on imageService.identify. We will get this fixed in the next release. If you are using JavaScript then you can pass the url as the first parameter (imageService.identify(url, params, options). You can also add your imageService as a layer then setup a popupTemplate on the layer. Thanks for bringing this issue to our attention.
... View more
01-27-2022
07:04 AM
|
1
|
1
|
2472
|
|
POST
|
The error indicates that FeatureLayer you creating is a non-spatial FeatureLayer. Meaning that graphics you are adding to the FeatureLayer does not have geometry, just attributes. Is this what you are adding? If you are then you cannot add non-spatial FeatureLayer to the map. Creating a FeatureLayer doc explains how non-spatial FeatureLayers can be used. See under Read more. If you are creating spatial FeatureLayer then several things to check. 1. You can only add graphics with same geometry types. 2. Are you graphic geometries valid? 3. You should set the FeatureLayer.geometryType in the layer's constructor. The codepen app sets the params required to initialize FeatureLayer. If you don't then the API will try to infer required parameters from the graphics you pass in and will fail if it cannot infer the params.
... View more
01-20-2022
08:29 AM
|
1
|
1
|
2967
|
|
POST
|
Yep you sure can. Just add a FieldsContent to your popupTemplate's content. I updated the codepen app for you to showcase this: https://codepen.io/U_B_U/pen/dyVEWya?editors=1000
... View more
01-19-2022
12:40 PM
|
1
|
5
|
3977
|
|
POST
|
Hi there, You can do this with the use of Function, Promise or with use of Arcade expressions. This SDK sample shows how to change the popupTemplate's content dynamically depending on feature attributes. I have modified this sample just a little bit to show images depending on feature attributes. The main logic is in populationChange function. Simple app: https://codepen.io/U_B_U/pen/dyVEWya?editors=1000 Hope this helps.
... View more
01-19-2022
09:22 AM
|
2
|
1
|
3990
|
|
POST
|
Hi there, I modified an existing sample to remove all features before new features are added. Essentially, you have to wait until existing features are deleted before new ones are added. Test app: https://codepen.io/U_B_U/pen/PoJvbab?editors=1000 Take a look at the addFeatures function. Hope this helps,
... View more
01-19-2022
07:20 AM
|
1
|
0
|
2994
|
|
POST
|
Hi there, Please update the server. That might fix the issue. Please let me know what you see after the upgrade.
... View more
01-18-2022
02:12 PM
|
0
|
1
|
8195
|
|
POST
|
Hi there, Is it possible for you to share your code or at least share the relevant code? I don't completely understand the issue you are running into. This sample shows how to select features of a layer that intersect a rectangle drawn on the map. https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/
... View more
01-18-2022
12:56 PM
|
0
|
0
|
1947
|
|
POST
|
Hi there, So the snapshot mode (we load all features on layer load) is enabled when one of the following conditions are met, otherwise layers will fetch its data as needed: If the layer has 0-80,000 points if the layer has 80,001 - 400,000 points and if the view's initial extent is greater than 10% of layer's data extent (i.e., we are not super zoomed in). Snapshot should be very performant after the initial load. However, if you are making server side calls via refreshInterval or refresh() method, this can slow down the performance as the app has to download the entire data. Have you considered using client-side filters like FeatureFilter or FeatureEffect on the FeatureLayerView? If you are querying your data also have you considered using client side queries via FeatureLayerView.queryFeatures()? Setting those properties and calling the those methods on the LayerView will take place on the client-side without having to fetch data from the server side. I created a very simple test app where the layer is loaded in the snapshot mode. I have aded a few buttons where you can set the layer.definitionExpression versus layerView.filter. If you have the network tab open, you'll notice that setting layerView.filter does not generate network requests. In any case, you can opt of out your layer loading in a snapshot mode by setting featurelayer-snapshot-enabled flag to 0. You can test this flag in the test app I provided by uncommenting the script tag added towards to beginning of the app: https://codepen.io/U_B_U/pen/dyVLKaG?editors=1000 I cannot reproduce the definitionExpression issue you are describing.
... View more
01-18-2022
12:21 PM
|
0
|
1
|
2860
|
|
POST
|
Hi there, It works for me as well. Would you be able to share a reproducible case? If not can you please share the relevant code (layer constructor - renderers, labels etc). Also the code where and how you are setting the definitionExpression? @JeffreyWilkerson you do not need to call refresh when definitionExpression is set.
... View more
01-18-2022
10:47 AM
|
0
|
1
|
4579
|
|
POST
|
Hi there, If the features are added when the client-side layer is created then you can just zoom to the fullExtent of the layer. If you add or remove features from your client-side FeatureLayer then you can call queryExtent method with `1=1` where clause. This app shows both approaches: https://codepen.io/U_B_U/pen/mdBQQRY?editors=1000
... View more
01-18-2022
09:47 AM
|
1
|
0
|
2085
|
|
POST
|
Hi there, Yes sketch creates geometries with a spatial reference that matches the spatial reference of the view. If your basemap's spatial reference is Web Mercator (102100) then you can use webMercatorUtils.webMercatorToGeographic() method to project the geometry to geographic spatial reference. You can do something like the following. sketch.on("create", (event) => {
if (event.state === "complete") {
console.log("sketch geometry", event.graphic.geometry);
const geographicGeom = webMercatorUtils.webMercatorToGeographic(event.graphic.geometry);
console.log("geographic geometry", geographicGeom)
}
}); If your basemap's spatialReference is not WebMercator then you can use projection.project() method. Hope this helps,
... View more
01-18-2022
09:13 AM
|
1
|
0
|
1862
|
|
IDEA
|
Thanks for the quick reply. We added an enhancement request in our system to set a global formatting for time. I will update you once it is installed. In meantime, please use tickConfigs and labelFormatFunction to format time.
... View more
01-14-2022
08:15 AM
|
0
|
0
|
3571
|
|
POST
|
Issue in the API. But your service will help to debug the issue. Thanks
... View more
01-13-2022
03:02 PM
|
0
|
0
|
8217
|
| 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
|