Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 2.01 KB

README.md

File metadata and controls

72 lines (50 loc) · 2.01 KB

🗺️ OSM Geocoder!

No API Key Required! Obtain detailed location data without needing an API key. This package is a client for the Open Street Map.

Contributors Issues Pull Requests GitHub Repo stars


🔎 Getting Location Data from Coordinates

Fetching location data using coordinates with the OSM Geocoder is straightforward:

Coordinates coordinates = Coordinates(-5.837799,-35.203978);
LocationData data = await OSMGeocoder.findDetails(coordinates);

LocationData Class

The LocationData class contains the following fields:

  int placeId;
  String osmType;
  int id;
  String lat;
  String lon;
  int placeRank;
  double importance;
  String displayName;
  Address address;
  List<String> boundingbox;

Address Class

The Address class provides detailed address information:

  String road;
  String suburb;
  String city;
  String stateDistrict;
  String state;
  String iso31662Lvl4;
  String postcode;
  String country;
  String countryCode;

For more detailed information, please refer to the documentation.


📍 About the OpenStreetMap

OpenStreetMap is a collaborative project that creates and distributes free geographic data without legal or technical restrictions for use.

This project is 20 years old and is currently in its 6th version of the API, with subprojects in various countries, including Brazil!