POST
|
var forwardStar = (IForwardStarGEN)geomNetwork.Network.CreateForwardStar(false, null, null, null, null);
... View more
09-29-2021
07:43 PM
|
0
|
0
|
305
|
POST
|
Robert, I found another location where it would be helpful to be able to use the name value pair from my config file. It's in a FeatureAction in a couple of my widgets. Do you know how I can get access to "this.config" within a FeatureAction? Greg
... View more
09-19-2018
06:19 PM
|
0
|
1
|
404
|
POST
|
Robert, this.config.oneUrl is not defined in postCreate but it is available and accessible in the startup function. Thank you for the help on this. Greg
... View more
09-18-2018
02:21 PM
|
0
|
2
|
404
|
POST
|
Robert, Yes, I do have return declare([BaseWidget], { further down. The parser is used for SVG. When I attempt to get my custom config file from "this" inside the postCreate: function I see a "config:" and when expanded I see the data within my custom json file. So, it's not using my custom name but rather "config:". But when I try to access "this.config" it is undefined. If you need to see the entire widget.js file I would need a secure way of sending it to you. I do not feel comfortable placing the entire contents here. Greg
... View more
09-18-2018
01:44 PM
|
0
|
1
|
1339
|
POST
|
Robert, I'm just inside /widgets/MyWidget/Widget.js This is a large js widget - I've only include the top portion where I am trying to define and access myConfig file. I suspected a scope issue as well. But I'm not sure how to access variables outside the current /widgets/MyWidget scope. If you need the enitre file I can do that but would prefer to send it securely. define([ 'dgrid/OnDemandGrid', 'dgrid/Selection', 'dgrid/extensions/ColumnResizer', 'dgrid/extensions/ColumnHider', 'dijit/Menu', 'dijit/MenuSeparator', 'dijit/MenuItem', 'dijit/PopupMenuItem', 'dojo/_base/declare', 'dojo/_base/lang', 'dojo/_base/array', 'dojo/store/Memory', 'dojo/dom', 'dojo/on', 'dojo/dom-construct', 'dojo/parser', 'dojo/mouse', 'esri/Color', 'esri/graphic', 'esri/request', 'esri/tasks/query', 'esri/layers/FeatureLayer', 'esri/symbols/SimpleLineSymbol', 'esri/symbols/PictureMarkerSymbol', 'esri/layers/GraphicsLayer', 'esri/tasks/query', 'esri/tasks/QueryTask', 'esri/geometry/mathUtils', 'esri/map', 'esri/SpatialReference', 'esri/geometry/Polyline', 'esri/geometry/Point', 'esri/geometry/geometryEngine', 'esri/tasks/GeometryService', 'esri/tasks/ProjectParameters', 'esri/geometry/webMercatorUtils', 'esri/symbols/SimpleMarkerSymbol', 'jimu/dijit/LoadingShelter', 'jimu/SelectionManager', 'jimu/BaseWidget' ], function ( Grid, Selection, ColumnResizer, ColumnHider, Menu, MenuSeparator, MenuItem, PopupMenuItem, declare, lang, arrayUtils, Memory, DOM, on, domConstruct, parser, mouse, Color, Graphic, esriRequest, Query, FeatureLayer, SimpleLineSymbol, PictureMarkerSymbol, GraphicsLayer, Query, QueryTask, mathUtils, Map, SpatialReference, Polyline, Point, geometryEngine, GeometryService, ProjectParameters, webMercatorUtils, SimpleMarkerSymbol, LoadingShelter, SelectionMgr, BaseWidget ) { parser.parse(); var pl; var lineLength; var SVG = "M23.963,20.834L17.5,9.64c-0.825-1.429-2.175-1.429-3,0L8.037,20.834c-0.825,1.429-0.15,2.598,1.5,2.598h12.926C24.113,23.432,24.788,22.263,23.963,20.834z"; var posAlong = new Graphic(); var oneUrl = this.myConfigFileNameHere.oneUrl;
... View more
09-18-2018
10:41 AM
|
0
|
6
|
1339
|
POST
|
Robert, No problem. See that's what I would of thought as well, this.config.serviceName. However, config is undefined. this is on "Window" and I couldn't find any reference to my config file. Thoughts? Greg
... View more
09-18-2018
10:02 AM
|
0
|
8
|
1339
|
POST
|
Robert, Thank you for your response. I am still confused on this. I was thinking that by creating my custom config.json in the root path and accessing it via the config.json by changing the config.json's config paths in my widget definitions that my custom widget would be available within the widget.js files. Can you explain why that is not the case. For example the config.json has a reference to myWidget. { "position": { "left": 57, "bottom": 70, "relativeTo": "map" }, "placeholderIndex": 2, "id": "_26", "uri": "widgets//myWidget//Widget", "icon": "configs\\icon__26.png", "name": "myWidget", "config": "configs/myWidget/config__26.json", "IsController": false, "version": "0.0.1" }, Here it references a config file - "config": "configs/myWidget/config__26.json", This is the current contents of the config file. {"serviceUrl":"https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer"} Because I have a total of five widgets that potentially all need access to the same rest endpoint URL I would prefer to list those URL's in one file in the parent root of the directory so all my widgets can use the same file. As opposed to customizing all the config files in the "configs/WidgetName" directory path. So I have changed the root config.json's myWidget config path as such: "config": "myconfig.json", So now my widgets point to myconfig.json in the same parent root directory as the original config.json file. So why can't this be seen, why do I have to use esriRequest? My myconfig.json file contains { "serviceName": "SERVICENAME", "oneUrl": "//myPortal/server/rest/services/NAME/FeatureServer/1", "twoUrl": "//myPortal/server/rest/services/NAME/FeatureServer/2", "threeUrl": "//myPortal/server/rest/services/NAME/FeatureServer/3", "fourUrl": "//myPortal/server/rest/services/NAME/FeatureServer/4" } So then within my widget.js files I want to be able to access the information in the myconfig.json. var myconfig = How ever I instantiate my custom config file here; var serviceName = myconfig.SERVICENAME; var oneURL = myconfig.oneURL; Or by just using the reference to myconfig directly in place of individual variables. SomethingThatNeedsTheONEURLPath = myconfig.oneURL; I don't understand how to access the information within myconfig.json after following your provided code example. Can you please be more specific. It appears that "myConfig" in your example is instantiated but I don't understand how to access the information contained within the "myConfig" file. Again, if there is a better, easier way of doing this I am open to suggestions. Thank You, Greg
... View more
09-18-2018
09:13 AM
|
0
|
10
|
1339
|
POST
|
Hello, I have several widgets the reference rest end point URL's. I would like to be able to use a config file in the root folder of the WAB site to store the path to these URL's. I have found the config.json file in the root directory. Within the config.json file I have changed the "config": path from "configs/..." path to the root, ie "config": "mycustom.json". mycustom.json has a reference to a rest end point { "myUrl": "'//myportal.com/server/rest/services/SiteName/FeatureServer/SomeNumber'", additional urls..... } Now how do I access mycustom.json within the individual widget.js files? var myurl = ??. mycustom.json.???myUrl???? If I am off base with this approach please let me know. I didn't want to have a separate config file for each widget as each widget would be using the same URL's in the config file. Thank You, Greg
... View more
09-17-2018
05:49 PM
|
0
|
12
|
1925
|
POST
|
Thank you for your continued help on this issue. I do not want to change themes. I use the slide out window for the editor. I tried placing the code in the HeaderController widget and it didn't help. Does this issue exist in WAB 2.8?@ postCreate: function() { this.inherited(arguments); this._processGroupSetting(); this.switchableElements.title = this.titleNode; this.switchableElements.links = this.linksNode; this.switchableElements.subtitle = this.subtitleNode; this._handleTitleColorAndLogoLink(this.appConfig); if (this.position && this.position.height) { this.height = this.position.height; } // if (!this.appConfig.portalUrl) { html.setStyle(this.signInSectionNode, 'display', 'none'); // } else { // html.setStyle(this.signInSectionNode, 'display', ''); // } if (this.appConfig && this.appConfig.logo) { this.logoNode.src = this.appConfig.logo; html.removeClass(this.logoNode, 'hide-logo'); } else { this.logoNode.src = ""; html.addClass(this.logoNode, 'hide-logo'); } this.switchableElements.title.innerHTML = utils.sanitizeHTML(this.appConfig.title ? this.appConfig.title : ''); this.switchableElements.subtitle.innerHTML = utils.sanitizeHTML(this.appConfig.subtitle ? this.appConfig.subtitle : ''); this._createDynamicLinks(this.appConfig.links); this._setElementsSize(); this.own(on(this.domNode, mouse.enter, lang.hitch(this, function() { var title = ''; var portalUrl = this.appConfig && this.appConfig.portalUrl || ''; var server = portalUrlUtils.getServerByUrl(portalUrl); if (portalUrlUtils.isArcGIScom(server)) { server = 'ArcGIS.com'; } if (server) { title = this.nls.signInTo + ' ' + server; } this.signinLinkNode.title = title; }))); window._absolutLayoutManager.resize(); },
... View more
06-19-2018
09:13 AM
|
0
|
2
|
871
|
POST
|
Robert, This is a great solution and has worked for me where I have a sidebar widget. However, now I have a site without a sidebar widget. This site is a view only site. I still want to display widgets in the header for basemap, legend and layer list. But, because of this bug etc. they don't display. Where would I put the suggested "window._absolutLayoutManager.resize();" so that it is executed? GR
... View more
06-16-2018
02:40 PM
|
0
|
3
|
601
|
POST
|
This is a great solution and has worked for me where I have a sidebar widget. However, now I have a site without a sidebar widget. This site is a view only site. I still want to display widgets in the header for basemap, legend and layer list. But, because of this bug etc. they don't display. Where would I put your suggested "window._absolutLayoutManager.resize();" so that it is executed? GR
... View more
06-16-2018
12:40 PM
|
0
|
5
|
871
|
POST
|
I realize this is old but I found this link first with no further information. I found this link with a C# example. Geoprocessing field mapping
... View more
05-19-2018
08:41 AM
|
0
|
0
|
388
|
POST
|
Hello, I have selected a theme, Jewelry Box, that includes the basemap gallery, layer list, legend and print icons. In the developer view they are correctly displayed on the header bar. But when I choose to Launch the site or download and post to IIS the icons move off the header bar. It makes it difficult to even see them. Does anyone know how I can solve this problem? Thank You, Greg
... View more
04-06-2018
01:12 PM
|
0
|
5
|
726
|
POST
|
What exactly is "all the items IDs" ? Could it be that is for the older version of WAB Developer 1.1 and has changed with v2.7?
... View more
02-26-2018
04:01 PM
|
0
|
0
|
1170
|
Title | Kudos | Posted |
---|---|---|
2 | 12-19-2016 11:36 AM | |
2 | 03-14-2017 04:17 PM | |
1 | 12-02-2016 09:50 AM | |
2 | 10-20-2016 03:10 PM | |
1 | 10-07-2016 04:23 PM |
Online Status |
Offline
|
Date Last Visited |
09-29-2021
09:14 PM
|