POST
|
Not sure if this helps, but the save button sounds like it will be shown if your network service is on ArcGIS Online or Portal. https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html#showsavebutton "Applicable if the widget works with a Network Analyst Server federated with ArcGIS Online or Portal. In addition, the widget may display this button in instances where it's needed to save and share routes with Navigator or other client applications. (Added at v3.17)" You could always create your own save button in JavaScript that mimics the default ArcGIS one by applying the same CSS. Something like this: const savePrintButtonContainer = this.map.directions._savePrintBtnContainer;
const savebtn = domConstruct.toDom(
"<div tabIndex='0' role='button' class='esriResultsSave esriDirectionsButton esriDirectionsTabButton' data-blur-on-click='true' data-dojo-attach-point='saveBtn' title='Save Route' id='saveButton' style='display: none;'> \
</div>");
this._saveButton = domConstruct.place(savebtn, savePrintButtonContainer, "last");
$(this._saveButton).on("click", this.saveRoute.bind(this));
... View more
10-27-2021
05:24 AM
|
1
|
5
|
944
|
POST
|
I am working with two polyline layers of which the geometry will be similar, but not exact. I need to be able to take one polyline in one layer and find out if another polyline in the other layer has any sections that overlap. Since the vertices are nearly all different between the layers, I was hoping I could use something like the GeometryEngine intersect function with a tolerance. However, it seems like the tolerance is immutable and is based on the spatial reference (see this post). For the layers I'm working with, the tolerance appears to be 0.001 meters, which isn't enough. I am probably looking for 10 feet. I had considered doing a geodesic buffer around one polyline before doing the intersect, but that will end up being an expensive operation since the buffered polyline could be several hundred miles long. Any suggestions or alternate approaches would be appreciated. Thanks!
... View more
10-27-2021
05:16 AM
|
0
|
0
|
350
|
POST
|
I also have a similar use case. It's also pretty clear what @Anonymous User was asking and there's really no need to get too technical about the definition of a point. I've done this in the past using several of the GeometryEngine functions in the ArcGIS for JavaScript API. You should find similar functions in the ArcGIS Runtime. Buffer the point with the GeometryEngine Geodesic Buffer Get the Intersection of the buffered point and the polyline Rotate the intersection geometry 90 degrees Use GeometryEngine Cut to get the keep geometry and discard geometry
... View more
08-31-2021
06:40 AM
|
0
|
0
|
1083
|
POST
|
Thanks @MattNicol. This worked for me too. Had to use the code behind instead of the designer to add the UserControl.
... View more
08-10-2021
10:33 AM
|
0
|
0
|
861
|
POST
|
@simoxu, was this problem fixed? I seem to be experiencing a similar issue in the ArcGIS API for JavaScript.
... View more
08-06-2021
08:01 AM
|
0
|
1
|
3663
|
POST
|
Thanks, @jcarlson. When working with the Query class in the JavaScript API, I believe we set the num property and the start property. These should be analagous to resultRecordCount and resultOffset parameters in the REST API, which I can see in the Query action for the FeatureLayer in the ArcGIS REST Services Directory. Funny thing, is that it works as expected when doing the query in the ArcGIS REST Services Directory, just not when coming from the client in JavaScript working with Query and making a call to the FeatureLayer's queryFeatures function.
... View more
08-06-2021
07:16 AM
|
0
|
0
|
1728
|
POST
|
I have created a FeatureLayer from a sublayer of a Dynamic Layer. Queries to the FeatureLayer will only return 1,000 features at once. I've used the num and start properties of the Query object to page results in the past, however, both the Dynamic Layer and the sublayer have the Max Record Count property set to 5,000 on the server. So, I'd like to be able to take advantage of that. When I observe my instance of the FeatureLayer in Developer Tools at runtime, it says the maxRecordCount is 1,000. Any ideas why the FeatureLayer continues to default to 1,000? I've referenced other posts here that all suggest setting the MaxRecordCount is the fix. However, to my knowledge, the GIS folks have set this property as suggested.
... View more
08-06-2021
06:38 AM
|
0
|
5
|
1746
|
POST
|
Hi @CourtneyMenikheim, thank you for your insight on this! In my situation, I need the features ordered by their geometry. I've found a convoluted workaround, but if I could just get all features on the route in order, it would be super! I think I've seen that OBJECTID appears to be the default sort; and of course, this is not always in the order of the geometry.
... View more
08-04-2021
12:01 PM
|
1
|
0
|
698
|
POST
|
Thanks, @MaxZeng and @MelindaMorang for your assistance! They are both viable solutions for returning the features traversed on a route. I'll work with our GIS team to implement one of the solutions.
... View more
08-04-2021
03:54 AM
|
1
|
0
|
804
|
POST
|
Hey @MaxZeng, thanks for the info. on the publish routing services utility. I will have a chat with the GIS analyst to see if that's something they're willing to try. I'm guessing there's a performance penalty, but it's something we can test. What we're doing? We're analyzing each route to find all of the bridges, signs, railroad crossings, and other features. Currently, we take the geometry returned from the routing service and query for the underlying route segments in addition to features from a few different feature layers. Returning the underlying features on the route would provide us with some of the information that we must query for. Since we have to perform a spatial "contains" query with a tolerance on these other layers, it would also eliminate the very small adjacent road segments that fall within the tolerance; this mostly occurs when roads intersect at a tight angle. Presently, we're working on providing the user with a route that returns to the start location utilizing the exact same roads as the first trip leg - since these roads have been analyzed and deemed safe. Having only the features traversed on the first trip leg would make this challenge much simpler. Current challenge is getting a list of the features traversed in order. The spatial query to our network source layer (linework) to get the features traversed often returns the features out of order (especially on long routes). To travel the exact same route for the return trip leg, we add a certain number of waypoints as stops to the route's return leg path (which only differs for divided highway segments). However, at the moment, when the features are out of order, sometimes the waypoints we add are also added out of order, causing the route to visit waypoints in a way that adds a lot of extra distance. Any suggestions are welcome.
... View more
08-03-2021
03:38 AM
|
0
|
1
|
825
|
POST
|
Hi @MelindaMorang, no @FabianoFerrazza3 and I are not working together, but his contributions to the question have been very helpful to me. As @FabianoFerrazza3 has stated, it would be great to toggle this feature through the REST API or even the ArcGIS for JavaScript API. As the web application developer, I do not have direct access to our organizations GIS servers, and thus interact with one of the above products through services. This keeps the work on our side of the court, instead of a python script on the server. That said, your explanation has been very helpful, as it helps me learn another option that's available. After a quick discussion with the GIS analyst that I'm working with, and based on your comments, it seems that there's no way to return edges without the python script. Thanks again!
... View more
08-02-2021
11:46 AM
|
1
|
0
|
851
|
POST
|
I agree that ideally, this would be a REST parameter that could be set. After reading through some of the docs, it seems that turning on some parameters on the network analyst service, such as returnRouteEdges might do the trick? My knowledge of this side of things is limited, as I'm a developer working on a GIS project, and not a GIS professional. I saw a property for the Network Analyst, routeShapeType, which sounds like setting to TrueShape might return the underlying features? https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/routeshapetype.htm I saw a similar property to the routeShapeType in the ArcGIS for JavaScript API: https://developers.arcgis.com/javascript/3/jsapi/routeparameters-amd.html#outputlines
... View more
08-02-2021
09:26 AM
|
0
|
0
|
1266
|
POST
|
Thanks @MelindaMorang! I'll read through those documents to see if I am able to find an approach that will work. I'll add another post here once I've come to a conclusion.
... View more
08-02-2021
08:30 AM
|
0
|
1
|
1285
|
POST
|
Is it possible to have the Network Analyst return the features (route segments) on a route? It seems we only get the merged geometry and directions.
... View more
08-02-2021
06:54 AM
|
1
|
14
|
2175
|
POST
|
I'm using ArcGIS for JavaScript 3.36. I have the geometry for a route from the Directions widget. Using the geometry, I query the FeatureLayer that contains the route linework to get the features that are contained in the geometry. This works. However, when the results come back from the query, the features are not in order from one end of the geometry to the other. What determines the order that the features come back in when no order by fields are provided? How can I ensure the features come back in order? If that isn't possible, is there a function in the ArcGIS API for JavaScript to join the features in the order based on their geometry? Thanks to anyone out there that has any input on this. This is my query: const query = new Query();
query.returnGeometry = true;
query.outSpatialReference = new SpatialReference(102100);
query.geometry = geometry;
query.spatialRelationship = Query.SPATIAL_REL_CONTAINS;
query.outFields = ["*"];
query.distance = 3;
query.units = "feet";
const prom = layers.routesFeatureLayer.queryFeatures(query);
... View more
07-30-2021
06:43 PM
|
0
|
2
|
763
|
Title | Kudos | Posted |
---|---|---|
1 | 09-15-2016 05:40 AM | |
1 | 10-27-2021 05:24 AM | |
1 | 08-04-2021 12:01 PM | |
1 | 08-04-2021 03:54 AM | |
1 | 08-02-2021 11:46 AM |
Online Status |
Offline
|
Date Last Visited |
06-08-2023
08:03 PM
|