I am using flutter to render a map from openstreetmap. But I do not want to show the poi’s on the map. I want to handle that myself. How can I avoid showing the poi’s.
I did a search using Bing Chat and it came up with the solution. Is this correct?
Yes, it is possible to avoid showing POIs on OpenStreetMap in Flutter. One way to achieve this is by using the flutter_map plugin, which allows you to customize the map tiles and layers 1.
To remove POIs from the map, you can use the MapOptions class and set the showPointsOfInterest property to false 1. Here’s an example:
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong/latlong.dart';
class MyMap extends StatelessWidget {
@override
Widget build(BuildContext context) {
return FlutterMap(
options: MapOptions(
center: LatLng(51.5, -0.09),
zoom: 13.0,
showPointsOfInterest: false,
),
layers: [
TileLayerOptions(
urlTemplate:
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
subdomains: ['a', 'b', 'c'],
),
],
);
}
}