map_picker_free 0.0.1 copy "map_picker_free: ^0.0.1" to clipboard
map_picker_free: ^0.0.1 copied to clipboard

A flutter place search and location picker plugin that uses Open Street Map for free without any API key.

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.

7
likes
120
pub points
62%
popularity

Publisher

verified publishermicroprogramers.org

A flutter place search and location picker plugin that uses Open Street Map for free without any API key.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, flutter_map, http, latlong2

More

Packages that depend on map_picker_free