|
POST
|
WABDev 1.19 Theme: Launchpad I'm looking for how WAB refers to the WidgetManager.js file when a page is initially loaded. Is there a specific .html file that refers to it like, <script src="WidgetManager.js" ></script> Thanks for any info!
... View more
07-09-2021
06:20 AM
|
0
|
8
|
2844
|
|
POST
|
js 3.36 Attempting to implement the upload shapefile example into a new custom widget but having an issue on the first attempt (subsequent attempts using a different .zip name works as expected). Basically on the request({load:}) property it errors with "TypeError: Cannot read property of name of undefined at https://js.arcigs.com.... and just goes to the errorHandler. //use the rest generate operation to generate a feature collection from the zipped shapefile.
request({
url: this.portalUrl + '/sharing/rest/content/features/generate',
content: myContent,
form: dom.byId('uploadForm'),
handleAs: 'json',
load: lang.hitch(this, function (response) {
if (response.error) {
console.log("response.error: ", response.error);
this.errorHandler(response.error);
return;
}
var layerName = response.featureCollection.layers[0].layerDefinition.name;
dom.byId('upload-status').innerHTML = '<b>Loaded: </b>' + layerName;
this.addShapefileToScratch(response.featureCollection);
document.getElementById("inFile").innerHTML = '';
}),
error: lang.hitch(this, this.errorHandler)
}, { usePost: 'true' });
},
errorHandler: function (error) {
dom.byId('upload-status').innerHTML = "<p style='color:red'>" + error.message + "</p>";
console.log("errorHandler: ", error.message)
document.getElementById("inFile").innerHTML = '';
},
... View more
06-23-2021
08:31 AM
|
0
|
0
|
627
|
|
POST
|
WABDev 2.19 I have a custom widget that I am adding a FeatureLayer from an onClick event and trying to symbolize and add labels. From THIS example it's showing an important step to "showLabels": map = new Map("map", {
extent: bbox,
showLabels : true //very important that this must be set to true!
}); However, I don't implement that "new Map" and just setting reference to the map source to the WAB itself. All I do is decalare map: null at the top and then access this.map throughout the .js of the widget How do I set this.map to showLabels: true?
... View more
04-29-2021
10:32 AM
|
0
|
2
|
927
|
|
POST
|
Thank you for the input! Actually all of the "layers" in the webmap that the WAB/Widget uses as the source are hosted items (I think). Here's how they are created: 1. Click "Add" -- "Add From Web". 2. Paste in the service url including the layer index number. These are published to an ArcGIS Server 10.4.1 site. 3. Configure symbology, popups and labels. 4. Save each weblayer to AGO. 5. Save the webmap. Does that constitute as a hosted map image layer?
... View more
03-15-2021
11:00 AM
|
0
|
2
|
1228
|
|
POST
|
Anyone have success implementing a stacked label solution in JS api 3.x? I'm not so sure the "suggested" duplicating layers approach will suffice. We currently have a dev WAB app & custom widget created with WAB Developer 2.19 and looking for solutions. I REALLY hoped to just do all of this in Arcade at the webmap/weblayer themselves rather than fuss around with a bunch of Javascript in the widget we're building, but the current AGO map viewer still doesn't support stacked labels. I *can* get the Arcade expression to stack them in the "TEST" output, but doesn't work in the mapviewer itself. Not sure if this just means I can simply save the webmap as the new "beta" version (which is supposed to allow stacked labels) but unsure what that means for our custom widget developed at JS api 3.x
... View more
03-15-2021
10:03 AM
|
0
|
4
|
1276
|
|
POST
|
The solution is to clear the selection first before the refresh: this.selectionLayer.clearSelection();
this.selectionLayer.refresh();
... View more
02-24-2021
09:06 AM
|
0
|
0
|
725
|
|
POST
|
Edit: The weblayer in the webmap has a refresh interval =1 set and the webmap viewer does what I expect when it "refreshes". Hope that makes sense! Part of a workflow is to update a value and then refresh the layer and my expectation is that the symbol would change to the unique value of the updated value. I am setting a selectionLayer variable like so, array.map(_operLayers, lang.hitch(this, function (lyr) {
if (lyr.layerObject) {
if (lyr.visibility === true) {
this.selectionLayer = lyr.layerObject;
}
}
})); Then attribute edits are applied and a refresh is called, this.selectionLayer.refresh(); While the layer seemingly "refreshes" or redraws, the symbology change I am expecting does not happen. Curious if there's something simple I'm missing. Consequently, if I refresh the entire WAB/page, of course the symbology draws to what I expect. Javascript 3.x WABDev/Custom widget The source to this WAB is a saved webmap with saved weblayer items. So, my attempt/goal here is to configure items as much as possible rather that write a ton of Javascript in the UI.
... View more
02-22-2021
11:06 AM
|
0
|
1
|
809
|
|
POST
|
Yes that's how it is added with the layer id at the end. I'm still not quite following the examples as they are all suggesting to create a reference to a "new FeatureLayer()", set the definitionExpress and then add it to the map. But my confusion is, it's already added to the map, I'm not seeing why I would create a new instance and add it again?
... View more
02-19-2021
06:42 AM
|
0
|
2
|
1623
|
|
POST
|
Robert -- we add the specific service layer to the webmap using the "Add data from web" option, then when it's added we save it (after setting up popups, symbology, etc). So, I believe it's a "FeatureLayer" at that point? Inspecting the lyr in dev tools says layerType: "ArcGISFeatureLayer" Edit: also, all of the examples show for a "new FeatureLayer()" but I'm misunderstanding how this applies to the FeatureLayers already in the map?
... View more
02-19-2021
06:09 AM
|
0
|
4
|
1670
|
|
POST
|
Within a custom widget I'm developing I am accessing specific layers that are loaded into an existing webmap by way of: _operLayers = this.map.itemInfo.itemData.operationalLayers; I can then do some things like toggle visibility by setting a reference to a layerObject like this: array.map(_operLayers, lang.hitch(this, function (lyr) {
if (lyr.layerObject) {
if (lyr.title === "Alert 7day - Hydraulic Element Set") {
lyr.layerObject.setVisibility(true);
lyr.visibility = true;
lyr.definitionExpression = "alertPriority = 'Low'";
}
}
}
)) Is there any way to set a filter/definitionExpression on this layerObject? As you can see above, what I attempted has no effect. Of note: the service layers contained in the webmap are enriched with additional attributes from a Server Object Interceptor and consequently I'm unable to apply the desired definitionExpression/filter on the AGO item created from that service layer. We need a way to set a date value > CURRENT_TIMESTAMP but the service does not honor this type of WHERE clause. Thanks for any input.
... View more
02-19-2021
05:37 AM
|
0
|
6
|
1685
|
|
POST
|
Throws an error: date_info_set = set(date_info_list) TypeError: unhashable type: 'dict'
... View more
02-08-2021
06:42 PM
|
0
|
0
|
5004
|
| 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
|