|
POST
|
The closest I've gotten is to take the data = {} that is populated from my SearchCursor and reset it with: data = sorted(data["junctionMatrix"], key=lambda x: (x["juncA"], x["juncB"]))
... View more
10-09-2018
11:23 AM
|
0
|
2
|
1977
|
|
POST
|
Yes, in the manner of the second output example above!
... View more
10-09-2018
11:19 AM
|
0
|
2
|
1977
|
|
POST
|
I just can't stand Stackexchange so asking some familiar folks around here for some assistance with rearranging a dictionary that I'm building from an arcpy.da.SearchCursor. Not really arcpy-specific that I need help with -- what I need is to take this dictionary: {
"junctionMatrix": [
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1A",
"juncB": "S-1B",
"juncDistance": 5475.69
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1B",
"juncB": "S-1A",
"juncDistance": 5475.69
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1A",
"juncB": "S-1C",
"juncDistance": 8140.32
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1C",
"juncB": "S-1A",
"juncDistance": 8140.32
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1B",
"juncB": "S-1C",
"juncDistance": 6891.71
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1C",
"juncB": "S-1B",
"juncDistance": 6891.71
}
]
} ...and rearrange so that values are sorted in this manner: {
"junctionMatrix": [
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1A",
"juncB": "S-1B",
"juncDistance": 5475.69
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1A",
"juncB": "S-1C",
"juncDistance": 6891.71
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1B",
"juncB": "S-1A",
"juncDistance": 5475.69
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1B",
"juncB": "S-1C",
"juncDistance": 6891.71
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1C",
"juncB": "S-1A",
"juncDistance": 8140.32
},
{
"WCU": "STA1E_CELL_7",
"juncA": "S-1C",
"juncB": "S-1B",
"juncDistance": 6891.71
}
]
} Any suggestions are appreciated!
... View more
10-09-2018
10:34 AM
|
0
|
7
|
2293
|
|
POST
|
I'm marking your answer as correct because it made me go back into the config.json to review it, which I determined that the proxy details were missing. This is similar to what happens with the appId attribute as well I think and must be manually re-added when exporting from WAB Developer prior to deployment. Thanks!
... View more
09-28-2018
11:24 AM
|
1
|
0
|
1966
|
|
POST
|
yes, thru a proxy. Also, I just looked at the config.json file of the deployed app and noticed that the proxy info was stripped out. I've replaced it back in and will retest.
... View more
09-28-2018
10:27 AM
|
0
|
0
|
1966
|
|
POST
|
{ "theme": { "name": "LaunchpadTheme", "styles": [ "default", "style2", "style3" ], "version": "2.7", "sharedTheme": { "isPortalSupport": true, "useHeader": false, "useLogo": false } }, "portalUrl": "http://ourorginzationaccount.arcgis.com", "appId": "NTXNURBVvcV1qjq3", "authorizedCrossOriginDomains": [], "title": "AVATAR GeoTool v1.3 - DEV", "subtitle": "SFWMD Geospatial Services", "keepAppState": true, "logo": "images/logo.png", "geometryService": "https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer", "links": [], "widgetOnScreen": { "widgets": [ { "uri": "themes/LaunchpadTheme/widgets/AnchorBarController/Widget", "position": { "bottom": 10, "height": 40, "relativeTo": "map", "zIndex": 0 }, "version": "2.7", "id": "themes_LaunchpadTheme_widgets_AnchorBarController_Widget_20", "name": "AnchorBarController" }, { "uri": "themes/LaunchpadTheme/widgets/Header/Widget", "position": { "left": 15, "top": 17, "width": 670, "height": 46, "relativeTo": "map" }, "version": "2.7", "id": "themes_LaunchpadTheme_widgets_Header_Widget_21", "name": "Header" }, { "uri": "widgets/Search/Widget", "position": { "left": 350, "top": 25, "width": 300, "zIndex": 1, "relativeTo": "map" }, "version": "2.7", "id": "widgets_Search_Widget_22", "name": "Search", "config": "configs/Search/config_widgets_Search_Widget_22.json" }, { "uri": "widgets/OverviewMap/Widget", "position": { "right": 20, "top": 20, "relativeTo": "map" }, "version": "2.7", "id": "widgets_OverviewMap_Widget_23", "name": "OverviewMap" }, { "uri": "widgets/ZoomSlider/Widget", "position": { "left": 25, "top": 95, "relativeTo": "map" }, "version": "2.7", "id": "widgets_ZoomSlider_Widget_24", "name": "ZoomSlider" }, { "uri": "widgets/HomeButton/Widget", "position": { "left": 25, "top": 175, "relativeTo": "map" }, "id": "widgets_HomeButton_Widget_25", "name": "HomeButton", "version": "2.7" }, { "uri": "widgets/MyLocation/Widget", "position": { "left": 25, "top": 215, "relativeTo": "map" }, "version": "2.7", "id": "widgets_MyLocation_Widget_26", "name": "MyLocation" }, { "uri": "", "version": "2.7", "position": { "right": 20, "bottom": 80, "relativeTo": "map" }, "closeable": true, "id": "widgets_AttributeTable_Widget_27", "placeholderIndex": 1 }, { "uri": "widgets/Coordinate/Widget", "position": { "left": 20, "bottom": 60, "relativeTo": "map" }, "id": "widgets_Coordinate_Widget_28", "name": "Coordinate", "version": "2.7", "config": "configs/Coordinate/config_widgets_Coordinate_Widget_28.json" }, { "uri": "widgets/Scalebar/Widget", "position": { "left": 27, "bottom": 25, "relativeTo": "map" }, "version": "2.7", "id": "widgets_Scalebar_Widget_29", "name": "Scalebar" }, { "uri": "widgets/Splash/Widget", "visible": false, "position": { "relativeTo": "browser" }, "version": "2.7", "id": "widgets_Splash_Widget_30", "name": "Splash" }, { "position": { "right": 130, "top": 20, "relativeTo": "map" }, "placeholderIndex": 2, "id": "_31" }, { "position": { "right": 180, "top": 20, "relativeTo": "map" }, "placeholderIndex": 3, "id": "_32" }, { "position": { "right": 230, "top": 20, "relativeTo": "map" }, "placeholderIndex": 4, "id": "_33" }, { "uri": "widgets/ExtentNavigate/Widget", "visible": false, "position": { "top": 255, "left": 25, "relativeTo": "map" }, "version": "2.7", "id": "widgets_ExtentNavigate_Widget_34", "name": "ExtentNavigate" }, { "uri": "widgets/FullScreen/Widget", "visible": false, "position": { "right": 70, "top": 20, "relativeTo": "map" }, "version": "2.7", "id": "widgets_FullScreen_Widget_35", "name": "FullScreen" } ], "panel": { "uri": "jimu/OnScreenWidgetPanel", "position": { "relativeTo": "map" } } }, "map": { "3D": false, "2D": true, "position": { "left": 0, "top": 0, "right": 0, "bottom": 0 }, "itemId": "6105664672a240848db818762b861918", "mapOptions": {}, "id": "map", "portalUrl": "http://ourorganizationaccount.arcgis.com", "mapRefreshInterval": { "useWebMapRefreshInterval": true } }, "widgetPool": { "panel": { "uri": "themes/LaunchpadTheme/panels/LaunchpadPanel/Panel", "position": { "relativeTo": "map" } }, "widgets": [ { "name": "Avatar Tool Workplan", "version": "1.0", "uri": "widgets/Avatar Tool Workplan/Widget", "config": "configs/Avatar Tool Workplan/config_widgets_Avatar Tool Workplan_Widget_42.json", "index": 2, "id": "widgets_Avatar Tool Workplan_Widget_42" }, { "name": "Avatar Tool Schedule", "version": "1.0", "uri": "widgets/Avatar Tool Schedule/Widget", "config": "configs/Avatar Tool Schedule/config_widgets_Avatar Tool Schedule_Widget_43.json", "index": 3, "id": "widgets_Avatar Tool Schedule_Widget_43" }, { "name": "Avatar Tool DailyActivityLog", "version": "1.0", "uri": "widgets/Avatar Tool DailyActivityLog/Widget", "config": "configs/Avatar Tool DailyActivityLog/config_widgets_Avatar Tool DailyActivityLog_Widget_44.json", "index": 4, "id": "widgets_Avatar Tool DailyActivityLog_Widget_44" }, { "name": "LayerList", "version": "2.7", "uri": "widgets/LayerList/Widget", "config": "configs/LayerList/config_widgets_LayerList_Widget_38.json", "index": 5, "id": "widgets_LayerList_Widget_38" }, { "name": "BasemapGallery", "version": "2.7", "uri": "widgets/BasemapGallery/Widget", "config": "configs/BasemapGallery/config_widgets_BasemapGallery_Widget_39.json", "index": 6, "id": "widgets_BasemapGallery_Widget_39" }, { "name": "AdvDraw", "version": "1.2", "uri": "widgets/AdvDraw/Widget", "config": "configs/AdvDraw/config_widgets_AdvDraw_Widget_41.json", "index": 7, "id": "widgets_AdvDraw_Widget_41" }, { "name": "Print", "label": "PDF", "version": "2.7", "uri": "widgets/Print/Widget", "config": "configs/Print/config_widgets_Print_Widget_40.json", "index": 8, "id": "widgets_Print_Widget_40" }, { "name": "AddData", "version": "2.7", "uri": "widgets/AddData/Widget", "config": "configs/AddData/config_widgets_AddData_Widget_45.json", "index": 9, "id": "widgets_AddData_Widget_45" } ], "groups": [] }, "mobileLayout": { "widgetOnScreen": { "widgets": [ { "uri": "themes/LaunchpadTheme/widgets/AnchorBarController/Widget", "position": { "bottom": 0, "height": 40, "width": "100%", "zIndex": 0, "relativeTo": "map" }, "version": "2.7" }, { "uri": "themes/LaunchpadTheme/widgets/Header/Widget", "position": { "left": 0, "right": 0, "top": 0, "height": 46, "relativeTo": "map" }, "version": "2.7" }, { "uri": "widgets/Search/Widget", "position": { "left": 10, "top": 10, "right": 10, "zIndex": 0, "relativeTo": "map" }, "version": "2.7" }, { "uri": "widgets/OverviewMap/Widget", "position": { "right": 20, "top": 20 }, "version": "2.7" }, { "uri": "widgets/ZoomSlider/Widget", "position": { "right": 10, "bottom": 160, "relativeTo": "map" }, "version": "2.7" }, { "uri": "widgets/HomeButton/Widget", "position": { "right": 10, "bottom": 75, "relativeTo": "map" } }, { "uri": "widgets/MyLocation/Widget", "inPanel": false, "position": { "right": 10, "bottom": 115, "relativeTo": "map" }, "version": "2.7" }, { "uri": "widgets/AttributeTable/Widget", "version": "2.7", "position": { "left": 10, "bottom": 70, "relativeTo": "map" }, "closeable": true }, { "uri": "widgets/Coordinate/Widget", "position": { "left": 20, "bottom": 60 } }, { "uri": "widgets/Scalebar/Widget", "position": { "left": 50, "bottom": 70, "relativeTo": "map" }, "version": "2.7" }, { "uri": "widgets/Splash/Widget", "visible": false, "position": { "relativeTo": "browser" }, "version": "2.7" }, { "position": { "left": 10, "bottom": 195, "relativeTo": "map" } }, { "position": { "left": 10, "bottom": 155, "relativeTo": "map" } }, { "position": { "left": 10, "bottom": 115, "relativeTo": "map" } }, { "uri": "widgets/ExtentNavigate/Widget", "visible": false, "position": { "right": 10, "bottom": 238, "relativeTo": "map" }, "version": "2.7" }, { "uri": "widgets/FullScreen/Widget", "visible": false, "position": { "right": 70, "top": 20 }, "version": "2.7" } ] }, "map": { "position": { "left": 0, "top": 0, "right": 0, "bottom": 0 } }, "widgetPool": { "panel": { "uri": "themes/LaunchpadTheme/panels/LaunchpadPanel/Panel" } } }, "loadingPage": { "backgroundColor": "#508dca", "backgroundImage": { "visible": false }, "loadingGif": { "visible": true, "uri": "configs/loading/images/predefined_loading_1.gif", "width": 58, "height": 29 } }, "wabVersion": "2.7", "isTemplateApp": true, "isWebTier": false, "httpProxy": { "useProxy": false, "alwaysUseProxy": false, "url": "https://somepathtotheproxy/proxy.jsp", "rules": [ { "urlPrefix": "somepathtotheservice/FeatureServer/", "proxyUrl": "https://somepathtotheproxy/proxy.jsp" } ] }, "dataSource": { "dataSources": {}, "settings": {} }, "logoLink": "" }
... View more
09-27-2018
02:02 PM
|
0
|
3
|
1966
|
|
POST
|
I re-deployed a WAB created with Web AppBuilder Developer edition 2.7 and it will not open. Only the loading spinner and it looks like the 403 errors for dojo resources? Not sure if this is something getting blocked (by a system/environment change) or I’ve altered something in the WAB to cause this. Looking at the requrest url I notice it’s doubling up on appst.sfwmd.gov for some reason? Request URL: https://somedomain.com//somedomain.com//jsapi/jsapi/dojo/resources/dojo.css
... View more
09-27-2018
10:51 AM
|
0
|
7
|
2105
|
|
DOC
|
Running into an issue when executing the DownloadServicewithAttachments.py script from the IDE with hardcoded variables (rather than the toolbox). (we want to execute this via task scheduler is the reason why). This is the message that prints in the IDE interpreter window: C:\Python27\ArcGISx6410.4\lib\site-packages\requests-2.6.0-py2.7.egg\requests\packages\urllib3\connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning) C:\Python27\ArcGISx6410.4\lib\site-packages\requests-2.6.0-py2.7.egg\requests\packages\urllib3\connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning)
... View more
09-27-2018
07:44 AM
|
0
|
0
|
14799
|
|
DOC
|
Just as an FYI: because we had requirements and implementation deadlines to maintain, we opted to modify the advanced draw widget by removing the check box that allowed for measurements to be made when a graphic was drawn. We liked the extra functionality of the drawing capabilities, and so did our user base! However, the incorrect measurements were a deal breaker. By removing that option, we forced users to open the ESRI Measurement widget to get those values instead. This allows us to keep the cool graphic drawing capability and removes possible incorrect area measurement reporting. The downside to doing this type of modification is version control of the library of widgets your shop maintains. That is, you have to be careful every time you upgrade to new WAB Developer editions you must be sure to pull in the modified list of widgets!
... View more
09-17-2018
12:38 PM
|
0
|
0
|
18206
|
|
DOC
|
Ah, I think I understand and will give that a go. My bad. Thanks again. Edit: I think what I implemented will work and has much less alterations made to the original codebase and probably less chance of negative impacting that excellent widget! //Altered 9/17/2018 for Insights
else if (myObject.queryLayer && !myObject.esearch) {
if (myObject.queryLayer == 'structure') {
myObject.slayer = 1
} else if (myObject.queryLayer == 'site') {
myObject.slayer = 0
}
var valuesObj2 = lang.clone(this.config.layers[myObject.slayer].expressions.expression[myObject.exprnum || 0].values.value);
this.paramsDijit.build(valuesObj2, this.resultLayers[myObject.slayer], this.config.layers[myObject.slayer].url,
this.config.layers[myObject.slayer].definitionexpression);
on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
if (attribOptions.length > 1) {
this.selectLayerAttribute.set('value', myObject.slayer);
}
}));
... View more
09-17-2018
12:20 PM
|
0
|
0
|
11576
|
|
DOC
|
Robert, This was a while ago and had to drop the attempt but I did try to add what I thought you said were the changes (lines 48 thru 56 of your code sample) but it didn't do what I was expecting. Here's what I implemented before but the widget loads with the Search Layer (index 0) and I didn't quite understand how this gets the url parameter and apply the logic to set that search layer based upon that parameter value. } else if(myObject.slayer && !myObject.esearch) {
var valuesObj2 = lang.clone(this.config.layers[myObject.slayer].expressions.expression[myObject.exprnum || 0].values.value);
this.paramsDijit.build(valuesObj2, this.resultLayers[myObject.slayer], this.config.layers[myObject.slayer].url,
this.config.layers[myObject.slayer].definitionexpression);
on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
if(attribOptions.length > 1){
this.selectLayerAttribute.set('value', myObject.slayer);
}
}));
}
... View more
09-17-2018
11:45 AM
|
0
|
0
|
11577
|
|
DOC
|
(Edit: I've added my initial attempt below) Hi Robert, I have a requirement to set the "Search Layer" on load of the application based upon a url parameter value. Something like this, where "queryLayer=structure" so make the Search layer default to the preconfigured "Structures" search rather than the default "Sites" search: I've got the easy part to get the url parameter value, but I'm hesitant to ruin your perfectly good search widget with my feeble attempt to modify it. I figured it best to get your feedback and perhaps some tips on how best to try and implement this. Here's my attempt. I've updated the "_initLayerSelect" function (around line #1106), my edit here is an additional else if from the "if (myObject.esearch){" and has a crude/simplistic reset of the aIndex variable. Then I just copied what I thought "sets up" the default widget search when it loads. This actually seems to work! However: 1. The default label in the dropdown doesn't change. 2. It's untested to reveal what other thing(s) it may have broken elsewhere! //Altered 9/17/2018 for DBHYDRO Insights
else if (myObject.queryLayer && !myObject.esearch) {
if (myObject.queryLayer == 'structure') {
var aIndex1 = 1
} else {
var aIndex1 = 0
}
//var valuesObj2 = lang.clone(this.config.layers[myObject.slayer].expressions.expression[myObject.exprnum || 0].values.value);
//this.paramsDijit.build(valuesObj2, this.resultLayers[myObject.slayer], this.config.layers[myObject.slayer].url,
// this.config.layers[myObject.slayer].definitionexpression);
//on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
// if (attribOptions.length > 1) {
// this.selectLayerAttribute.set('value', myObject.slayer);
// }
//}));
var aIndex = aIndex1 //attribOptions[0].value;
this.AttributeLayerIndex = aIndex;
this._initSelectedLayerExpressions();
if (this.config.layers[aIndex].expressions.expression.length > 0) {
var valuesObj = lang.clone(this.config.layers[aIndex].expressions.expression[0].values.value);
html.empty(this.textsearchlabel);
if (this.config.layers[aIndex].expressions.expression[0].textsearchlabel !== "") {
html.place(html.toDom(this.config.layers[aIndex].expressions.expression[0].textsearchlabel), this.textsearchlabel);
html.style(this.textsearchlabel, 'display', 'block');
} else {
html.style(this.textsearchlabel, 'display', 'none');
}
this.paramsDijit.build(valuesObj, this.resultLayers[aIndex], this.config.layers[aIndex].url,
this.config.layers[aIndex].definitionexpression);
on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
this.paramsDijit.setFocusOnFirstParam();
}));
}
}
... View more
09-17-2018
10:42 AM
|
0
|
0
|
11577
|
|
POST
|
Much appreciated! But.. eww. I'd have a difficult time translating this into product documentation in the event another developer takes over this implementation! I've deployed a version that simply creates an in_memory feature class with the polygon(s) and that participates in a clip process --- I had been only using the polygon itself to clip with, and I'll likely go back in and change it to your previous solution. Ultimately this all gets wrapped up into GP tool and published as a service so I'd prefer to keep things like map services and features as-is rather than in_memory fc's and such.
... View more
09-12-2018
01:18 PM
|
0
|
0
|
2940
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-17-2020 10:47 AM | |
| 1 | 10-25-2022 11:46 AM | |
| 1 | 08-08-2022 01:40 PM | |
| 1 | 02-15-2019 08:21 AM | |
| 2 | 08-14-2023 07:14 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-22-2025
02:28 PM
|