|
POST
|
Hey David, I'm not able to reproduce this. Are you able to share a codepen that demonstrates your issue? I used the same code as above, but with a different layer and field, And I got an expected result. > While I know this isn't the best practice, its the best solution I could come up with, since universal break points won't work. Regarding this point. The doc that says to avoid using it if possible is specifically referring to using smart mapping functions as a lazy way of setting renderers on layers. If you know exactly how the layer should be rendered (e.g. colors, breaks, etc), then just set it on the layer or save it to the service. Your use case seems like a totally valid reason for using these methods.
... View more
01-03-2020
10:17 AM
|
0
|
19
|
3324
|
|
POST
|
Hi Olivier, The reason the code works in MapImageLayer and not TileLayer is because you're creating a dynamic sublayer in the constructor of the MapImageLayer. This is technically a new sublayer and a powerful capability of MapImageLayer. However, TileLayer has sublayers that are readonly. So when you use the same snippet, you're actually attempting to create new sublayers within the constructor of the TileLayer. Since sublayers is a readonly property, you will see an error. However, you can still modify properties like popupTemplate, popupEnabled, and legendEnabled on existing sublayers. You just need to modify the code a little bit to get the proper sublayer. This should work in your app: var SA_Innondation = new TileLayer({
url:"https://sig.gironde.fr/arcgis/rest/services/APP/sa_inondation_v_1_0/MapServer/",
title:"Sensibilité Aléas Inondation"
});
var sublayer = SA_Innondation.findSublayerById(0);
sublayer.popupTemplate = {
title: "{ppr_label}",
content: "{risq_2015}"
};
... View more
12-30-2019
01:49 PM
|
1
|
0
|
1633
|
|
POST
|
There isn't an official limit on the number of layers you can have in your map. It depends on a number of factors, including how much your browser can handle, your hardware (desktop/laptop/mobile device), network latency, how large your layers are, etc. The larger the layer, the heavier the payload in querying for that data. That also means a lot of smaller layers can add up too. Can you describe the content of the 54 layers? Are you using them for reference? Editing? Do they represent completely different data for overlay purposes, or do they represent similar features? Based on your snippet above, I figure it's a transportation app. Are they all lines representing road features, or does it include a lot more than that?
... View more
11-12-2019
04:00 PM
|
0
|
1
|
1322
|
|
POST
|
Hi Richard, I don't think we considered having multiple LayerLists in the same app during the design of the widget. Would using GroupLayers help with the ease of use for maps with lots of layers? You can add layers as sublayers to a GroupLayer, which can be expanded or collapsed for ease of use. The visibilityMode and listMode properties will help in that approach. listMode will control whether a layer's list item is visible in the LayerList or if the children layers of a GroupLayer will be visible. visibilityMode allows you to control how layer visibility can be toggled - either allowing one layer to be visible at a time within the group or if any combination of layers can be toggled on or off.
... View more
10-09-2019
09:18 AM
|
1
|
1
|
3938
|
|
POST
|
Great question! In short, we plan on documenting all our available color schemes with their names at 4.14 (December 2019). Once they are documented you won't have a need for the getSchemeByName method (or the scheme name for that matter) because you can just use the provided colors at that point. The getSchemeByName() method was designed for getting a specific scheme you knew you previously had in a particular smart mapping workflow. In apps where you allow users to author styles for layers, they will select one after the app makes a call to getSchemes(). If you want to remember that scheme, you can store the name of it, the app user and app developer don't really need to know what that name is. But the app will remember it and can pass it to getSchemeByName if you have it preselected for a smart mapping workflow. For changing the histogram sample, you only really need to change colors. That's where the additional page coming later will help if you want some ideas for colorblind safe colors. If you already have a set of colorblind safe ramps, you can already use those by hard coding the colors in the layer's renderer. See the modified app here: https://codepen.io/kekenes/pen/jONoNMJ?editors=1000 Then look at the color stops from lines 201 - 220. That's where you will input the colors. I hope that helps!
... View more
09-27-2019
11:46 AM
|
1
|
0
|
1268
|
|
POST
|
Hi Jerry, The 4.x JS API will not add a ColorPicker widget. Instead, it will be implemented as a Calcite component, which will be used in Esri apps. This is currently being worked on. You can see the issue for tracking this work here: https://github.com/Esri/calcite-components/issues/64 We'll update the Functionality Matrix accordingly.
... View more
08-28-2019
01:58 PM
|
3
|
0
|
3282
|
|
POST
|
Hi Sirish, The example given above can be accomplished using an Arcade Expression, but I'm not sure it gives a useful result because our color schemes contain a maximum of 10 colors for unique values before the colors start repeating, and if you accept the default max number of types of 10, then you will potentially get a lot of values that don't belong to a category. The Arcade expression is: var fields = [ $feature.DOM_CROP_ACRES, $feature.STATE, $feature.COUNTY]
Concatenate(fields, ", "); Here's an app that demonstrates this: https://codepen.io/kekenes/pen/qBWRMGR?&editable=true&editors=100
... View more
08-23-2019
08:55 AM
|
1
|
1
|
2370
|
|
POST
|
Are you sure UniqueValueRenderer is the renderer type you want to use in this case? The code you attached is generating a lot more than 12 unique values because it's a number field. Here's a pen of the attached code: https://codepen.io/kekenes/pen/NWKdLLL?editors=1000 along with a screenshot It seems that a continuous color renderer is closer to what you're looking for. https://developers.arcgis.com/javascript/latest/sample-code/visualization-vv-color/index.html In that example you can provide a to and from color with a much more legible legend. I also noticed you specifically asked about supporting this for string fields. I'm not sure how the renderer would know what string value to start with (the from color) versus a string value to end with (the to color) and how to interpolate all the values in between if they are not numbers. Will the sample above work for your use case? If not, I'll need some further clarification.
... View more
08-23-2019
08:39 AM
|
0
|
1
|
1941
|
|
POST
|
Hi Roel, FeatureLayer.queryFeatures() is the only way to get graphics in a client-side FeatureLayer in 4.12. This ensures consistency when working with features across all relevant layer types in the JS API whether fetching from the server or client.
... View more
08-06-2019
11:04 AM
|
1
|
0
|
1049
|
|
POST
|
No. None at the moment. It has been discussed and we'll continue discussing it. There's a lot to consider here including performance. Is going from 4326 to 3857 (or vice versa) the typical workflow? Or would you require this capability to project geometries to other spatial references? Another followup question: Do you see a case where you would write an expression with a hard coded geometry that would be used in more than one web map with different spatial references? This one seems like an edge case to me.
... View more
05-30-2019
08:54 AM
|
0
|
1
|
5660
|
|
POST
|
Hi Jack and Xander Bakker, The following statement is incorrect: "At this moment only Web Mercator (Auxiliary Sphere) (102100 or 3857) is support for the creation of geometries." You can create geometries in any spatial reference in Arcade. However, the spatial reference of the geometry must match the spatial reference of the map where the Arcade is executed. Since a lot of maps have a web mercator spatial reference it appears like you can only work in web mercator.
... View more
05-29-2019
04:56 PM
|
2
|
3
|
5660
|
|
POST
|
Thanks for pointing this out. This appears to be a documentation issue. You will always want to use the correct measurement as represented by the coordinate system. Since web mercator is a projected coordinate system the variable used to drive the RealWorldSize visual variable should be in planar coordinates so it fits with the features in the other layers, including the basemap. In this case, you don't want to use geodesic measurements for visual purposes because the sizes in this coordinate system are already distorted. For things like measurement widget, popups, tables, and labels, it makes sense to display the geodesic measurement for accuracy purposes. But for the purpose of drawing a graphic/feature in the view it should be sized according to the planar measurement since that is what is assumed by the view's spatial reference.
... View more
03-29-2019
01:12 PM
|
1
|
0
|
1362
|
|
POST
|
We're currently evaluating changing this threshold. No matter what we set it at, it may feel somewhat arbitrary. Thanks for the feedback.
... View more
03-14-2019
08:15 AM
|
0
|
0
|
1408
|
|
POST
|
There's no need at this point. We've been actively working on this. It should be fixed at 4.11.
... View more
02-27-2019
08:15 AM
|
0
|
1
|
4831
|
|
POST
|
Sorry, I think I messed up the expression, I edited it now to what I think you're looking for.
... View more
02-12-2019
09:03 AM
|
2
|
0
|
1616
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-06-2025 03:09 PM | |
| 1 | 04-29-2025 08:36 AM | |
| 1 | 08-20-2024 08:06 AM | |
| 1 | 08-13-2024 11:53 AM | |
| 1 | 07-22-2024 11:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-06-2025
03:01 PM
|