Collecting data outside OfflineMap area

610
3
01-16-2019 04:09 PM
JoeHershman
MVP Regular Contributor

Trying to see if this workflow would be possible.

We have a situation where field users may end up needing to collect data that is outside the downloaded area.  We realize that there is no background, but they still want to collect the gps locations.  Or in some cases they may not realize the full extent of the job in advance.

When we do this it seems to sometimes crash the application when we collect the point outside the area and it definitely seems that these points will not sync.  Is there anyway to use the offline map task features but allow to collect data outside the area?

Antti Kajanus

Thanks,
-Joe
0 Kudos
3 Replies
AnttiKajanus3
New Contributor III

Hi Joe Hershman

I think that if you are using OfflineMapTask to take the map offline, there isn't easy way to do that. When the area is taken offline, the registered geodatabases gets the extent that it contains data for and you cannot add data outside of that extent. This behaviour is derived from the feature services /createReplica endpoint. I assume that this hasn't changed. Luke Smallwood / Mary Harvey‌ can confirm if there have been changes on how the local geodatabases restrict the area. I cannot remember if you can hax this if you change the extent defined in the local geodatabase or if that is actually part of the replica registration information. If it isn't saved to the server, then you potentially can modify the local geodatabase to think that it's from the larger area than it actually is. That wouldn't most likely be a supported workflow but could work.

If that doesn't work, then I think you would have some other options that you most likely already have been looking into:

- Generate offline map from the whole map / larger area without any data and add those edits to that. You would have 2 maps where the other would be the real map that is used and other used as a "safeguard" for these kinds of situations. 

- Generate geodatabase from the larger area that doesn't contain the data but is used in these cases 

- Store extra data as feature collections/other local data types and have a procedure to apply those to the target service outside of the provided sync framework

If your app crashes on cases where you try to collect data outside of the replicas extent, you most likely have a bug on your side. If you add a point outside of the geodatabase area, make sure that you handle the thrown error correctly on your side. If you are already doing that, then there might be some issues on the feature table implementation in these cases that would require a closer look from Esri.

Ps, I don't work for Esri at the moment or should I say that I'm not currently working at all. Maybe it's time to start looking for a job again 

0 Kudos
LukeSmallwood
Esri Contributor

Hi Joe - and thanks Antti for responding to this one - those are great suggestions for working around this issue.

We do still prevent adding of features outside of the resgistered extent of the geodatabase.

One other thing that you could consider would be to use the overrides workflow which we introduced in Runtime 100.4 (see "GenerateOfflineMapParameters" ArcGIS Runtime SDK for .NET - UWP API Reference | ArcGIS for Developers )

That approach would let you skip the spatial filter for a particular layer by accessing the underlying GenerateGeodatabaseParameters used to take it offline. So for example, you could identify the relevant GenerateLayerOption, and set the useGeometry property to false. That would mean downloading all of the features so wouldn't work if your data-set is too big.

Hope that helps,

Luke

0 Kudos
AnttiKajanus3
New Contributor III

That's a good option as well assuming that you can handle the amount of data. It would keep allow you to work inside of the offline map ecosystem without any haxxing. But that makes a difference how to map will look (you will have all the features so you can see features outside of your offline map and all of that stuff) and ofc the time generating will be longer. 

Joe Hershman‌ What is the case where you might not know the area before taking the map offline from the workflow point of view?

0 Kudos