mapmyindia_flutter 0.0.2 mapmyindia_flutter: ^0.0.2 copied to clipboard
Unofficial MapMyIndia Flutter packages .
mapmyindia_flutter #
A Unofficial mapmyindia flutter packages .
Internally use Mapmyindia REST API
Table of Contents #
Installation #
Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
mapmyindia_flutter: ^0.0.1
Install it
You can install packages from the command line:
with pub:
$ dart pub get
Alternatively, your editor might support dart pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:mapmyindia_flutter/mapmyindia_flutter.dart';
Documentation #
Reverse Geocoding
First you need to create an account on Mapmyindia Signup. If you have allready an account then Mapmyindia Login . In reverse geocoding you will use the REST API Key for Web/Android/iOS.
import 'package:mapmyindia_flutter/mapmyindia_flutter.dart';
MapMyIndiaGeocoding("[API_KEY]")
.getAddress(_latitude,_longitude)
.then((getAddress) {
ReverseGeocoding address = getAddress.formattedAddress;
});
Code explaination
MapMyIndiaGeocoding class contain getAddress(double,double) method and it return Future
ReverseGeocoding Model
Data | Description |
---|---|
houseNumber | The house number of the location. It may be empty String if house number not exist |
houseName | The name of the location. |
poi | The name of the POI if the location is a place of interest (POI). |
poiDist | distance from nearest POI in metres. |
street | The name of the street of the location. |
streetDist | distance from nearest Street in metres. |
subSubLocality | The name of the sub-sub-locality where the location exists. |
subLocality | The name of the sub-locality where the location exists. |
locality | The name of the locality where the location exists. |
village | The name of the village if the location exists in a village. |
district | The name of the district in which the location exists. |
subDistrict | The name of the sub-district in which the location exists. |
city | The name of the city in which the location exists. |
state | The name of the state in which the location exists. |
pincode | The pin code of the location area. |
latitude | The latitude of the location. |
longitude | The longitude of the location. |
formattedAddress | The complete human readable address string that is usually the complete postal address of the result. |
area | in-case the co-ordinate lies in a country the name of the country would be returned or if the co-ordinate lies in an ocean, the name of the ocean will be returned. |