POST
|
Hi, I'm polling for JSON and inserting/updating a SQL Server backed feature class. It's mostly working... I'm getting features into the database, but I just can't seem to handle the booleans in the JSON correctly. There is sample data from the feed at the bottom of this post... for example, the "has_kisosk" field is going to be true/false. The input geoevent definition has that field as a bool, and if I write that event directly out to JSON, the value comes across fine. Getting it into the database is the problem. My database schema is a bit different in terms of field names. Also, booleans are stored as smallint or bit fields in SQL Server (I'm using smallint). So, my output geoevent defintion has the boolean field as type "short"and I use a field mapper to make that transformation from input to output geoevent defintion. The problem is that all boolean fields come across as null from the output geoevent def. This is consistent in the database as well as if I write this output geoevent defintion to JSON. If I make the output geoevent defintion also use type "boolean" then I can see the values in my output JSON, but the feature service records the following in the ArcGIS server log: Error: The value type is incompatible with the field type. [HAS_KIOSK]. So it seems like booleans aren't being automatically transformed into shorts (or other integer types). Can anyone provide some pointers on how to handle this? Thanks in advance! {
"data": {
"stations": [{
"lat": 45.51898132,
"rack_model": "CITY_PILOT_RACK",
"legacy_id": "1440914125193298376",
"address": "Park Avenue West, Southwest Yamhill Street, Portland",
"region_code": "PDX",
"name": "SW Yamhill at Director Park",
"eightd_station_services": [],
"rental_uris": {
"android": "https://pdx.lft.to/lastmile_qr_scan",
"ios": "https://pdx.lft.to/lastmile_qr_scan"
},
"capacity": 20,
"eightd_has_key_dispenser": false,
"station_id": "1440914125193298376",
"lon": -122.6812685,
"station_type": "lightweight",
"has_kiosk": false,
"electric_bike_surcharge_waiver": false,
"external_id": "motivate_PDX_1440914125193298376",
"dockless_bikes_parking_zone_capacity": 20,
"client_station_id": "motivate_PDX_1440914125193298376"
}]
}
}
... View more
12-09-2020
07:29 AM
|
0
|
0
|
69
|
POST
|
Looking like user names are case-sensitive... can someone confirm?
... View more
07-27-2020
10:26 AM
|
0
|
1
|
51
|
POST
|
Is there any way to get a better understanding about why group.remove_users() would fail to remove member(s) of a group? The accounts in question are simply members of the group (not owner or group managers). The group in question actually contains no content and I'm using the owner of the group to connect to portal with the python API. If I login to portal with the same group owner account, I can interactively remove the user from the group. INFO | 2020-07-27 07:57:38,431 | Begin synchronizing users for group: PBOT (1120) INFO | 2020-07-27 07:57:38,438 | Querying existing membership... INFO | 2020-07-27 07:57:38,938 | Group currently has 233 member(s) INFO | 2020-07-27 07:57:38,970 | 2 user(s) will be removed from group {'notRemoved': ['member1', 'member2']} INFO | 2020-07-27 07:57:39,218 | No users will be added to group
... View more
07-27-2020
08:05 AM
|
0
|
2
|
75
|
POST
|
This code snippet works fine, but its seems silly/inefficient to have to loop through a file like this: let data = "" ; let file = AppFramework . file ( filePath ) ; if ( file . exists ) { if ( file . open ( File . OpenModeReadOnly ) ) { do { data + = file . readLine ( ) ; } while ( ! file . atEnd ) file . close ( ) ; try { let json = JSON . parse ( data ) return json ; } catch ( err ) { console . log ( "Failed to parse JSON, error returned '" + err . messsage + "'" ) ; } } } return null ;
... View more
06-12-2020
06:59 AM
|
0
|
0
|
66
|
POST
|
I'm attempting to read JSON from a configuration file using file.readAll(). I can open and perform the read, but can't figure out how to convert the ArrayBuffer to a string or ultimately I want to make use of the JSON in the file. Considering the file "foo.json" in my data folder: { "name" : "value" , "things" : [ ] } I'm reading it using the following code: function readConfig ( ) { var file = AppFramework . file ( AppFramework . userHomePath + "/ArcGIS/Runtime/Data/foo.json" ) ; if ( file . exists ) { if ( file . open ( File . OpenModeReadOnly ) ) { var data = file . readAll ( ) ; // get the json? file . close ( ) ; } } } but I can't seem to get the text or JSON from the binary data that readAll() returns. It looks like I could use a loop and readLine() which returns a string, then check for file.atEnd, but it seems like there must be a better way. Obviously I'm new on the QML/JS journey and would sure appreciate a push in the right direction. Thanks in advance!
... View more
06-11-2020
07:22 AM
|
0
|
3
|
160
|
POST
|
Hi, I'm programmatically adding a bunch of feature layers to a map from a local, runtime geodatabase. Prior to adding to the map, I would like to get the geometry type of the feature table (or feature layer). Can someone assist me with the most efficient way to get that info? I'm pretty new to QML. Thanks in advance! Mike
... View more
06-02-2020
02:39 PM
|
0
|
1
|
108
|
POST
|
Oh gawd. I found the problem.... my extent is off. I'm gonna leave this here instead of deleting it. I deserve the shame.
... View more
05-06-2020
09:28 AM
|
0
|
0
|
25
|
POST
|
Hi, I've got a vector tile package that I'm trying to load into a MapView. The map control is definitely added to the page (building off Tuesday's lab), but I can't get the .vtpk to draw. Seems like something silly that I'm missing. I'm sure the vector tile package is valid (draws fine in pro, I've published it as a hosted service) and the initial viewpoint should be just within the data area. Appreciate any pointers. Here is the code snipped I'm working with: MapView { id : mapView anchors . fill : parent Map { id : map Basemap { ArcGISVectorTiledLayer { id : vectorbasemap url : AppFramework . userHomePath + "/ArcGIS/Runtime/Data/Basemap_Color_Complete_Vector.vtpk" } } initialViewpoint : ViewpointCenter { id : initialViewpoint center : Point { x : 13647642.0 y : 5703059.0 spatialReference : SpatialReference { wkid : 3857 } } targetScale : 72224.0 } } } which results in this: The data location should be fine, I think: This is what the same tile package looks like in pro: Thanks for the workshop, it's been great and helping to give me the push I needed. AppStudio, AppStudio Player and Qt/QML are (for some reason) more attractive to me than Xamarin... and that's coming from a .NET developer.
... View more
05-06-2020
09:24 AM
|
0
|
1
|
70
|
POST
|
Thanks for the feedback and the pointer to another code sample. I was able to adopt some of those ideas and improve the user experience when access problems are encountered within a web map. The default behavior of the AuthenticationHandler retrying over and over for each item encountered in the web map isn't very helpful and tends to make people think they are stuck in a loop.
... View more
04-22-2020
06:41 AM
|
0
|
1
|
103
|
Online Status |
Offline
|
Date Last Visited |
4 weeks ago
|