flutter_photon 2.0.1 copy "flutter_photon: ^2.0.1" to clipboard
flutter_photon: ^2.0.1 copied to clipboard

An API client for the Komoot Photon API (photon.komoot.io) for Dart and Flutter.

flutter_photon #

version License flutter_photon

Wrapper for Komoot's Photon API for Dart/Flutter.

It supports forward and reverse geocoding as well as search-as-you-type.

Photon #

Photon is a free and open-source API hosted by Komoot and powered by ElasticSearch. It returns data from the OpenStreetMap project, which is licensed under the ODbL License.

The API is available at photon.komoot.io and licensed under the Apache 2.0 License. Its source code and some documentation is published on GitHub.

Important: Please be aware of the Terms and Use of Photon! It is free to use, so please be fair and avoid excessive requests!

Usage #

Forward geocoding:

import 'package:flutter_photon/flutter_photon.dart';

void main() async {
  final api = PhotonApi();
  final results = await api.forwardSearch('munich');
}

Reverse geocoding:

import 'package:flutter_photon/flutter_photon.dart';

void main() async {
  final api = PhotonApi();
  final results = await api.reverseSearch(48.123, 11.321);
}

Self-hosted instances (custom URL):

void main() async {
  final api = PhotonApi(baseUrl: 'https://example.com/api');
}

You can find more examples on how to use the API by looking at the tests.

Features and Bugs #

Feel free to open a new issue! I am always happy to improve this package.

Contribution #

Feel free to open pull requests and help to improve this package!

2
likes
160
pub points
72%
popularity

Publisher

verified publishervollkorntomate.de

An API client for the Komoot Photon API (photon.komoot.io) for Dart and Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

http

More

Packages that depend on flutter_photon