The following search services are available as part of the Flutter SDK bundled by default.
The Autosuggest API helps users to complete queries faster by adding intelligent search capabilities to your web or mobile app. This API returns a list of results as well as suggested queries as the user types in the search field.
try {
AutoSuggestResponse? response = await MapplsAutoSuggest(query: text).callAutoSuggest();
} catch(e) {
PlatformException map = e as PlatformException;
print(map.code);
}
//OR
MapplsAutoSuggest(query: text).callAutoSuggest().then((response) {
//Handle response
},onError: (e) {
print(e.code);
}).onError((error, stackTrace) => {});
query(String)
: e.g. Shoes, Coffee, Versace, Gucci, H&M, Adidas, Starbucks, B130 {POI, House Number, keyword, tag}.
-
location(LatLng)
: Location is required to get location bias autosuggest results. -
zoom(double)
: takes the zoom level of the current scope of the map (min: 4, max: 18). -
tokenizeAddress(bool)
: provides the different address attributes in a structured object. -
pod(String)
= it takes in the place type code which helps in restricting the results to certain chosen type. Below mentioned are the codes for the pod- AutoSuggestCriteria.POD_SUB_LOCALITY
- AutoSuggestCriteria.POD_LOCALITY
- AutoSuggestCriteria.POD_CITY
- AutoSuggestCriteria.POD_VILLAGE
- AutoSuggestCriteria.POD_SUB_DISTRICT
- AutoSuggestCriteria.POD_DISTRICT
- AutoSuggestCriteria.POD_STATE
- AutoSuggestCriteria.POD_SUB_SUB_LOCALITY
-
filter
= This parameter helps you restrict the result either by mentioning a bounded area or to certain mappls pin (6 digit code to any poi, locality, city, etc.) below mentioned are the various types:filter
= bounds: lat1, lng1; lat2, lng2 (latitude, longitude) {e.g. filter("bounds: 28.598882, 77.212407; 28.467375, 77.353513")filter
= cop: {mappls pin} (string) {e.g. filter("cop:YMCZ0J")
suggestedLocations
([ELocation
]): A List of the suggested locationuserAddedLocations
([ELocation
]): List of usr added locationssuggestedSearches
([SuggestedSearchAtlas
]): List of suggestion related to your search.
-
mapplsPin
(String): Place Id of the location 6-char alphanumeric. -
placeAddress
(String): Address of the location. -
type
(String): type of location POI or Country or City -
placeName
(String): Name of the location. -
userName
(String): Name of the user who add the place -
orderIndex
(int): the order where this result should be placed -
addressTokens
(AddressToken)
houseNumber
(String): house number of the location.houseName
(String): house name of the location.poi
(String): name of the POI (if applicable)street
(String): name of the street. (if applicable)subSubLocality
(String): the sub-sub-locality to which the location belongs. (if applicable)subLocality
(String): the sub-locality to which the location belongs. (if applicable)locality
(String): the locality to which the location belongs. (if applicable)village
(String): the village to which the location belongs. (if applicable)subDistrict
(String): the sub-district to which the location belongs. (if applicable)district
(String): the district to which the location belongs. (if applicable)city
(String): the city to which the location belongs. (if applicable)state
(String): the state to which the location belongs. (if applicable)pincode
(String): the PIN code to which the location belongs. (if applicable)
keyword
(String): what the user typed in.identifier
(String): what did the API use for it to qualify it as a suggested search requestlocation
(String): the name of the location to which the nearby will run in context to.hyperlink
(String): the ready-made link for the nearby API pre-initialized with all default parameters and location with code to search for.
Our Geocoding API converts real addresses into these geographic coordinates (latitude/longitude) to be placed on a map, be it for any street, area, postal code, POI or a house number etc.
try {
GeocodeResponse? response = await MapplsGeoCoding(address: add).callGeocoding();
} catch(e) {
PlatformException map = e as PlatformException;
print(map.code);
}
//OR
MapplsGeoCoding(address: add).callGeocoding().then((response) {
//Handle response
},onError: (e) {
print(e.code);
}).onError((error, stackTrace) => {});
address(String)
: address to be geocoded e.g. 237 Okhla industrial estate phase 3 new delhi, delhi 110020.
itemCount(int)
: parameter can be set to get maximum number of result items from the API (default: 1).podFilter(String)
This parameter can be used to set admin level restriction. The result will be either the given admin level or equivalent admin or higher in the hierarchy. Below mentioned are the codes for the pod:- GeoCodingCriteria.POD_HOUSE_NUMBER
- GeoCodingCriteria.POD_HOUSE_NAME
- GeoCodingCriteria.POD_POINT_OF_INTEREST
- GeoCodingCriteria.POD_STREET
- GeoCodingCriteria.POD_SUB_SUB_LOCALITY
- GeoCodingCriteria.POD_VILLAGE
- GeoCodingCriteria.POD_SUB_LOCALITY
- GeoCodingCriteria.POD_SUB_DISTRICT
- GeoCodingCriteria.POD_LOCALITY
- GeoCodingCriteria.POD_CITY
- GeoCodingCriteria.POD_DISTRICT
- GeoCodingCriteria.POD_PINCODE
- GeoCodingCriteria.POD_STATE
bias(int)
: This parameter can be used to set Urban or Rural bias. A positive value sets the Urban bias and a negative value sets Rural bias. Below mentioned are the codes for the bias:- GeoCodingCriteria.BIAS_DEFAULT (No bias)
- GeoCodingCriteria.BIAS_RURAL
- GeoCodingCriteria.BIAS_URBAN
bound(String)
: This parameter can be used to set admin boundary, which means geocoding will be done within the given admin. The allowed admin bounds are Sub-District, District, City, State and Pincode. The parameter accepts the admin mapplsPin as value.
Note: Please note that podFilter & bound parameters are mutually exclusive. They cannot be used together in an API call.
results
(List<GeoCodeResult>
): All the details regarding place.
houseNumber
(String): the houseNumber of the address/locationhouseName
(String): houseName of the address/locationpoi
(string): the point of interest or famous landmark nearby the locationstreet
(string): the street or road of the locationsubsubLocality
(string): the subSubLocality of the locationsubLocality
(string): the subLocality of the locationlocality
(string): the locality of the locationvillage
(string): the village of the locationsubDistrict
(string): the subDistrict of the locationdistrict
(string): the district of the locationcity
(string): the city of the locationstate
(string): the state of the locationpincode
(string): the pincode of the locationformattedAddress
(string): the general protocol following addressmapplsPin
(string): mappls pin of the particular locationgeocodeLevel
(string): the best matched address component.
- Census Information: (as per last census)
sttCenCd
(String): State's census code.dstCenCd
(String): District's census code.sdbCenCd
(String): Subdistrict's census code.vlgCenCd
(String): Village's census code, if address is rural.twnCenCd
(String): Town's census code, if address is within any census town.
Note: Here town means a census town - an urban agglomeration defined by GoI during census; which is different from a city.twnName
(String): Town's name as per last census.
- Local Government Directory (LGD Information)
sttLgdCd
(String): State's LGD code.dstLgdCd
(String): District's LGD code.sdbLgdCd
(String): Subdistrict's LGD code.vlgLgdCd
(String): Village's LGD code, if address is rural.twnLgdCd
(String): Town's LGD code, if address is within any census town.
Reverse Geocoding is a process to give the closest matching address to a provided geographical coordinates (latitude/longitude). Mappls reverse geocoding API provides real addresses along with nearest popular landmark for any such geo-positions on the map.
try {
ReverseGeocodeResponse? result = await MapplsReverseGeocode(location: latlng).callReverseGeocode();
} catch(e) {
PlatformException map = e as PlatformException;
print(map.code);
}
//OR
MapplsReverseGeocode(location: latlng).callReverseGeocode().then((response) {
//Handle response
},onError: (e) {
print(e.code);
}).onError((error, stackTrace) => {});
location(LatLng)
: the latitude and longitude of the location for which the address is required.
responseCode
(int): Response codes of the api.version
(String): Version of the Api.results
(List<ReverseGeocodePlace>
): All the details regarding place.
houseNumber
(String): the houseNumber of the address/locationhouseName
(String): houseName of the address/locationpoi
(String): the point of interest or famous landmark nearby the locationpoiDist
(String): distance from nearest POI in metres.street
(String): the street or road of the locationstreetDist
(String): distance from nearest Street in metres.subsubLocality
(String): the subSubLocality of the locationsubLocality
(String): the subLocality of the locationlocality
(String): the locality of the locationvillage
(String): the village of the locationsubDistrict
(String): the subDistrict of the locationdistrict
(String): the district of the locationcity
(String): the city of the locationstate
(String): the state of the locationpincode
(String): the pincode of the locationformattedAddress
(String): the general protocol following addressarea
(String): the area of the location.
- Census Information: (as per last census)
sttCenCd
(String): State's census code.dstCenCd
(String): District's census code.sdbCenCd
(String): Subdistrict's census code.vlgCenCd
(String): Village's census code, if address is rural.twnCenCd
(String): Town's census code, if address is within any census town.
Note: Here town means a census town - an urban agglomeration defined by GoI during census; which is different from a city.twnName
(String): Town's name as per last census.
- Local Government Directory (LGD Information)
sttLgdCd
(String): State's LGD code.dstLgdCd
(String): District's LGD code.sdbLgdCd
(String): Subdistrict's LGD code.vlgLgdCd
(String): Village's LGD code, if address is rural.twnLgdCd
(String): Town's LGD code, if address is within any census town.
Nearby Places API, enables you to add discovery and search of nearby POIs by searching for a generic keyword used to describe a category of places or via the unique code assigned to that category.
try {
NearbyResponse? nearbyResponse = await MapplsNearby(keyword: "Tea", location: latlng).callNearby();
} catch(e) {
PlatformException map = e as PlatformException;
print(map.code);
}
//OR
MapplsNearby(keyword: "Tea", location: latlng).callNearby().then((response) {
//Handle response
},onError: (e) {
print(e.code);
}).onError((error, stackTrace) => {});
keyword(String)
: performs search on the basis of provided keyword For eg: coffee, EV Charging Station etclocation(LatLng)
:Provide the location around which the search will be performedmapplsPin(String)
: Can set mapplsPin parameter
-
sort(String)
: provides configured sorting operations for the client on cloud. Below are the available sorts:- NearbyCriteria.DISTANCE_ASCENDING
- NearbyCriteria.DISTANCE_DESCENDING will sort the data on distance basis.
- NearbyCriteria.NAME_ASCENDING
- NearbyCriteria.NAME_DESCENDING will sort the data on alphabetically basis.
-
page(int)
: provides number of the page to provide results from. -
radius(int)
: provides the range of distance to search over(default: 1000, min: 500, max: 10000) -
bounds(String)
: Allows the developer to send in map bounds to provide a nearby search within the bounds. {e.g. (bounds("28.56812,77.240519;28.532790,77.290854")) -
userName(String)
: Use to set the user name -
richData(bool)
: rich data related to poi -
pod (string)
: it takes in the place type code which helps in restricting the results to certain chosen type. Access to this parameter is controlled from the backend. This parameter if provided will override any values provided inkeywords
request param. Below mentioned are the codes for the pod:- NearbyCriteria.POD_SUB_LOCALITY
- NearbyCriteria.POD_LOCALITY
- NearbyCriteria.POD_CITY
- NearbyCriteria.POD_VILLAGE
-
filter(String)
: This parameter helps you get a specific type of EV charging Stationfilter
= model:(string);brandId:(string);plugType:(string)
suggestedLocations
([NearbyResult]
): List of nearby placespageInfo
(PageInfo
)
-
distance
(int): provides the distance from the provided location bias in meters. -
mapplsPin
(String): Place Id of the location 6-char alphanumeric. -
email
(String): Email for contact. -
keywords
( [ String ] ): provides an array of matched keywords or codes. -
landlineNo
(String): Email for contact. -
latitude
(double): Latitude of the location. -
longitude
(double): longitude of the location. -
mobileNo
: Phone number for contact. -
orderIndex
(int): the order where this result should be placed -
placeAddress
(String): Address of the location. -
placeName
(String): Name of the location. -
city
(String): City of the location -
state
(String): State of the location -
pincode
(String): Pincode of the location -
richInfo
(Map): To show advance information of location -
type
(String): Type of location POI or Country or City. -
hourOfOperation
(String): The hours of operation of the POI in a day. -
addressTokens
(AddressToken)
houseNumber
(String): house number of the location.houseName
(String): house name of the location.poi
(String): name of the POI (if applicable)street
(String): name of the street. (if applicable)subSubLocality
(String): the sub-sub-locality to which the location belongs. (if applicable)subLocality
(String): the sub-locality to which the location belongs. (if applicable)locality
(String): the locality to which the location belongs. (if applicable)village
(String): the village to which the location belongs. (if applicable)subDistrict
(String): the sub-district to which the location belongs. (if applicable)district
(String): the district to which the location belongs. (if applicable)city
(String): the city to which the location belongs. (if applicable)state
(String): the state to which the location belongs. (if applicable)pincode
(String): the PIN code to which the location belongs. (if applicable)
pageCount
(integer): The number of pages with results.totalHits
(integer): Total number of places in the results.totalPages
(integer): Total number of pages as per page size and no of results.pageSize
(integer): The number of results per page.
Mappls Place Details is a simple, standardized and precise pan-India digital address system. Every location has been assigned a unique digital address or an mapplsPin.
The Place detail API is to extract the details of a place with the help of its mapplsPin i.e. a 6 character code. Since a place may or may not have additional attributes associated with it, the response from the place details may be different for each record. However the response will be an extract from an existing set of master key-value pairs grouped as objects.
try {
PlaceDetailResponse? response = await MapplsPlaceDetail(mapplsPin: "MMI000").callPlaceDetail();
} catch(e) {
PlatformException map = e as PlatformException;
print(map.code);
}
//OR
MapplsPlaceDetail(mapplsPin: "MMI000").callPlaceDetail().then((response) {
//Handle response
},onError: (e) {
print(e.code);
}).onError((error, stackTrace) => {});
mapplsPin(String)
: the id or mappls pin of the place whose details are required. The 6-digit alphanumeric code for any location. (e.g. mmi000).
The API is highly configurable to configuration enables to provide the required set of attributes to the user on the basis of assigned sub templates.
The default configuration with available with basic pay-as-you-go rates is that of General Details
subtemplate.
The parameters are group in sub templates. Here is the list of attributes with sub template information.
mapplsPin(String)
: 6 characters alphanumeric unique identifierplaceName(String)
: Name of the placeaddress(String)
: address of the placetype(String)
: defines the type of location matched (HOUSE_NUMBER, HOUSE_NAME, POI, STREET, SUB_LOCALITY, LOCALITY, VILLAGE, DISTRICT, SUB_DISTRICT, CITY, STATE, SUBSUBLOCALITY, PINCODE)
city(String)
: The name of the city in which the location exists.district(String)
: The name of the district in which the location exists.pincode(String)
: The pin code of the location area.subDistrict(String)
: The name of the sub-district in which the location exists.state(String)
: The name of the state in which the location exists.
houseNumber(String)
: The house number of the location.houseName(String)
: The name of the location.locality(String)
: The name of the locality where the location exists.street(String)
: The name of the street of the location.subSubLocality(String)
: The name of the sub-sub-locality where the location exists.subLocality(String)
: The name of the sub-locality where the location exists.village(String)
: The name of the village if the location exists in a village.poi(String)
: The name of the POI if the location is a place of interest (POI).
Get these details from PlaceInfo
Email
Mobile
Telephone
Website
latitude(double)
: The latitude of the location.longitude(double)
: The longitude of the location.
Kindly Note: Not all response parameters are available by default. These parameters are restricted and available as per the discussed use case. For details, please contact Mappls API support.
With POI Along the Route API user will be able to get the details of POIs of a particular category along his set route. The main focus of this API is to provide convenience to the user and help him in locating the place of his interest on his set route.
try {
PoiAlongRouteResponse? poiAlongRouteResponse = await MapplsPOIAlongRoute(path: geometry, category: "FODCOF", buffer: 300).callPOIAlongRoute();
} catch(e) {
PlatformException map = e as PlatformException;
print(map.code);
}
//OR
MapplsPOIAlongRoute(path: geometry, category: "FODCOF", buffer: 300) .callPOIAlongRoute().then((response) {
//Handle response
},onError: (e) {
print(e.code);
}).onError((error, stackTrace) => {});
category(String)
: The POI category code to be searched. Only one category input supported.path(String)
: This parameter takes the encoded route along which POIs to be searched.
buffer(Integer)
: Buffer of the road. Minimum value is25
, maximum is1000
and default is25
.geometries(String)
: Type of geometry encoding. Below are the available geometries:- POICriteria.GEOMETRY_POLYLINE5
- POICriteria.GEOMETRY_POLYLINE6 (Default)
- POICriteria.GEOMETRY_BASE64
page(Integer)
: Used for pagination. By default, a request returns maximum10
results and to get the next10
or so on pass the page value accordingly. Default is 1.sort(Boolean)
: Gets the sorted POIs along route.
suggestedPOIs
(List <SuggestedPOI
>): List of Suggested POI location
distance
(Integer): distance of the POI.mapplsPin
(String): mappls pin of the POI.poi
(String): Name of the POI.subSubLocality
(String): Sub sub locality of the POI.subLocality
(String): Sub locality of the POI.locality
(String): Locality of the POI.city
(String): City of the POI.subDistrict
(String): Sub district of the POI.district
(String): District of the POI.state
(String): State of the POI.popularName
(String): Popular name of the POI.address
(String): Address of the POI.telephoneNumber
(String): Telephone number of the POI.email
(String): Email of the POI.website
(String): Website of the POI.longitude
(double): Longitude of the POI.latitude
(double): Latitude of the POI.entryLongitude
(double): Entry longitude of the POI.entryLatitude
(double): Entry latitude of the POI.brandCode
(String): Brand id of the POI.
For any queries and support, please contact:
Email us at [email protected]
Support
Need support? contact us!