|
POST
|
That's right. You can configure it one way or the other, but you cannot switch on the fly.
... View more
11-03-2017
01:24 AM
|
0
|
0
|
2736
|
|
POST
|
Just in case someone's interested: No, it's not possible to do that in a WebMap. I've solved the issue for my use case by adding the same layer again as an additional data source in the Web AppBuilder. This way, you can use it as input for the Dashboard Infographic Widget and the queries are not restricted to the map extent.
... View more
09-06-2017
02:03 AM
|
1
|
2
|
2736
|
|
POST
|
Hey all, I know this is an old question, but I'd like to revive the discussion, because I'm having the exact same problem. Use case: I'm using ArcGIS webappbuilder with the brand new dashboard theme andinfographic widget. The customer wants the "Filter by extent" option to be configurable, and therefore, I need to load the FeatureLayer in Snapshot Mode. The customer wants no programming, which means, no instantiating the FeatureLayer in the code and defining Snapshot mode there. I need to configure this setting in the WebMap or the WebApp, but I didn't find a switch for that. Can someone help? Thanks, Nik
... View more
08-28-2017
05:56 AM
|
0
|
3
|
2736
|
|
POST
|
Kelly, thanks for your reply. Actually no: I'm not trying to color single segments, but the whole part of a route between 2 stops. Iterating through the segments (and looking for the "esriDMTDepart" direction where my part starts and "esriDMTStop" where it ends) is what I was talking about in the first paragraph of my description above. But then I still have to decode the compressedGeometries, combine all segments from one stop to the next and draw the line (in a different color) on top the graphic that is being drawn by the Directions Widget anyway. This should be invisible to the end user, so it is possible to do what I want with this approach, but from a development point of view, it's a bit ugly. My thought was to use the uncompressed route geometry and draw the whole thing myself, but then I realized that only one line comes back for the whole route, even though the returned JSON object is a Polyline. So we get an array of lines that always contains only one line. I'm suggesting that this should be separated into sections between stops (or the segments as uncompressed geometry) by the naserver. Of course it would only be a performance win, if I could switch off route drawing on the directionswidget. Btw, I'm using the Directions widget without displaying the directions on the screen. Afaik there's no switch to disable directions on the Directions widget, so I'm hiding them via CSS. I'm wondering if I'm the only one who just needs a good UI for route calculation and no directions, but I guess that it's not such an uncommon use case. I think, flags to turn off route drawing and directions would be a nice enhancement to the Directions widget. What do you think? (Rene Rubalcava?) Anyway, I've handed in a idea and another idea. Cheers, Nik
... View more
08-18-2017
02:20 AM
|
0
|
0
|
1269
|
|
IDEA
|
If setting returnRoutes=true in the response if the "NAServer/Route" operation only one Line Geometry comes back for the whole route, even though the returned JSON object is a Polyline. In other words: We get an array of lines that always contains only one line. I'm suggesting that this should be separated into sections between stops (or the directions segments as uncompressed geometry) by the NAServer. Use case for this is that only a section between two stops is supposed to be drawn. If you want to do that with the JS API, you currently need to iterate through the segments (in routeResults.result.routeResults[0].directions ) while looking for the "esriDMTDepart" direction where the section starts and "esriDMTStop" where it ends, then decode the compressedGeometries, combine all segments from one stop to the next and draw the line. It's possible but ugly, from a development point of view.
... View more
08-18-2017
02:20 AM
|
0
|
0
|
1348
|
|
IDEA
|
I'm using the Directions widget without displaying the directions on the screen. Afaik there's no switch to disable directions on the Directions widget, so I'm hiding them via CSS. I guess that it's a pretty common use case to just use the Directions widget as a good UI for route calculation. Another use case I have requires to draw the route manually from the JS code, so I need to hide the route that is drawn by the Directions widget. Of course it would only be a performance win, if I could switch off route drawing in the first place. I'm suggesting flags to turn off route drawing and directions display on the Directions widget.
... View more
08-18-2017
02:12 AM
|
0
|
0
|
997
|
|
POST
|
Hello all, I'd like to display a specific part of a routing result in a different color than the others. I thought this would be easy, but it seems that it's not. I'm using the Directions Widget of the JS API, and the standard config allows me to define a symbol for the whole route or for the selected segment (which is a direction segment, not the whole part from one stop to the next). So I could look for the "esriDMTDepart" direction where my part starts, decode all the compressedGeometries until the next "esriDMTStop" and draw them manually on the map over the route that is being drawn anyway. This is a bit ugly, so I'm going one level deeper to the NAServer REST API. The routing service is able to give back a Polyline route geometry (return routes = true), but as far as I can see, it is always one line for the whole route. It won't mark where the stops are or separate the route geometry into parts between the stops. Scott Sandusky, Matt Crowder: To my opinion, this is a missed chance, because the Polyline JSON object is an array of several line objects. There is no way to quickly tell where the stops are located on the line that comes back, because the coordinates of polyline points and stop point don't match exactly. Manual search shows that they may match up to the 5th decimal digit or so, but not to the end. I could try to develop an approximation method to determine where the stops are located on the route line, but I'm not sure if this would produce reliable results.. or send an extra HTTP call for the part of the route that I want to draw differently, but that's of course costly and redundant. Am I missing something? Does anyone have a good idea what to do? Thanks Nik
... View more
08-15-2017
08:39 AM
|
1
|
2
|
1559
|
|
POST
|
In the meantime, I've opened up a support case and the missing button has become an enhancement request. ENH-000106066 : Add the "ZOOM TO FULL ROUTE" option back to the Directions widget. BUG-000106065 : When using the Directions widget if the user adds stops by clicking on the map the map does not zoom to the extent of the route automatically.
... View more
06-23-2017
03:13 AM
|
1
|
0
|
2180
|
|
POST
|
Yeah, that's possible.. but I actually hope that they've lost the button by accident and that it will be included again.
... View more
06-22-2017
06:36 AM
|
0
|
1
|
2180
|
|
POST
|
Max, try overriding the Directions class like this: var NoZoomDirections = declare(Directions, {
zoomToFullRoute: function () {
console.log("overriding zoomToFullRoute");
}
});
var directionsWidget = new NoZoomDirections(/*... the usual instantiation */); Works for me. I only get the console message, not the zoom. If you want to have the zoomToFullRoute() functionality in some cases, you'd need to add this.inherited(arguments); into the new function body along with a conditional statement. About what you and Robert Scheitlin, GISP said about when the map is automatically zoomed in or not: I've had exactly that issue and described it here: Zoom button and auto zoom in Directions widget. Maybe you could take a look at it and verify the problem. Cheers, Nik
... View more
06-22-2017
04:31 AM
|
0
|
1
|
1306
|
|
POST
|
I'm experiencing two issues with the Directions widget of the JS API: The first issue came in with API version 3.19: The “Zoom to full route” button was available up to API version 3.18 and is missing now. Our customers would like to have it back. The 2 nd issue was probably always there: After performing “autoSolve” the Directions widget does not zoom to the route. Only after hitting “Get Directions”, the map will zoom in to the route. The issue didn’t attract so much attention before, because you could just hit the “Zoom to full route” button, which you can’t anymore now. The attached screenshots show the behavior. You can reproduce the issue by using the sample at https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic: Add 2 locations and let the widget auto solve the route. It won’t zoom to the routing result. Only after hitting “Get directions”, the zoom will occur. Alter the code to use API version 3.18 instead of 3.20: The “Zoom to full route” button will appear above the directions list after calculating the first route. The button is missing in API version 3.19 and 3.20. The JS API documentation says: esriResultsViewFullRoute Class assigned to the 'Zoom to full route' button. /*Change the color of the Zoom to full route text*/ .simpleDirections .esriResultsViewFullRoute{ color:#999; } I’d say this proves that the button is not intended to be missing. odoe any idea?
... View more
06-22-2017
02:17 AM
|
0
|
3
|
2837
|
|
POST
|
Hi Matt, your question is already a few days old, but let me add an idea: Your gallery shows a lot of "Token required" and "no permission" errors in your application, not the JS errors you see when you have issues in your code (like when referencing a property on an "undefined" object). It looks to me like there is some element that the end user is not allowed to see. I can't tell you what it is, because usually those messages refer to protected map layers, maybe some service used in the back, but as far as I can see you're only using one layer which is visible. Furthermore, you still seem to be logged in, which makes it even more strange that you shouldn't be allowed to see some of your stuff. And as your app is still on ArcGIS Online and not on your own web server, there's only so much you can do. Maybe some path to a background reference is being messed up when creating the app. This would be a question to AGO or JS guys (like Rene Rubalcava, who is usually very helpful on GeoNet). If you'd like to do some more research, here's what I try in these situations: Try downloading the app and hosting it on your own web server (local IIS, node.js or something). Register the app with your AGO subscription so your credentials are passed through to the web map and all referenced items. If this doesn't help, you can also implement the JS proxy page and play around with that, maybe you can find something out. (Doesn't help if you want AGO to host the final version of your app though.) Good luck! Nik
... View more
06-22-2017
02:01 AM
|
1
|
0
|
2873
|
|
POST
|
Anandi, might it have something to do with this: Statistics missing on Promise object? Best regards Nik
... View more
06-13-2017
05:56 AM
|
0
|
0
|
452
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-24-2025 03:06 AM | |
| 1 | 11-09-2023 02:10 AM | |
| 2 | 11-09-2023 01:47 AM | |
| 1 | 07-13-2022 01:28 AM | |
| 2 | 07-12-2022 01:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-28-2025
04:07 AM
|