Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

286
Views
Xamarin Android 5.1.1, Leaflet, Mapbox not working in webview

I have created an app that supports all Android 5.1.1, Android 9 and Android 10 rugged tablets. The application is built in Xamarin Android native (not Xamarin Forms). The application uses Leaflet to show maps in a Webview. A custom maps server feeds map tiles to Leaftlet.

Now bosses want to replace the custom maps server with Mapbox. Means, now Mapbox should feed map tiles to Leaflet. I have successfully got it working on Android 9, and Android 10 (in Xamarin Android, Leaflet, Webview). But maps do not show up on Android 5.1.1 at all. My Mapbox initialization code is as below:

var mapboxTiles = L.tileLayer(
      `https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=<my_token>`,
{
  attribution: '© <a href="https://www.mapbox.com/feedback/">Mapbox</a>',
  tileSize: 512,
  zoomOffset: -1,
});


map.addLayer(mapboxTiles);

This same piece of code works well on Android 9, and Android 10. But it does not work at Android 5.1.1. I have debugged WebView using Chrome (chrome://inspect) and in case of Android 5.1.1 the JavaScript file (in which I have written the above code) does not even load at all. I want that MapBox should work on Android 5.1.1 also.

Any help or guidance would be appreciated. Thanks guys.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!