Flutter_map: Map not showing on release apk, only on debug.

Created on 30 Oct 2019  路  3Comments  路  Source: fleaflet/flutter_map

My flutter map, i've taken out my api key. I've tried with mapbox and thunderforest. Both have the same effect.

body: FlutterMap(
                    options: MapOptions(
                        center: LatLng(57.1498817, -2.1950666),
                        zoom: 10.0,
                    ),
                    layers: [
                        new TileLayerOptions(
                            urlTemplate: "https://tile.thunderforest.com/neighbourhood/{z}/{x}/{y}.png?apikey=<apikey>",
                        ),
                        MarkerLayerOptions(
                            markers: getLocationsMarkers(),
                        ),
                    ],
                ),

Most helpful comment

To @reidterror and anyone who experiences the same issue: You have to add <uses-permission android:name="android.permission.INTERNET"/> permission to the root of your AndroidManifest.xml to fix it. Not sure why it happens, since it's needed for debugging only, but it fixed it for me.

All 3 comments

I've solved my issue by moving to google_maps_flutter. There's a markers example in the examples folder.

The same issue, actually.

To @reidterror and anyone who experiences the same issue: You have to add <uses-permission android:name="android.permission.INTERNET"/> permission to the root of your AndroidManifest.xml to fix it. Not sure why it happens, since it's needed for debugging only, but it fixed it for me.

Was this page helpful?
0 / 5 - 0 ratings