maptiler_flutter 0.0.2 copy "maptiler_flutter: ^0.0.2" to clipboard
maptiler_flutter: ^0.0.2 copied to clipboard

A flutter wrapper for the mapTiler Api.

MapTiler Flutter #

This Flutter package provides a convenient Dart wrapper around the MapTiler Cloud API, allowing easy access to various MapTiler services like Geocoding, Coordinates, and Geolocation.

Features #

  • Geocoding API: Forward and reverse geocoding, including batch geocoding.
  • Coordinates API: Search coordinate systems and transformations.
  • Geolocation API: IP-based geolocation services.
  • Maps API: todo
  • Static Maps API: todo
  • Tiles API: todo
  • Data API: todo
  • Other API: todo

Getting Started #

To get started with this package, add it as a dependency in your Flutter project.

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  maptiler_flutter: ^0.0.2

Import the Package #

import 'package:maptiler_flutter/maptiler.dart';

Usage #

Before using the APIs, you must initialize the package with your MapTiler API key.

Setting up API Key #

void main() {
  MapTilerConfig.setApiKey('YOUR_MAPTILER_API_KEY');
  runApp(MyApp());
}

API Usage #

// Forward Geocoding
GeocodingService.searchByName("Zurich").then((result) {
  print(result.features);
});

// Reverse Geocoding
GeocodingService.searchByCoordinates(8.55, 47.36667).then((result) {
  print(result.features);
});

// Search Coordinates
CoordinatesAPI.searchCoordinates("query").then((result) {
  print(result.results);
});

// IP Geolocation
GeolocationService.getIPGeolocation().then((result) {
  print(result.city);
});

Models #

This package provides several models to represent the data structures used by the MapTiler API, including SearchResults, Feature, GeolocationResult, and more.

Error Handling #

The API methods throw exceptions in case of failure. Make sure to handle these appropriately in your application.

Contributing #

Contributions to the package are welcome. Please follow the standard pull request process for your contributions.

License #

This package is licensed under the MIT License.

Disclaimer #

This package is not officially affiliated with MapTiler.

3
likes
0
points
67
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter wrapper for the mapTiler Api.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on maptiler_flutter