POST
|
@JonathanKressin Can you query the selected feature with some criteria instead of calling buffer() whenever the distance is 0? Alternatively, you can keep very small distance to create buffer whenever the distance is 0. e.g. 0.01 feet. I am not sure about the Experience Builder and how it works in your scenario. This is just a suggestion if it works for you.
... View more
09-14-2023
08:12 AM
|
0
|
1
|
206
|
POST
|
@AllisonRobertson Did you try popupEnabled: false with the MapView to disable the popup? MeasurementViewModel has view property that can give you MapView instance.
... View more
09-06-2023
09:32 AM
|
0
|
0
|
183
|
POST
|
I have created following sample where I am loading ArcGIS Javascript API 4.27 and D3.js (ver 7) using the Script tag. https://codepen.io/b2810s/pen/NWebbze This gives an error on the console related to multipleDefine. Any idea how to avoid the conflict of the class names between the libraries? If I change the order of loading where D3.js is loaded first and then ArcGIS Javascript API 4.27.,The map is loaded successfully in that case. However, I believe it may fail in some other part of the code with D3.js. What is a best practice to write this code so it doesn't create any conflict with ArcGIS Javascript API?
... View more
09-05-2023
09:59 AM
|
0
|
2
|
413
|
POST
|
Thanks @JoelBennett . I was thinking about it as a temporary fix. It looks like a workaround and I will try out. Is there any idea if this is a bug with the API?
... View more
08-22-2023
05:27 AM
|
0
|
1
|
296
|
POST
|
@JoelBennett Thanks for replying. Map and MapView have already been initialized before I initialized Sketch widget in a separate function. So, they are already available on the client. It is like when screen loads then function A(){
require(["esri/Map", "esri/views/MapView"], function(Map, MapView) {
});
} Then call function B on a separate button click. function B() {
require(['esri/widgets/Sketch', 'esri/widgets/Sketch/SketchViewModel'], function(Sketch, SketchViewModel) {
var sketch = new Sketch({
defaultCreateOptions: {
mode: 'click'
},
layer: <graphic layer>,
updateOnGraphicClick: false,
view: mapView,
viewModel: new SketchViewModel({
pointSymbol: <pointSymbol>,
polylineSymbol: <polylineSymbol>
})
});
sketch.when(function(){
sketch.create(<tool>); //tool is point or polyline
});
});}
... View more
08-18-2023
08:27 AM
|
0
|
3
|
309
|
POST
|
I have written my code to initiate the Sketch tools following way. When the tool gets activated first time on click of the button (it's in my application, not the Sketch widget button) then it downloads several small javascript files and the tool related mouse cursor(crosshair) doesn't appear on the map immediately. This behavior is noticeable if you throttle the speed in Chrome to Slow 3G. require(['esri/widgets/Sketch', 'esri/widgets/Sketch/SketchViewModel'], function(Sketch, SketchViewModel) { var sketch = new Sketch({ defaultCreateOptions: { mode: 'click' }, layer: <graphic layer>, updateOnGraphicClick: false, view: mapView, viewModel: new SketchViewModel({ pointSymbol: <pointSymbol>, polylineSymbol: <polylineSymbol> }) }); sketch.when(function(){ sketch.create(<tool>); //tool is point or polyline }); }); Any idea on how to improve this performance or correct way to activate the tool so user doesn't require to wait?
... View more
08-17-2023
07:08 AM
|
0
|
5
|
454
|
POST
|
I see sometimes CORS errors while loading map using Layer.fromPortalItem({}). I notice "X:Cache Errors from cloudfront" in the request headers. Since this is not always reproducible, I wonder if the CORS errors are due to this reason. Is there any other area I need to look at? Or is there any configurations to avoid CORS errors while loading map using ArcGIS Online item Id?
... View more
08-14-2023
09:12 AM
|
0
|
1
|
274
|
POST
|
Looks like Andrew has given alternative way to achieve it. Thanks @AndrewMurdoch1 and @JoelBennett ! However, I found esri/config has log level and that can be useful.
... View more
08-09-2023
06:55 PM
|
1
|
0
|
579
|
POST
|
Thanks for replying @JoelBennett . I just don't want to display these console messages coming from the API to our customers as they might be least concerned with that. I know they can be helpful for debugging. But it's better if the API has some flag value or logging level to set.
... View more
08-09-2023
10:43 AM
|
0
|
3
|
591
|
POST
|
How can we disable following types of error messages displayed on the browser console under Developer Tools? Is there any flag with 4.x API? init.js:203 Uncaught (in promise) q {name: 'identity-manager:user-aborted', details: undefined, message: 'ABORTED'}
... View more
08-09-2023
06:01 AM
|
0
|
5
|
694
|
POST
|
I am trying to display custom content in this sample https://codepen.io/b2810s/pen/WNYrveg but it doesn't display or call the creator(). It looks like a bug with the API. Is there any alternative to display custom content on popup without adding graphic or feature layer? I want to display popup with the routes near to the clickpoint. Routes will need be displayed with they hyperlink so, user can click on it and open the route details.
... View more
07-11-2023
11:34 AM
|
0
|
2
|
399
|
POST
|
Is there any way to activate two tools (rectangle and point) on the map based on one button click? If user drags on the map then rectangle should be drawn on the map and if user clicks on the map then point will need to be drawn. I tried to create two instances of SketchViewModel separately for each tool. But both of them are not working simultaneously. The one which is activated last that only works on the map.
... View more
06-01-2023
12:31 PM
|
0
|
0
|
156
|
POST
|
Never mind, I found it by looking at tootipOptions in the debug mode to say totalLength: false. However, it seems the documentation of visibleElements property is missing. In addition, I see there are few issues as well. 1) tooltip doesn't display if the activeTool is 'rectangle' or 'circle' or 'point' or 'multipoint'. 2) tooltip text is wrong if the mode: 'freehand' is selected. It displays 'Click on the map to start drawing'. However, it needs to be dragged to start drawing in this mode. Similar way, it's wrong tooltip text while ending the drawing in this mode. Can anyone from ESRI confirm if these are already known bugs or any workarounds?
... View more
05-25-2023
08:47 AM
|
1
|
0
|
251
|
POST
|
I came across the following thread and it seems tooltipOptions related to 2D MapView was planned in 4.25 as per @HeatherGonzago. https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchlabeloptions-and-sketchtooltipoptions/m-p/1193247#M77959 The way @SumitZarkarCT has added the following code in this thread, it works fine with SketchViewModel. Is there a way to hide Total length related text? I don't see visibleElements property related specification in the SDK documentation. https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#tooltipOptions
... View more
05-25-2023
08:39 AM
|
0
|
1
|
259
|
Title | Kudos | Posted |
---|---|---|
1 | 04-26-2023 09:52 AM | |
1 | 05-25-2023 08:47 AM | |
1 | 08-09-2023 06:55 PM | |
1 | 05-23-2023 09:55 AM | |
1 | 03-16-2015 07:01 AM |
Online Status |
Offline
|
Date Last Visited |
10-06-2023
06:21 AM
|