|
POST
|
Hi @GuillaumeArnaud, thanks for posting your question here. I'm not 100% sure what the issue is based on your code snippet here, but I put together an example of using query with a featureLayer in a different spatial reference: https://codepen.io/noash/pen/gOxjarN?editors=1000 I think the confusion might be between esri/rest/query and esri/rest/support/Query, hopefully the sample above makes it more clear. https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-query.html https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html If this doesn't help, can you post more of your relevant code so I can better diagnose?
... View more
11-10-2021
06:46 AM
|
0
|
3
|
3477
|
|
POST
|
Saving to a portal can be easily accomplished with the Directions widget itself. Look at line 51 here: https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic Another option is to use the RouteTask to handle the routing between points: https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=routetask_multiple_stops Also worth noting, if you're starting a new project, I highly recommend the 4x directions widget, which will soon have saving to portal as an option as well, and is the more modern and recommended approach: https://developers.arcgis.com/javascript/latest/sample-code/widgets-directions/
... View more
11-05-2021
08:35 AM
|
0
|
1
|
2211
|
|
POST
|
You should try the locationToAddress() method, not the addressesToLocations() method like in your code snippet above.
... View more
11-05-2021
08:30 AM
|
1
|
1
|
2085
|
|
POST
|
Hi @nadmoat, thanks for the question. What are you trying to accomplish? If you open the developer tools of your browser and look at the network traffic, you can see the Format and Layout_Template in the request: You could also listen for an event when the printing is fired off and discover the Layout and Format that way: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#events-summary
... View more
11-05-2021
08:01 AM
|
0
|
0
|
1400
|
|
POST
|
Another great question. It's there in the Route Parameters, just took some digging to find. Try this: directionsW.on("directions-finish", changeHandler);
function changeHandler(data) {
console.log("travelMode: ", data.target.routeParams.travelMode.name);
}
... View more
11-05-2021
07:51 AM
|
1
|
1
|
1517
|
|
POST
|
Hi @LindaLin, is this for a school or work assignment? I would recommend the Get started page on the ArcGIS API for JavaScript site, and then go through some tutorials to get a feel for how the API works. https://developers.arcgis.com/javascript/latest/get-started/
... View more
11-04-2021
08:09 AM
|
1
|
1
|
1448
|
|
POST
|
Hi @benchikh, offhand, I don't think we have a sample that does this, but you could use the locationToAddress method on the Locator class to generate an address from each of the point. https://developers.arcgis.com/javascript/3/jsapi/locator-amd.html#locationtoaddress And then pass these to the Directions widget using the addStops method. https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html#addstops Hope this helps!
... View more
11-04-2021
08:06 AM
|
1
|
3
|
2101
|
|
POST
|
Hi @benchikh, thanks for posting your question here. If you're on 3x (and I do recommend using 4x if you have the ability; we have a lot of exciting Directions work in development there), then you can use the directions-finish event to grab the route results from the Directions widget. https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html#event-directions-finish The route result should have all the information you need. You can save it as a portal item and share it easily, or handle it locally as you wish. https://developers.arcgis.com/javascript/3/jsapi/routeresult-amd.html Hope this helps!
... View more
11-04-2021
07:59 AM
|
0
|
3
|
2223
|
|
POST
|
Hi @bkolliboina, this sounds like an interesting project. Are you looking for an ArcGIS Online solution with no coding, or are you looking to build a custom app with the ArcGIS API for JavaScript? For showing the locations of stations already stopped at, and for the actual delay time, where is that data coming from? And what do you mean by no manual entry? Sorry, lots of questions.
... View more
11-01-2021
07:01 AM
|
0
|
0
|
1172
|
|
POST
|
You should be able to listen to the `directions-finish` event, which returns a RouteResult that you can then handle as you wish. https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html#event-directions-finish
... View more
10-28-2021
06:45 AM
|
1
|
3
|
2561
|
|
POST
|
It's difficult to tell from the code snippet. Couple questions that might help troubleshoot: What do you mean by doesn't work? Is there an error message in the console? What does the network request to the locator look like? Are you sure the locator is working properly? Is the locator service configured to handle the defined property values correctly?
... View more
10-28-2021
06:43 AM
|
0
|
1
|
1480
|
|
POST
|
Another option is to try your route service in the sample below to make sure it works (uncomment line 51). https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic
... View more
10-27-2021
06:34 AM
|
0
|
1
|
3197
|
|
POST
|
Glad to hear it @MichaelBoschert. Please feel free to mark my post as the solution if it answered your question.
... View more
10-20-2021
06:28 AM
|
0
|
0
|
4433
|
|
POST
|
What is your goal? You can use Map Notes to quickly add text to the map: https://developers.arcgis.com/javascript/latest/sample-code/layers-mapnoteslayer/ You can also extend the Sketch widget using the ViewModel, and assign a TextSymbol to the pointSymbol property: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#pointSymbol
... View more
10-19-2021
12:55 PM
|
1
|
1
|
4440
|
|
POST
|
Here's a great blog article about using the GeoPackage with ArcGIS Pro. https://www.esri.com/arcgis-blog/products/product/data-management/how-to-use-ogc-geopackages-in-arcgis-pro/ I don't think the ArcGIS API for JavaScript can't consume a GeoPackage directly. But if you can convert and publish as a feature layer, or as part of a webmap, then it should work fine.
... View more
10-19-2021
12:49 PM
|
1
|
0
|
1530
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 04-14-2026 11:59 AM | |
| 1 | 05-13-2026 10:29 AM | |
| 1 | 04-10-2026 09:11 AM | |
| 1 | 03-24-2026 11:39 AM |
| Online Status |
Online
|
| Date Last Visited |
Thursday
|