osm_search_and_pick 0.1.2 copy "osm_search_and_pick: ^0.1.2" to clipboard
osm_search_and_pick: ^0.1.2 copied to clipboard

A flutter place search and location picker plugin that uses Open Street Map.

OSM Search and Pick for Flutter #

A Flutter plugin for location search and selection using OpenStreetMap. It's free, user-friendly, and perfect for adding location features to your Flutter apps.

Features #

  • Pick locations directly from the map.
  • Search for places with ease.
  • Simple and intuitive to use.

Demo #

open street map search and pick

Objective #

This library is designed to integrate OpenStreetMap for location setting in Flutter apps, supporting all platforms.

Getting Started #

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:osm_search_and_pick/osm_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.

5
likes
0
points
114
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter place search and location picker plugin that uses Open Street Map.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cupertino_icons, flutter, flutter_map, geolocator, http, latlong2

More

Packages that depend on osm_search_and_pick