flutter-photon

An API client for Komoot's Photon Geocoding API written in and for Dart/Flutter.

APACHE-2.0 License

Stars
5
Committers
2

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!

Package Rankings
Top 27.79% on Pub.dev
Badges
Extracted from project README
version License flutter_photon
Related Projects