Code Monkey home page Code Monkey logo

maps_flutter's Introduction

Mapobox in Flutter

This is a simple app to show a Mapbox map and be able to do "zoom in", "zoom-out", "move when clicking", and create custom maps thanks to Mapbox Studio.

In this example, we are going to use:

Getting Started

Native configurations

I created an article on Medium to teach you how to implement Mapbox. There are a few important native configurations that you are going to need to use Mapbox.

Please, after you clone this project, go to the article and configure the native part.

.env file

For this project I used .env directory to store my PUBLIC ACCESS TOKEN, if you want to use it, you need to create this structure at the root of your app:

assets:
  - .env

Inside this file you need to put your PUBLIC ACCESS TOKEN like that:

MAPBOX_ACCESS_TOKEN = 'your public access token here';

For more info, you can check the official documentation of flutter_dotenv library.

Test

Install lcov to visualize the test:

brew install lcov

Then you can run test on:

  • Test folder on your root project:

       flutter test —coverage
       genhtml -o coverage coverage/lcov.info
       open coverage/index.html
    
  • Test folder on your location_repository package (use commands from Very Good CLI):

    very_good test --coverage --min-coverage 100
    genhtml -o coverage coverage/lcov.info
    open coverage/index.html
    

Future features

Things that I would like to add:

  • Change styles.
  • Custom markers.
  • Update the current location.
  • Search by city or country.
  • Animations.

If you want to contribute to this code open a PR or an Issue.

Hope you enjoy it 😊

maps_flutter's People

Contributors

annaps avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.