|
POST
|
I have a requirement to resize the eSearch widget. We use the Launchpad theme for our WAB and we have a "BETWEEN" date search configured however the calendar pickers are too small. How can we adjust the width of the widget panel after it opens?
... View more
12-18-2020
10:28 AM
|
0
|
2
|
884
|
|
POST
|
That's the one I used but gives the index. Perfectly fine with me, it's actually preferable in case search layer names get changed but I just have to be careful not to shuffle things around without updating some conditional logic I have added. All good -- thanks again Robert!
... View more
12-04-2020
07:56 AM
|
0
|
0
|
1795
|
|
POST
|
I think that will do it. I was expecting the text value of the selected search layer but get it's index. Not a big deal, I can work with this! Thank you Robert! (I need to get better at inspecting elements and locating them, not sure why I struggle with this!)
... View more
12-04-2020
07:18 AM
|
0
|
2
|
1800
|
|
POST
|
This is cross post from "Documents" section (sorry about that getting used to new forum). From the Widget.js of the eSearch, what is the best way to get the value from the currently selected value in the search layer drop down list? Thanks!
... View more
12-04-2020
05:09 AM
|
0
|
4
|
1813
|
|
DOC
|
From the eSearch widget's Widget.js, what is the best way to get the currently selected search layer in the dd list? Thanks!
... View more
12-04-2020
04:58 AM
|
0
|
0
|
803
|
|
POST
|
I got it to work just fine, much appreciated. I really need to update my eSearch, no idea what version I'm on. So hard to keep up with so many apps, I'm even way behind on WABDev version. Thanks again for the assist.
... View more
11-05-2020
01:46 PM
|
0
|
0
|
1134
|
|
POST
|
Robert / All, I dislike having to butcher this excellent widget but I have a request to move an existing widget click-button onto the actual eSearch widget panel's results tab. Any suggestions on how to best/properly fit the "Download Data" button as seen here? It's hiding the results counter and that particular div height doesn't allow it to fit well. I'd rather not go an hammer away at this and figure best to check first. (I'm terrible with placement/styling of html elements)
... View more
11-05-2020
10:47 AM
|
0
|
2
|
1180
|
|
POST
|
this works, thanks. Now it has uncovered an additional scope issue when I try to access this.serverSideScracthLayer from another function. It's very difficult to inherit code from another developer that has written so many functions that separate out all of the logic. Plus I'm still not fully understanding scope and accessing/setting variables that can be used later on.
... View more
10-29-2020
08:06 AM
|
1
|
1
|
1999
|
|
POST
|
Thanks for taking a look Randy! I think I will just have to test for > 1 ring and if true then maybe get the extent of all of them to use as the centroid. ringCount = len(inputJSON['geometry']['rings'])
if ringCount > 1:
for i in inputJSON['geometry']['rings']:
coordinates = i
array = arcpy.Array([arcpy.Point(*coords) for coords in coordinates])
boundary = arcpy.Polygon(array, inSr)
pcent = arcpy.Point
pcent = boundary.centroid
return pcent.X, pcent.Y
else:
for i in inputJSON['geometry']['rings']:
coordinates = i
polygon = arcpy.Polygon(arcpy.Array([arcpy.Point(*coords) for coords in coordinates]), inSr)
pcent = arcpy.Point
pcent = polygon.centroid
return pcent.X, pcent.Y I need to test what "boundary" exactly is if ringCount>1... I can't really tell, but it returns the pcent.X/Y
... View more
10-29-2020
05:20 AM
|
0
|
0
|
7165
|
|
POST
|
Thanks Manish, I followed your approach but getting "this.createServerSideScratchLayer is not a function" error on this line, this.createServerSideScratchLayer(tok);//or pass as parameter to the function
... View more
10-28-2020
06:32 PM
|
0
|
3
|
1999
|
|
POST
|
I'm falling short here and need some help. I need to ensure that 'this.fsTok' gets set at the startup before 'this.createServerSiteScratchLayer()' but it seems that no matter what fsTok is always undefined in the createServerSiteScratchLayer() function. fsTok: null
startup: function(){
this.fsTok = this.getFStokFromUrl();
this.createServerSideScratchLayer();
},
getFStokFromUrl: function () {
tok = ""
var gp = new Geoprocessor("gpServiceURL/execute");
var params = { "inSystem": "someInputParamValue"};
gp.execute(params, retTok);
function retTok(results) {
tok = results[0].value;
}
return tok
},
createServerSideScratchLayer: function () {
this.serverSideScratchLayer = new FeatureLayer(this.config.applicationFeatureLayer + '?token=' + this.fsTok,
{
outFields: ["OBJECTID"]
});
},
... View more
10-28-2020
04:28 PM
|
0
|
5
|
2067
|
|
POST
|
This error "SystemError: error return without exception set" only recently popped up in an implementation and it only happens on some, not all, polygon features that are processed. Error is throw on this line: pcent = polygon.centroid All this does is take the geometry attribute of some JSON (a polygon feature service) and gets the centroid. I'm not sure what exactly is wrong with the geometry but seems to cause the error. Attached .txt file contains the "inputJSON" variable (I thought it best to just add it in a file vs. paste in the post). inputJSON = <grab from attached .txt file>
inSr = arcpy.SpatialReference(3857)
for i in inputJSON['geometry']['rings']:
coordinates = i
polygon = arcpy.Polygon(arcpy.Array([arcpy.Point(*coords) for coords in coordinates]), inSr)
pcent = arcpy.Point
pcent = polygon.centroid #error occurs here
return pcent.X, pcent.Y
... View more
10-28-2020
06:59 AM
|
0
|
2
|
7224
|
|
POST
|
What if I converted one to a polyline feature? I've attempted to flip the order around and create the buffer on the polygon used to check if it falls inside of it, but I think the holes still prohibit the validation (it always returns False). I also tried using the Extent of the polygon used to check if it falls inside of it, which does work, but I'm not sure how much accuracy I'm losing (especially with odd shaped polygons that may cause incorrect validation. Any input is appreciated.
... View more
10-14-2020
11:57 AM
|
0
|
0
|
1221
|
|
POST
|
I have been using this function to validate a polygon in the graphics layer by applying a negative buffer and then using geometryEngine.within to test if that buffer falls inside the selected polygon of another layer. validateScheduleBoundary: function () {
this.getScratchGeometry().then(lang.hitch(this, function (serverScratch) {
this.workplanBoundaryLayer.queryFeatures(this.queryWorkplanLayer(), lang.hitch(this, function (result) {
var wpbuffer = geometryEngine.geodesicBuffer(this.clientSideScratchLayer.graphics[0].geometry, -5, "meters")
var withinTest = geometryEngine.within(wpbuffer, result.features[0].geometry);
if (withinTest == false) {
alert("Schedule must be inside of the workplan boundary. Try again.");
this.cancelBoundaryEdits();
return false
}
else {
return true
}
}));
})); This has worked until now with simple features however where the polygon used to check against has "holes" within it the within test fails. Any suggestions on how to rework this? Thanks for any input!
... View more
10-12-2020
07:36 AM
|
0
|
1
|
1248
|
|
POST
|
This issue has gone from intermittent (maybe 1 time each 2 weeks) to about 10 times per 24 hours on a python script run that simply queries the REST interface of a hosted feature service. We get 400 errors when simply selecting the last datetime stamp value: qFlParams = urllib.urlencode({'f': 'json',
'outFields': 'location_timestamp',
'orderByFields': 'location_timestamp DESC',
'resultRecordCount' : '1',
'where': "created_user = '{}'".format(inName),
'token': token
})
reqFl = urllib2.Request(urlTrackerHistory + '/query', qFlParams)
response = urllib2.urlopen(reqFl)
gFeats = json.load(response)
#print gFeats gFeats respone comes back as: {u'error': {u'message': u'Cannot perform query. Invalid query parameters.', u'code': 400, u'details': [u'Unable to perform query. Please check your parameters.']}} But one subsequent attempt, it succeeds.
... View more
07-02-2020
11:19 AM
|
1
|
0
|
8528
|
| 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
|