GithubHelp home page GithubHelp logo

mghase / flutter_map_location Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xennis/flutter_map_location

0.0 0.0 0.0 192 KB

flutter_map plugin to request and display the users location and heading on the map

Home Page: https://pub.dev/packages/flutter_map_location

License: MIT License

Kotlin 0.61% Swift 1.70% Objective-C 0.16% Dart 97.53%

flutter_map_location's Introduction

Flutter Map – Location plugin

Flutter Pub

A flutter_map plugin to request and display the users location and heading on the map. The core features of the plugin are:

  • Customization: The location button and marker can be completly customized.
  • Energy efficiency: The location service is turned off if the app runs in the background.
  • Usability: Developers are empowered to ensure a good user experience.

User experience

Status

  • The location button can be changed dependening on the location services status. For example also Google Maps shows a different icon if the location service is off.
  • The marker icon can be changed depending on the location accuracy.
  • It's possible to show the information (e.g. in form of a snackbar) to the user that the user location is outside of the map bounds.
  • The location heading is also shown for devices without an gyroscope. We patched flutter_compass for that.

Installation

Add flutter_map to your pubspec:

dependencies:
  flutter_map_location: any # or the latest version on Pub

Android

Ensure the following permissions are present in <project-root>/android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

See reference example code

iOS

Ensure the following permission is present in <project-root>/ios/Runner/Info.plist:

<key>NSLocationWhenInUseUsageDescription</key>
<string>App needs access to location and direction when open.</string>

See reference example code

Usage

Look at the default example and the notes inside the code. That's a working example.

Demo / example

A working example can be found in the example/ directory. It contains a page with the default settings:

Default example

... and one with customized button and marker:

Custom example

(Map attribution: © OpenStreetMap contributors)

Credits

The plugin is inspired by user_location_plugin by igaurab.

flutter_map_location's People

Contributors

andreystavitsky avatar xennis 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.