Git Product home page Git Product logo

manafire / mapbox-flutter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imperial-lord/mapbox-flutter

0.0 0.0 0.0 663 KB

A repository to demonstrate the use of Mapbox - it's Maps and Navigation SDKs in a Flutter application

License: MIT License

Shell 0.05% JavaScript 0.15% Ruby 2.44% C++ 28.78% C 1.26% Objective-C 0.06% Kotlin 0.23% Dart 44.60% CSS 1.04% Swift 0.69% HTML 7.09% CMake 13.61%

mapbox-flutter's Introduction

MapBox Flutter

This repository contains code corresponding to the Youtube videos

If you loved this work then you can support me by liking and sharing the video, and starring this repository! ๐Ÿ˜‡

๐Ÿค” So what is this app now?

MapBox Flutter demonstrates an implementation of MapBox in a Flutter application, along with its Maps and Navigation SDKs. We will do this by building a simple project involving a hungry you on a bicycle and a set of restaurants and cafes! ๐Ÿ˜‚ In the second video, we recreate a complete Uber like experience, to implement turn-by-turn navigation, and in the process also make use of the Mapbox Search APIs, Direction APIs, Reverse Geocoding and Maps SDK.

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป Where are the instructions to get the app up and running?

Well open your browser and IDE, we have got a few things to do! Follow along as we get the app up and running.

  1. Head to https://account.mapbox.com and create a new account. Then go to your account page. You will see a public access token. This is something we will need later.

Screenshot 2022-02-11 at 9 03 04 PM

  1. In the same page click on Create a token and in the next page, add a new secret token. Make sure that the DOWNLOADS:READ permission is checked here. After you create the token, you must copy it somewhere else because you can only see this once.

Screenshot 2022-02-11 at 9 04 50 PM

  1. Now that you have both the tokens, you just need to replace them in appropriate places of the project code. Open the starter_code/mapbox_navigation folder and look for YOUR_PUBLIC_ACCESS_TOKEN and YOUR_SECRET_TOKEN in the entire project. Replace them with the tokens gotten in Step 1 and 2 respectively. To double check you can make sure that -
    • For ios: You must have put public token in Runner/Info.plist file.
    • Some android: You must have put public token as a string in app/src/main/res/values/strings.xml and secret token as a string in gradle.properties file.
  2. To run the app in an IOS device/emulator, you will need 1 more step. Open or create .netrc file in your home directory. In there add the following lines:
machine api.mapbox.com
  login mapbox
  password <YOUR_SECRET_TOKEN>
  1. Finally open your assets folder and add a config/.env file. You can add one key-value pair there:
MAPBOX_ACCESS_TOKEN="<YOUR_PUBLIC_ACCESS_TOKEN>"

That's it. You follow these 5 steps and you should be good to go. Now I would also recommend going through the documentation for Android and iOS, because there is a lot more to it, like adding permissions and stuff, which I have already done for you.

๐Ÿ“š Any supporting materials?

Sure. The complete demonstration for this app is done in the Youtube video mentioned above. Other than that, here are some additional resources -

๐Ÿ˜ž I ran this app, and I have an issue ...

Make sure to watch the video, and that might just clarify your issue, because I have demonstrated all the steps there. Still, if you have anything, just open an issue or comment on the youtube video, or reach out to me and I'll love to help!

Thank you for visiting!

mapbox-flutter's People

Contributors

imperial-lord 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.