3

I'm using flutter_map plugin with a MapBox style and I'm trying to display a 3D globe view in app

Globe

This is my current FlutterMap

FlutterMap(
                  mapController: controller,
                  options: MapOptions(
                    maxZoom: 19,
                    zoom: latestZoom,
                    center: userLocation ?? LatLng(lat, lon),
                  ),
                  children: [
                    TileLayer(
                      urlTemplate:   "https://api.mapbox.com/styles/v1/{username}/{mapStyleId}/tiles/256/{z}/{x}/{y}@2x?access_token={accessToken}",
                      additionalOptions: const {
                        'username': <username>,
                        'mapStyleId': <style.id>,
                        'accessToken': <access.token>,
                      },
                      maxZoom: 19,
                    ),

                      MarkerLayer(
                        markers: [
                          <markers>
                        ],
                      ),
                  ],
                ),

After some research I found out that the part responsible for the map view is the "crs" property in MapOptions and that the right projection and transform can give me the target result.

How can I find/create the right Crs class with the globe projection to be able to show a 3D globe view while maintaining the ability to display markers on it?

1 Answers1

0

there is one more package flutter_earth using Tiles. in the 3D view, the only issue is that flutter_earth doesn't support a custom marker.

here is Link

https://pub.dev/packages/flutter_earth/versions

enter image description here

Kaushik Makwana
  • 2,422
  • 9
  • 31
  • 50