fleaflet / flutter_map

A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.
https://pub.dev/packages/flutter_map
BSD 3-Clause "New" or "Revised" License
2.74k stars 861 forks source link

Tiles don't load after building a release apk #1895

Closed dikovmaxim closed 4 months ago

dikovmaxim commented 4 months ago

What is the bug?

Hi. I recently used yout tutorials to build a small application containing maps. After I tried to compile it to apk release, the app opend just file, butthe map was empty. I rechecked everythong 3 times and the app-debug.apk was working just fine, but app-release.apk didnt show the map and markers i placed on it. Markers are also not to be seen.

here is what it looks like in debug (just fine) image

and this is what it looks like on release build: image

How can we reproduce it?

Just use the standart map code @override Widget build(BuildContext context) { return Scaffold( body: FlutterMap( options: const MapOptions( ), children: [ TileLayer( urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png", userAgentPackageName: 'pinpals', ), MarkerLayer( markers: _markers.toList(), ), ], ),

and run flutter build apk

Do you have a potential solution?

I this it has sth. to do with tile loading. for some reason it cant fetch tiles and keeps the space blank. idk.

Platforms

I tried it both on pixel 33 emulator and on my real phone OnePlus 8

Severity

Obtrusive: Prevents normal functioning but causes no errors in the console

dikovmaxim commented 4 months ago

Updated flutter, Updated maps to the last version, added to manifest file. helped.