|
POST
|
What is your ultimate goal? There is nothing different about using the Runtime API than using any other API. A WPF application will need an entry point, if you use the WPF application project template you get all the setup for the main application. If you are trying to create a project to use in another application you could create use a class library. But this needs to be referenced in a WPF application and the map added in some way to the main application
... View more
01-27-2021
09:44 AM
|
0
|
0
|
4346
|
|
POST
|
That's a pretty broad question. To create a dll one just needs to change the output type to class library in the project properties. However, an application needs an entry point (an .exe) so you still need to have a wpf application compiled as an exe. But you can use dlls that have been developed with the API and reference than and use that functionality as would be done with any other type of application
... View more
01-25-2021
12:37 PM
|
0
|
1
|
4361
|
|
POST
|
Like I mention, because the value of lat/lon in the database are correct, it seems to me that point itself is valid. If not how would it have projected correctly. We also do a significant number of checks to validate the point prior to writing to the database. Not sure what else we could do to validate geometry protected async Task<bool> IsValidatePoint()
{
if ( CurrentLocation == null )
{
await DialogService.DisplayAlertAsyncAudio...
return false;
}
if ( CurrentLocation.IsLastKnown )
{
return false;
}
if ( double.IsNaN(CurrentLocation.Position.X) || double.IsInfinity(CurrentLocation.Position.X) )
{
return false;
}
if ( double.IsNaN(CurrentLocation.Position.Y) || double.IsInfinity(CurrentLocation.Position.Y) )
{
return false;
}
if ( Math.Abs(CurrentLocation.Position.X) < 0.1 || Math.Abs(CurrentLocation.Position.X) < 0.1 )
{
return false;
}
if ( CurrentLocation.Position.IsEmpty )
{
return false;
}
return true;
} For now we are just going to not write the Fix time to the database. Not the optimal solution, but better than not being able to sync. May revisit this later if it is decided by the client it is needed for auditing the data
... View more
01-05-2021
02:47 PM
|
0
|
0
|
2098
|
|
POST
|
When I say invalid it is a value, not null, that makes no sense If I were to convert this in DB Browser: SELECT datetime(ESRIGNSS_FIXDATETIME) From Vertices where objectid = 60 The result is: So the update worked ok writing from the API to the sqlite data table. But when this tries to sync because it is not a valid Date, it does not sync. We can bring the table into Pro and the point seems to be way out in nothing space. However, the Lat/Lon which come from the MapPoint are valid and where they should be. While probably inefficient the Lat/Lon coordinates are projected to a Web Mercator point before calling UpdateLocation and before writing to the table the point is projected back to WGS 84 to get Lat/Lon. Because of this it would seem the shape geometry itself is ok, but because of the other issue it shows a point out in the middle of nowhere I should note that when this occurs many of the GNSS fields are null, so that data may not be picked up from the receiver
... View more
01-05-2021
01:20 PM
|
0
|
0
|
2106
|
|
POST
|
I there possibly any type of virus scan or something else IT wise that could be happening on that folder that could lock the file? Seems like for some reason it just fails accessing the file. That's just a thought
... View more
01-05-2021
12:18 PM
|
0
|
3
|
2832
|
|
POST
|
We have an iOS application (using the Xamarin Forms API). This uses a custom LocationDataSource to receive data from an external high accuracy GPS device. We also use the SharpGIS Nmea parser from @dotMorten_esri to parse the incoming NMEA sentences In general this all works without issue. Where we do have occasional problems which then results in a failure to sync a table is with writing the ESRIGNSS_FIXDATETIME and I have no idea how this could occur. But in a high number of the offline *.geodatabases that fail to sync when this data is exported to cvs and opened in Excel the ESRIGNSS_FIXDATETIME comes in as a number and does not get converted to a date. The reason for bringing in Excel is because the attribute table will not open in ArcGIS Pro and this is the only way to see the bad data. What the application does in order to send these GPS collection data is to extend the Esri.ArcGISRuntime.Location.Location class and add the additional data public class NmeaLocation : Esri.ArcGISRuntime.Location.Location
{
public NmeaLocation(MapPoint position, double horizontalAccuracy, double velocity, double course, bool isLastKnown) : base(position, horizontalAccuracy, velocity, course, isLastKnown)
{
}
public NmeaLocation(DateTimeOffset? timestamp, MapPoint position, double horizontalAccuracy, double verticalAccuracy, double velocity, double course, bool isLastKnown) : base(timestamp, position, horizontalAccuracy, verticalAccuracy, velocity, course, isLastKnown)
{
}
public Gga.FixQuality FixQuality { get; set; }
public double Hdop { get; set; }
public double Vdop { get; set; }
public double Pdop { get; set; }
public short NumSats { get; set; }
public string Receiver { get; set; }
} This object is then sent into the UpdateLocation method of the custom LocationDataSource and I can use the additional properties to update the GPS attributes in the feature class. Updating the ESRIGNSS_FIXDATETIME is pretty straight forward if (feature.Attributes.ContainsKey("ESRIGNSS_FIXDATETIME"))
{
if ( nmeaLocation.Timestamp != null )
{
feature.SetAttributeValue("ESRIGNSS_FIXDATETIME", nmeaLocation.Timestamp.Value.UtcDateTime);
}
} This does not throw an exception, but it writes the invalid value. Is there a way to validate this data before writing it to the table? What else could be done? While this does not occur frequently, it only needs happen once on a job to break the sync. @MichaelBranscomb Thanks -Joe
... View more
01-05-2021
12:09 PM
|
0
|
5
|
2120
|
|
POST
|
I would agree with what has previously been stated, trying to generate a cache for an area that big using the standard offline map task isn't going to work, unless you don't want to zoom in. If you are able to increase the number adequately it's going to take a day to download the map. What we have done, as @MichaelBranscomb brings up is use an offline cache, There are vendors other than esri that could provide this (we have a client that uses Google). Something to keep in mind going down this path is these will be huge. The offline tile cache we have is 34GB for about half a good size US State. There is also the issue of deployment, the application we use this on is in WPF and deployed on laptops, so we could deploy the tiles over a network. If you are looking at deploying to tablets this is a lot bigger a problem The option we use on iOS apps is to use an online basemap along with offline data. This gives us an application that will operate offline and most of the time the user has a basemap, but there may be times when the background is blank. We have found often in the field when the user is collecting data they are zoomed in to a level that they really don't see the basemap anyway. You can set the IncludeBasemap flag to false in the parameters to keep any basemap from downloading. What's nice this way, too, is we can provide a basemap switcher so they have a few choices instead of just a single that would be in a downloaded cache
... View more
01-04-2021
02:38 PM
|
0
|
0
|
3818
|
|
POST
|
Looking at the documentation for the Generate Token API https://developers.arcgis.com/rest/users-groups-and-items/generate-token.htm it seems to imply that when working with a Federated server one would want to generate the token for portal from the /generateToken endpoint. After that you would pass that token along with the serverName to a new request to /generateToken to obtain a token to use for accessing services What is actually required to access a secure service on a federated server is to just call the /getToken method and passing in: "client": "referer",
"referer": "https://anything/" This does not make sense based on the documentation page, and the only way I figured it out was capturing traffic from a Runtime app and seeing what requests were being made
... View more
12-29-2020
02:47 PM
|
1
|
0
|
580
|
|
POST
|
Ok, now that I see the GeometryEngine method its not too bad, I was stripping it myself which was somewhat ugly
... View more
12-29-2020
11:14 AM
|
0
|
0
|
1288
|
|
POST
|
I noticed something which to me does not make sense as an exception. We have a table that is defined to not have Z coordinate. We normally collect points from a GPS device which just returns lat/lon so normally create points without Z. I recently was testing the app using the SystemLocationDataSource which does return X,Y,Z coordinates. When calling FeatureTable.AddFeatureAsync it fails because the table does not have a z coordinate. Why? Why would the Z not simply be removed when the point is added. Instead I am having to write conditionals to remove Z from the points
... View more
12-29-2020
09:46 AM
|
1
|
2
|
1302
|
|
POST
|
Did you ever find the solution to this? I am doing a similar thing (from C#). I get the portal token, then use that to get the server token and get Invalid Token when I try to query the feature service. Cannot figure out what is wrong
... View more
12-28-2020
04:25 PM
|
0
|
0
|
1952
|
|
POST
|
For anyone interested Would seem you need to tell the HttpClient to use DefaultCredentials using HttpClient httpClient = new HttpClient(new HttpClientHandler{UseDefaultCredentials = true}); Took some looking at decompiled Runtime code to find that
... View more
12-28-2020
11:01 AM
|
0
|
0
|
1143
|
|
POST
|
Would seem you need to tell the HttpClient to use DefaultCredentials using HttpClient httpClient = new HttpClient(new HttpClientHandler{UseDefaultCredentials = true});
... View more
12-28-2020
11:00 AM
|
0
|
0
|
4423
|
|
POST
|
I am having an issue outlined here: https://community.esri.com/t5/arcgis-rest-api-questions/getting-token-generatetorken-in-c-from-windows-authenticated/td-p/1012188 This is really associated to using rest from C#, but thought maybe someone here has had a similar experience. Plus I figure the Runtime API has to be doing something similar and things work from Runtime Thoughts?
... View more
12-28-2020
08:50 AM
|
0
|
1
|
1178
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-23-2025 12:16 PM | |
| 1 | 10-19-2022 01:08 PM | |
| 1 | 09-03-2025 09:25 AM | |
| 1 | 04-16-2025 12:37 PM | |
| 1 | 03-18-2025 12:17 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-04-2025
04:12 PM
|