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

outdated

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

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 #

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:flutter_open_street_map/flutter_open_street_map.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.

FlutterOpenStreetMap(
        center: LatLong(23, 89),
        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

FlutterOpenStreetMap(
        center: LatLong(23, 89),
        onPicked: (pickedData) {
           print(pickedData.latLong.latitude);
           print(pickedData.latLong.longitude);
           print(pickedData.address);
        })

You can get latitude, longitude and address like that.

13
likes
0
pub points
76%
popularity

Publisher

verified publishermicroprogramers.org

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_map, http, latlong2

More

Packages that depend on flutter_open_street_map