GithubHelp home page GithubHelp logo

mappy2's Introduction

Mappy 2

Remake and slight overhaul of the Mappy app, 16 months later, which was developed to showcase the integration of Mapbox in Flutter. Currently, it's only available for Android, as I'm waiting for my new MacBook Pro to arrive ๐Ÿคฆ. I will update the project in the future, I promise.

Usage

This documentation will explain the necessary steps to get the application up and running on respective platforms, Android and iOS (coming soon). In both cases, you need to gather appropriate credentials, these are the public and private (or secret) tokens.

  1. Secret token needs to have Downloads:Read scope
  2. Public token is usually the default public token, or a newly generated token marked as public

Android

Create a gradle.properties file in Gradle user home folder (typically USER_HOME/.gradle) with the following contents:

MAPBOX_DOWNLOADS_TOKEN=YOUR_SECRET_MAPBOX_ACCESS_TOKEN

Next, copy the public token somewhere accessible, for example, in android/app/src/main/res/values/strings.xml (this file is mentioned in android/.gitignore for this particular reason)

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="mapbox_access_token">YOUR_MAPBOX_ACCESS_TOKEN</string>
</resources>

Obviously you don't need to do it this way, but just find a way to keep the public (access) token somewhere handy.

Running the app

Start by installing dependencies and running the code generation task

flutter pub get
flutter pub run build_runner build

To run the app, provide the public access token via --dart-define

flutter run --dart-define=ACCESS_TOKEN=<public-access-token>

You can use the trivial unit test to check if points of interest are fetched correctly from Mapbox's Search API

flutter test --dart-define=ACCESS_TOKEN=<public-access-token>

mappy2's People

Contributors

sunderee avatar

Forkers

limitlessfavour

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.