Unable to display offlineMaps when internet is off

1300
6
12-26-2016 11:08 PM
VinayPrabhakar
New Contributor

Hi All,

I am going through a strange problem.I am working on a Xamarin.Forms App where I am displaying offline(downloaded MAps).

Everything is working correctly till internet is on at my device.Maps are displaying properly(I have checked data is coming from physical .TPK file).

But when internet connectivity is off maps are coming as blank,Nothing is rendering in mapview.

I have debugged my code and checked it data in both the cases are same.

So i believe something is going wrong in esri MApView control.

Here is the XAML I am using to display Maps:

  <esriUI:MapView
                x:Name="MyMapView"
                HorizontalOptions="FillAndExpand"
                VerticalOptions="FillAndExpand" />

Can anybody help me to get rid of this issue?

Thanks in the advance...

0 Kudos
6 Replies
ChadYoder1
Occasional Contributor II

Could it be that offline basemap is loading, but you can't see it because of the zoom extent and the LOD's downloaded are not included?

 

You might want to try creating a new Map, and then loading the offline map. This should reset the extent to the area where the offline map is located.

 

Post some code that shows your workflow when switching to offline mode and we'll be able to give you some more help.

VinayPrabhakar
New Contributor

This problem was happening for both BaseMaps(.TPK) and as well as Maps(.geodatabase).

Now i have updated sdk to 100.0.0.

This problem is no more for BaseMaps(.TPK) but it's persist with Maps(.geodatabase)

Any idea?

0 Kudos
ChadYoder1
Occasional Contributor II

Are you certain the layers are getting added to the map.  The offline layers may have a different name, so if you are using a text string the load the layer, rather than iterating around all feature layers in the offline geodatabase, this may be your issue.

You could also just open the geodatabase to confirm that records are present.  If your extent or something was hosed, maybe you have an empty geodatabase.

0 Kudos
MaraStoica4
Occasional Contributor

Could you share the code you're using to add the data to the map? I've got a similar scenario with a mobile map package containing vector data and feature data and it all loads without issues offline. Is your data in a mobile map package? 

0 Kudos
VinayPrabhakar
New Contributor

if that is the case then how it's working when internet is on??

When internet is on I am fetching data from Geodatabase only?

I thing something is related to Mapview control

0 Kudos
ChadYoder1
Occasional Contributor II

If you are loading the data directly from the geodatabase when online or offline, then there should be no difference.  I've not had any issues loading data from the geodatabase.

If you can share code or a sample geodatabase, that would help.

0 Kudos