I'm working on a Flutter app that displays an OpenStreetMap (OSM) map. I'm trying to style the map to look like the following image:
However, I haven't been able to find a way to achieve this style directly within the mobile application. All the methods I've come across rely on third-party APIs or rendering the styled tiles of the map on servers.
Has anyone successfully styled an OSM map in a Flutter app to achieve a similar look? If so, what approach did you use?
dependencies:
flutter_map: ^3.1.0
The code:
FlutterMap(
options: MapOptions(
center: LatLng(51.5, -0.09),
zoom: 5,
),
nonRotatedChildren: [
AttributionWidget.defaultWidget(
source: 'OpenStreetMap contributors',
onSourceTapped: () {},
),
],
children: [
TileLayer(
urlTemplate:
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName: 'dev.fleaflet.flutter_map.example',
),
MarkerLayer(markers: markers),
],
)