ThinkGeo.com    |     Documentation    |     Premium Support

OSM produce blank tiles only

since a couple of days, OSM tiles are not displayed any more.
reproducible with MS 9, 10.5, 11 latest beta
reproducible in our application and in MS sample “How Do I”

Logs show: A connection to http://a.tile.openstreetmap.org/ was leaked. Did you forget to close a response body?

Any idea is welcome.

Best regards,
Patrick.

Hi Patrick,

I tested it and it looks the OSM layers works well.

Do you think that’s a temporary network issue? And I am not sure what’s the connection leak, could you please show some screen shot or trace stack about the error?

Here is some tiles, you can see they render correct here.









If I missed anything please let me know.

Regards,

Ethan

Ethan

we have made additional test and can clarify.
OpenStreetMapOverlay works well with android<= 8
however, it produces blank tuiles when android sdk=9 tested on android 9 (S10)

thank you for your help
Patrick.

Hi Patrick,

It looks I can also make it works in android version 9.

Here is the packages I used:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="MapSuiteDependency-GeoAPI" version="10.5.0" targetFramework="monoandroid81" />
  <package id="MapSuiteDependency-NetTopologySuite" version="10.5.0" targetFramework="monoandroid81" />
  <package id="MapSuiteDependency-NewtonsoftJson" version="10.5.0" targetFramework="monoandroid81" />
  <package id="MapSuiteDependency-SkiaSharp" version="10.5.0" targetFramework="monoandroid81" />
  <package id="MapSuiteMobileForAndroid-BareBone" version="11.0.0-beta066" targetFramework="monoandroid81" />
  <package id="ThinkGeo.Cloud.Client" version="11.0.0-beta058" targetFramework="monoandroid81" />
  <package id="ThinkGeo.MapSuite" version="11.0.0-beta099" targetFramework="monoandroid81" />
</packages>

And I just used the simplest code to render it:

        protected override void OnCreate(Bundle bundle)
    {
        base.OnCreate(bundle);
        SetContentView(Resource.Layout.Main);

        MapView mapView = FindViewById<MapView>(Resource.Id.MapView);
        mapView.MapUnit = GeographyUnit.Meter;
        mapView.ZoomLevelSet = new ThinkGeoCloudMapsZoomLevelSet();
        mapView.CurrentExtent = new RectangleShape(-13135699, 10446997, -8460281, 781182);

        OpenStreetMapOverlay osm = new OpenStreetMapOverlay();
        mapView.Overlays.Add(osm);
        mapView.Refresh();
    }

If you found I missed any point when test it please let me know.

Regards,

Ethan

Ethan,

this code works well built on SDK Android 8.1, run on Android 9.
But it you change your Build SDK to Android 9, target version to 9 and run on Android 9, you’ll get blank tiles.

Patrick.

Hi Patrick,

Thanks to point that, I just found I cannot build the project under version 9, even after I install it.

Because there is one day vacation, I will try to reset my environment and test it again when back.

Regards,

Ethan

Ethan,

you have to update your android SDK version to 9.
this can be done by either using the SDK manager, update VS 2017 or migrate to VS 2019

there are some other bugs with VS2019 (issue with sqlcache), I’ll add another thread for that, so I suggest that you migrate to VS 2019 asap.

Patrick.

Hi Patrick,

We will go on working about it, we need to setup a new machine because when upgrade the IDE, environment get broken and Android simulator don’t works.

Any update I will let you know.

Regards,

Ethan

Hello,

any progress here ?

Patrick.

Hi Patrick,

It looks test for new Android 9 met some problem, I hadn’t get update about it.

I will asked about it and reply here.

Regards,

Ethan

Hi Patrick,

Here is the update, our developer find the reason is after Android upgrade from Version 8.0 to Version 9.0, it disable all “http” request by default.

The workaround for it is add this line in your Project(Here is sample project “HelloWorld”) -> Properties -> AndroidManifest.xml

Change

 <application android:label="HelloWorld"></application>

to

<application android:usesCleartextTraffic="true" android:label="HelloWorld"></application>

If your xml don’t contains that line before, just add this:

<application android:usesCleartextTraffic="true"></application>

Our develope is trying to find a better way to modify in our code inner, so update it late.

Regards,

Ethan