|
POST
|
Check out getSymbol (3.x) and getDisplayedSymbol (4.x) as they might provide a way to use the renderer of the source layer and the graphic from the returned query/identify to retrieve a specific symbol. In 4.x I normally create a FeatureLayer (using client-side graphics) with the same render as the source layer and then add the query/identify results to it. Critical to both of these approaches is that the returned graphic must have all the necessary attributes and values so the renderer can figure out the correct symbol to use or return.
... View more
01-07-2021
08:27 AM
|
1
|
1
|
3222
|
|
POST
|
Do you have a codepen/jsbin showing the issue? Having a simplified working example of just the issue at hand to inspect (and modify) with will allow members of the community to experience the issue and maybe even provide suggestions or workarounds.
... View more
01-06-2021
08:30 AM
|
1
|
2
|
2452
|
|
POST
|
Do you have a codepen/jsbin showing the issue? Maybe make a copy of mine and modify it so we can experience the issue described? The concept for the shared code is to provide a UX that allows the user to cancel and continue using the app regardless of if/when the print calls themselves get canceled, but this might not be what you're after.
... View more
01-05-2021
08:50 AM
|
0
|
1
|
2398
|
|
POST
|
...and here's a quick codepen showing this concept: https://codepen.io/john-grayson/pen/LYRmGxY
... View more
01-04-2021
01:39 PM
|
2
|
3
|
2413
|
|
POST
|
Limits are defined by the service authors. In the case of the service used in the sample above since it's just used just for demonstration purposes having a limit on the radius is understandable. To learn more about elevation services that are available on ArcGIS Online in general and viewshed parameters and limitations check out some of these resources: get started with elevation services Viewshed
... View more
01-04-2021
12:47 PM
|
2
|
0
|
2433
|
|
POST
|
Check out the 'requestOptions' (RequestOptions) parameter of the execute(...) method; maybe the 'signal' (AbortSignal) property is something to try out. This might allow you to build the UI so you can allow the user to continue using the UI without having to wait for a response.
... View more
01-04-2021
12:35 PM
|
2
|
4
|
2415
|
|
POST
|
Here's a codepen showing a modified version of that sample that performs the analysis at a specific location: https://codepen.io/john-grayson/pen/yLajLqP I hope this helps.
... View more
01-04-2021
08:37 AM
|
2
|
2
|
2451
|
|
POST
|
One thing to watch out for is if the URL parameters you're looking for are not there; you might want to check before using the values.
... View more
12-30-2020
11:57 AM
|
2
|
0
|
4378
|
|
POST
|
You'll have to handle the URL parameters in your code, and one way to do this task is with URLSearchParams which makes it easier to work with URL parameters.
... View more
12-30-2020
11:32 AM
|
2
|
3
|
4387
|
|
POST
|
You can watch for the MapView property called updating to be false. You can directly watch this property, or for this use-case maybe use watchUtils which might be more appropriate. The assumption is that after navigating to a search result the view will be updating, and you want to wait before interrogating via hitTest(...) or other. You could skip this part and see if it works for your use-case, and then add it in if it doesn't quite work as you need. // ALL updating PROPERTY CHANGES //
mapView.watch('updating', (updating) =>{
console.log('Updating: ', updating);
});
// WHEN updating IS FALSE ONE TIME //
watchUtils.whenFalseOnce(mapView, 'updating', ()=> {
console.log('View Not Updating');
});
... View more
12-30-2020
11:25 AM
|
1
|
0
|
3252
|
|
POST
|
Correct, hitTest(..) only works with information in the current view since it's designed to work when the user interacts with the view. Hard to tell without a codepen/jsbin of the exact interactions going on, but here are a few possible alternatives for you to explore: - make sure Search is configured to place the user over the found result, wait for the view to finish updating, then call hitTest(...). - use goTo(...) to place the view over the found result, wait for the view to finish updating, then call hitTest(...). - use goTo(...) to place the view over the found result, wait for the view to finish updating, then use fetchFeatures to get all features and not just the first one. - ask all the individual layer(s) if they have any data at the searched location by calling queryFeatures(...).
... View more
12-30-2020
09:21 AM
|
0
|
0
|
3257
|
|
POST
|
Some basemaps are designed with the labels as a separate reference layer, meaning they will appear above your operational layers. One option for this use-case is to not make them a reference layer, which you can do in your specific Web Map in both the Map Viewer and Map Viewer Beta when authoring your map.
... View more
12-30-2020
08:43 AM
|
1
|
1
|
1711
|
|
POST
|
Please note that the ElevationSampler is available at various levels and depending on how you obtain the ElevationSampler it might be sync or async. The async use-case is when you want to specify a specific/best elevation resolution in which case you might see additional requests going back to the service and thus async. This is for the one-time calculation use-case to achieve the best 'relative-to-ground' value (gps fix - sampled elevation). When using the sync methods you'll be working against the current elevations in the view and you might still run into your original situation as the elevations under the marker location will change during navigation. Another possible approach is to use the sync version whenever the ElevationSampler changed event happens and the view is stationary, then update the marker geometries in the current view, but this might not be practical when a large number of markers are in the view. In either use-case, using 'relative-to-ground' should ensure your markers are not displayed under the ground elevations.
... View more
12-30-2020
08:31 AM
|
1
|
1
|
3223
|
|
POST
|
If you're using a GraphicsLayer then one possible approach to research is the use of the 'relative-to-ground' setting, but instead of using the altitude value directly, you could calculate a 'relative altitude' value for each marker once before adding the Graphic to the GraphicsLayer. One approach would be to use an ElevationSampler, but you might have other more appropriate methodologies depending on the data source. You can adjust the geometry Z directly, or if stored as an attribute, you can use the featureExpressionInfo instead of the geometry Z value.
... View more
12-29-2020
02:30 PM
|
2
|
4
|
3251
|
|
POST
|
In your first example you pass in a Point instead of ScreenPoint to hitTest(...), and in the second example you're not calling hitTest(...), so it's hard to tell what is going on. Do you have a very simple codepen/jsbin/other showing the issue?
... View more
12-29-2020
02:10 PM
|
1
|
2
|
3267
|
| 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
|