FlutterKerala / mapbox_for_flutter

Just a small map api mapbox for flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mapbox for flutter

This is a Map for flutter where any one can use for free.

Mapbox

Mapbox Map box is give api and sdk for developers to use map on our project. Unlike other Map api like google api in mapbox we dont need any kind of payment on 1st use like that.

You you want your own mapbox to use then.

use dependencies

flutter_map: ^0.8.2
latlong: ^0.6.1

Now in your Dart code use

FlutterMap()

Flutter Map get

 options: new MapOptions(
        center: new LatLng(<take lagitude and logitude>),
        zoom: <take zoom value>,
      ),
      

Then it take layer

 layers: []

In 1st layer put your map

 TileLayerOptions(
          urlTemplate: "<url token>",
          additionalOptions: {
            'accessToken': '<acess token>,
            'id': '<map id this will tell what kind of map>',
          },
        ),

To place marker

MarkerLayerOptions(
          markers: [
            new Marker(
              width: <width>,
              height: <height>,
              point: new LatLng(<latitude and logitude>),
              builder: (ctx) =>
              new Container(
                child: new FlutterLogo(),// your marker
              ),
            ),
          ],
        )

About

Just a small map api mapbox for flutter


Languages

Language:Dart 75.8%Language:Kotlin 11.7%Language:Swift 11.5%Language:Objective-C 1.0%