GithubHelp home page GithubHelp logo

nabeelof / map_picker_free Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 220 KB

License: GNU General Public License v3.0

C++ 34.15% C 2.33% Objective-C 0.06% Kotlin 0.20% Dart 29.18% Swift 1.89% HTML 6.42% CMake 25.76%

map_picker_free's Introduction

A flutter place search and location picker plugin that uses Open Street Map. it is completely free and easy to use.

Features

  • Pick location from map
  • Search location by places
  • Easy to use
  • Absolutely free without any API key

Demo

flutter_open_street_map

Objective

This lib was designed to use open street map to set location on Flutter applications for all platforms.

Getting Started

Import the following package in your dart file

import 'package:map_picker_free/map_picker_free.dart';

To use is simple, make a screen for showing it in body. And in onPicked() just return that pickedData object with Navigator.pop. You need to pass the default center position of the map and a onPicked method to get the picked position from the map.

MapPicker(
      center: LatLong(5, 10),
      onPicked: (pickedData) {
        Navigator.pop(context, pickedData);
      })

Then Usage

Now if you press Set Current Loatiion button, you will get the pinned location by onPicked method.

In the onPicked method you will receive pickedData.

pickedData has two properties.

  1. latLong
  2. address

latLong has two more properties.

  1. latitude
  2. longitude

For example

MapPicker(
      center: LatLong(5, 10),
      onPicked: (pickedData) {
        Navigator.pop(context, pickedData);
      })

You can get latitude, longitude and address like that.

map_picker_free's People

Contributors

microprogramer avatar nabeelof 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.