skip to Main Content

I am using fluttermaps to get the basic osm(open street map)layer to appear. it works but I am trying to add more options. Does anyone have any tips on where to go.

I have this so far and its working but I want different types of options on flutter map like you would using maps on iphone. Not using google maps


TileLayer get openStreetMapTileLayer => TileLayer (
      urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
      userAgentPackageName: 'dev.fleaflet.flutter_map.example',
);

2

Answers


  1. Chosen as BEST ANSWER

    The answer was pretty simple. Hope this helps someone else. I read on fluttermaps docs that they accept tiles from everywhere even web servers. So all I had to do was copy the tile urls from my website over.


  2. you can use map controller and options for such additional features

    FlutterMap(
        mapController: MapController(),
        options: const MapOptions(
          initialCenter: LatLng(42.58, 12.43),//like this
          initialZoom: 6,
        ),
        children: [],
    );
    

    doc:- https://docs.fleaflet.dev/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search