Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

288
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda