GithubHelp home page GithubHelp logo

moutazdebbaneh / open_street_map_search_and_pick Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abduzzami/open_street_map_search_and_pick

0.0 0.0 0.0 221.12 MB

License: GNU General Public License v3.0

C++ 12.52% C 0.85% Objective-C 0.02% Kotlin 0.07% Dart 10.43% Swift 0.69% Makefile 63.47% HTML 1.09% CMake 10.85%

open_street_map_search_and_pick'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

Demo

open street map search and pick

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:open_street_map_search_and_pick/open_street_map_search_and_pick.dart';

To use is simple, just call the widget bellow. You need to pass the default center position of the map and a onPicked method to get the picked position from the map.

OpenStreetMapSearchAndPick(
        center: LatLong(23, 89),
        buttonColor: Colors.blue,
        buttonText: 'Set Current Location',
        onPicked: (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

OpenStreetMapSearchAndPick(
        center: LatLong(23, 89),
        buttonColor: Colors.blue,
        buttonText: 'Set Current Location',
        onPicked: (pickedData) {
          print(pickedData.latLong.latitude);
          print(pickedData.latLong.longitude);
          print(pickedData.address);
        })

You can get latitude, longitude and address like that.

Video Tutorial

Youtube Tutorial Link

open_street_map_search_and_pick's People

Contributors

abduzzami avatar moutazdebbaneh 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.