|
POST
|
@Nicholas-Furness thanks for the information this is really helpful. Some follow-up question, in AGOL how long is a job kept around after it has been completed. If I go the route of serializing/deserializing the job and rechecking after the 10 minutes has expired. At some point that job is removed from the server so I would need to just give up. What is that time limit? Something else we see in the sync errors is some will give the "Illegal state: Job failed because responses have failed for more than 10 minutes." but other services in the offline map will give "A task was canceled." message. Is that what would be expected, if so why? Unfortunately, I am not in a position to know where the edits occurred. Finally (for now); What about a case where we get a success response from the job, but then we lose connectivity during download of the delta file. This almost seems like a more likely case in an area of poor connectivity Thanks -joe btw: I am using the Xamarin Forms API, but based on everything being built on the same core, I am assuming this applies equally well
... View more
07-08-2021
09:30 AM
|
0
|
0
|
2180
|
|
POST
|
Do any layers point to the same service? Also if my math is correct you are indicating the map has 45 layers (17 worked, 28 failed) , I think that you might want to consider the need for a map with that many layers, I don't think the OfflineMapTask was designed with a map that extensive in mind (not saying that it should not work)
... View more
07-06-2021
08:43 AM
|
0
|
1
|
1265
|
|
POST
|
Hi @ChristaHash we have been trying to create a few different locators but not with those types (we are only at 107), we are able to get the ones built in ArcMap to load although we are not getting results but the one from Pro fails when we just call LocatorTask.CreateAsync. I did just update to 100.8 and we are getting things to load successfully and even getting results (not always correct). So even though this uses a point address locator, it would appear to require 100.8 One thing we have tried is to take the premise data we have and reverse geocode it, at a rather hefty fee, hoping that would give us the requisite data. However, we found that reverse geocode does not really return the data in a way that can be simply used in building a Locator. Mainly, we don't get street names broken out in a separate field. I have looked through the rest documentation, and it does not seem that a street name is a value that can be returned. This seems a bit odd (and I notice Google will return, so not sure why esri would not), as this seems to me to be a crucial piece of individual information. Initially we have Parcel data, but we did not build a locator with Parcel role, we have built a point locator. A little discouraging that it required 100.8, when the documentation would seem to indicate that only 100.5 is required
... View more
07-01-2021
02:43 PM
|
0
|
0
|
2310
|
|
POST
|
Crickets? No one knows how to use a locator created in Pro from Runtime? @MichaelBranscomb
... View more
07-01-2021
08:07 AM
|
0
|
0
|
2318
|
|
POST
|
We are trying to setup an application to use an offline locator in our Runtime app (100.7). I have looked at the sample and it does not go into anything about actually building the locator. We created a locator in pro, however, the output files differ from what is downloaded when using the sample. The sample provides four files, with extensions .loc, .loc.xml, .lob, .lox. When creating in Pro we get two file one is .loc the other .loz. Also looking in a text editor the .loc files are not at all the same When trying to load the locator created in pro an exception is thrown Invalid response
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Tasks.Geocoding.LocatorTask.<CreateAsync>d__10.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at [my local code] I found this article https://support.esri.com/en/technical-article/000015598. Which discusses creating a replica for Runtime, but it is from 2017 and seems targeted at Runtime 10.x. However, it does discuss the same types of files which are seen when running the sample application. But the idea that we would be creating a package in ArcMap to be consumed by a Runtime 100.x application seems very illogical to me. How does one generate a locator to be consumed by an offline Runtime application? Thanks
... View more
06-29-2021
10:01 AM
|
0
|
5
|
2354
|
|
POST
|
I've seen a similar error (or maybe the same one). I have never truly tracked it down, based on description appears it wants to try to start the location data source a second time. Not sure if you are just using on board location or have external. A couple things I have done, is when using an external GPS I make sure to set the LocationDisplay.DataSource on the main thread //LocationProvider.LocationDataSource is a pointer to an external custom LocationDataSource
MainThread.BeginInvokeOnMainThread(() => mapView.LocationDisplay.DataSource = LocationProvider.LocationDataSource); Also make sure to wrap starting in a conditional, to be sure that we don't send a StartAsync after it's running if ( !mapView.LocationDisplay.DataSource.IsStarted )
{
mapView.LocationDisplay.IsEnabled = true;
} Good luck
... View more
06-24-2021
12:27 PM
|
0
|
0
|
1120
|
|
POST
|
Assuming @NathanCastle1 is correct, which is what I also assume and why I asked about what is in the Xaml. I'm going to go out on a limb and assume the DataContext is being set in the Xaml also. However, without seeing the Xaml I cannot be sure exactly what is being done but I am going with this assumption. One nice MVVM approach to adding functionality, imo, is using TriggerActions. Especially if you are not using an external library to handle Commanding and Eventing Based on the code you have above we could create an Action that handles the GeoViewTapped and then creates the point. public class CreatePointAction : TriggerAction<MapView>
{
private static bool _doubleTapped;
protected override void OnAttached()
{
base.OnAttached();
if (!(AssociatedObject is MapView mapView)) return;
//This seems silly to me, but a GeoViewDoubleTapped fires both a tapped and a double tapped.
//This indicate was double tapped
mapView.GeoViewDoubleTapped += (s, e) => { _doubleTapped = true; };
}
protected override async void Invoke(object parameter)
{
await Task.Delay(250);
if (_doubleTapped)
{
_doubleTapped = false;
return;
}
if (!(AssociatedObject is MapView mapView)) return;
if (!(parameter is GeoViewInputEventArgs args)) return;
//I'm just going to assume only the one layer
var graphicsOverlay = mapView.GraphicsOverlays.FirstOrDefault();
if ( graphicsOverlay == null ) return;
AddPoint(graphicsOverlay, args.Location);
}
private void AddPoint(GraphicsOverlay graphicsOverlay, MapPoint mapPoint)
{
var pointSymbol = new SimpleMarkerSymbol
{
Style = SimpleMarkerSymbolStyle.X,
Color = System.Drawing.Color.Red,
Size = 10.0,
Outline = new SimpleLineSymbol
{
Style = SimpleLineSymbolStyle.Solid, Color = System.Drawing.Color.Red, Width = 2.0
}
};
// Create a point graphic with the geometry and symbol.
var pointGraphic = new Graphic(mapPoint, pointSymbol);
// Add the point graphic to graphics overlay.
graphicsOverlay.Graphics.Add(pointGraphic);
}
} To wire this in we add the Action as an EventTrigger in our MapView definition <esri:MapView x:Name="MapView" Map="{Binding Map}" GraphicsOverlays="{Binding GraphicsOverlays}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="GeoViewTapped">
<local:CreatePointAction></local:CreatePointAction>
</i:EventTrigger>
</i:Interaction.Triggers>
</esri:MapView> Similar to what you are already doing you can setup the view point in the View constructor. But we do not need to instantiate the VM, this was done and we are not using the VM in any code in the code behind public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
MapPoint mapCenterPoint = new MapPoint(-117.6709, 35.6225, SpatialReferences.Wgs84);
MainMapView.SetViewpoint(new Viewpoint(mapCenterPoint, 100000));
}
} And in the ViewModel the map initialization can be done as before public class MapViewModel
{
protected GraphicsOverlay EditGraphicsOverlay { get; } = new GraphicsOverlay { Id = nameof(EditGraphicsOverlay) };
public MapViewModel()
{
SetupMap();
AddGraphicsOverlays();
}
private void SetupMap()
{
// Create a new map with a 'topographic vector' basemap.
Map = new Map(BasemapStyle.ArcGISTopographic);
}
private void AddGraphicsOverlays()
{
if (!GraphicsOverlays.Contains(EditGraphicsOverlay))
{
GraphicsOverlays.Add(EditGraphicsOverlay);
}
}
} With that we should have everything wired up. There is no functional code in code behind all logic is in the Action and ViewModel. The Action could be reused in another project without need to change anything, just include the definition in the MapView xaml
... View more
06-22-2021
02:53 PM
|
0
|
1
|
6926
|
|
POST
|
What is in your Xaml? Somewhere you must be setting the data context of the view. This would be why it runs the constructor. Are you using any MVVM libraries or just core WPF?
... View more
06-22-2021
12:23 PM
|
0
|
0
|
6933
|
|
POST
|
Is there any way to change the color of the graphic drawn by the SketchEditor from red to something else? I do not see any setting for the color of this temp graphic. I have a client that doesn't like the red because it matches a color used by one the line layers in the map. Thanks -joe
... View more
06-22-2021
10:36 AM
|
0
|
4
|
1735
|
|
POST
|
How are you setting the data context? You should not need to have the code where you new up the ViewModel
... View more
06-22-2021
10:33 AM
|
0
|
2
|
6940
|
|
POST
|
I have noticed that if a line is started within the extent of the offline map but completed outside the extent the line is drawn correctly. In theory that is not a bad thing, however, in some situations in is causing problems. We use the path of the polyline to locate/place other features. So when this situation occurs these associated features may fall completely outside the extent and thus blow things up. Any thoughts on a best way to validate the original line geometry. I don't see a way to get the vertices until after the entire line is placed
... View more
05-19-2021
08:35 AM
|
0
|
0
|
518
|
|
POST
|
Polygons (and Polylines) are made up of collection of Parts. So each ring will be a Part in the Part array var polygon = (Polygon)Geometry.FromJson(polyJson);
foreach (var part in polygon.Parts)
{
// do something with the part
// part is an IEnumerable of segments
}
... View more
05-18-2021
05:40 AM
|
3
|
0
|
2027
|
|
POST
|
The SketchEditor simply creates a geometry. If you want a feature you will need to create a feature set the geometry and then add that to the table
... View more
05-13-2021
03:46 PM
|
0
|
0
|
2129
|
|
POST
|
Use a ChallengeHandler. This gets called by the framework when you send a request that requires credentials //I put this in the constructor of a class that manages services
AuthenticationManager.Current.ChallengeHandler = new ChallengeHandler(CreateCredentialAsync); This method will get called when there is a request for a token from the server private async Task<Credential> CreateCredentialAsync(CredentialRequestInfo info)
{
try
{
_log.Info($"CHALLENGE ********** : {info.ServiceUri} ***********");
if ( info.ServiceUri == null ) return null;
var credential = await AuthenticationManager.Current.GenerateCredentialAsync(info.ServiceUri, Settings.UserName, Settings.Password);
_log.Info($"RETURN credential *********: {info.ServiceUri} ********");
return credential;
}
catch (Exception e)
{
_log.Error(e, e.Message);
return null;
}
}
... View more
05-11-2021
03:03 PM
|
0
|
3
|
1926
|
| 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
|