The following search services are available as part of the 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.
MapplsGL.RestApi.autoSuggest({
query: text,
}).then(response => {
//Handle Response
}).catche(error => {
//Handle Error
});
query(String)
: e.g. Shoes, Coffee, Versace, Gucci, H&M, Adidas, Starbucks, B130 {POI, House Number, keyword, tag}.
filter(String)
:This parameter helps you restrict the result either by mentioning a bounded area or to certain mapplspin (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: {mapplspin} (string) {e.g. filter: "cop:YMCZ0J"}
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- MapplsGL.RestApi.AutoSuggestCriteria.POD_SUB_LOCALITY: Sublocality
- MapplsGL.RestApi.AutoSuggestCriteria.POD_LOCALITY: Locality
- MapplsGL.RestApi.AutoSuggestCriteria.POD_CITY: City
- MapplsGL.RestApi.AutoSuggestCriteria.POD_VILLAGE: Village
- MapplsGL.RestApi.AutoSuggestCriteria.POD_SUB_DISTRICT: Subdistrict
- MapplsGL.RestApi.AutoSuggestCriteria.POD_DISTRICT: District
- MapplsGL.RestApi.AutoSuggestCriteria.POD_STATE: State
- MapplsGL.RestApi.AutoSuggestCriteria.POD_SUB_SUB_LOCALITY: Subsublocality
location(Location)
: e.g. location: {latitude: 28.454, longitude: 77.435}tokenizeAddress(boolean)
: provides the different address attributes in a structured object.zoom(double)
: takes the zoom level of the current scope of the map (min: 4, max: 18).hyperLocal(boolean)
: This parameter lets the search give results that are hyper-localized to the reference location passed in the location parameter. This means that nearby results are given a higher ranking than results far from the reference location. Highly prominent results will still appear in the search results, however they will be lower in the list of results. This parameter will work ONLY in conjunction with the location parameter.
suggestedLocations(Array<ELocation>
: A List of the suggested locationuserAddedLocations(Array<ELocation>)
: List of usr added locationssuggestedSearches(Array<SuggestedSearchAtlas>)
: List of suggestion related to your search.
mapplsPin(String)
: Mappls Pin of the location 6-char alphanumeric.placeAddress(String)
:Address of the location.type(String)
: type of location POI or Country or CityplaceName(string)
: Name of the location.addressTokens(AddressTokens)
orderIndex(number)
: the order where this result should be placeddistance(number)
: aerial distance in meters from reference location
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.
MapplsGL.RestApi.geocode({address: placeName})
.then(response => {
//Handle Response
})
.catch(error => {
//Handle Error
});
address(string)
: address to be geocoded e.g. 237 Okhla industrial estate phase 3 new delhi, delhi 110020.
itemCount(number)
: parameter can be set to get maximum number of result items from the API (default: 1).
results(Array<GeoCode>)
: 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 locationlatitude(number)
: the latitude for the location.longitude(number)
: the longitude for the location.geocodeLevel(string)
: the best matched address component.
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.
MapplsGL.RestApi.reverseGeocode({latitude: lat, longitude: lng})
.then(response => {
// Handle Response
})
.catch(error => {
// Handle Error
});
latitude(number)
: the latitude of the location for which the address is required.longitude(number)
: the longitude of the location for which the address is required.
responseCode(number)
: Response codes of the api.version(string)
: Version of the Api.results(Array<Place>)
: 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 locationpoi_dist(string)
: distance from nearest POI in metres.street(string)
: the street or road of the locationstreet_dist(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 locationdistrict(string)
: the district of the locationsubDistrict(string)
: the subDistrict of the locationcity(string)
: the city of the locationstate(string)
: the state of the locationpincode(string)
: the pincode of the locationformatted_address(string)
: the general protocol following addressarea(string)
: the area of the location.
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.
MapplsGL.RestApi.nearby({
keyword: keyword,
location: location
}) .then(response => {
// Handle Response
})
.catch(error => {
// Handle Error
});
keyword(string)
: performs search on the basis of provided keyword For eg: coffee, EV Charging Station etclocation(string)
: Provide the location around which the search will be performedlocation
also support mappls pin e.g., location: "MMI000"
page(number)
: provides number of the page to provide results from.radius(number)
: provides the range of distance to search over(default: 1000, min: 500, max: 10000)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 in keywords request param.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")filter(string)
:This parameter helps you get a specific type of EV charging Station- filter = model:(string);brandId:(string);plugType:(string)
richData(boolean)
: rich data related to poisortBy(string)
: provides configured sorting operations for the client on cloud. Below are the available sorts:MapplsGL.RestApi.NearbyCriteria.DISTANCE_ASCENDING
MapplsGL.RestApi.NearbyCriteria.DISTANCE_DESCENDING
MapplsGL.RestApi.NearbyCriteria.NAME_ASCENDING
MapplsGL.RestApi.NearbyCriteria.NAME_DESCENDING
userName(string)
: Use to set the user name
suggestedLocations(Array<NearbyAtlasResult>)
: List of nearby placespageInfo(PageInfo)
distance(number)
: 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(Array<string>)
: provides an array of matched keywords or codes.landlineNo(string)
: Email for contact.mobileNo(string)
: Phone number for contact.orderIndex(string)
: the order where this result should be placedplaceAddress(string)
: Address of the location.placeName(string)
: Name of the location.type(string)
: Type of location POI or Country or City.city(string)
: City of the locationstate(string)
: State of the locationpincode(string)
: Pincode of the locationhourOfOperation(string)
: The hours of operation of the POI in a day.addressTokens(AddressTokens)
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(number)
: The number of pages with results.totalHits(number)
: Total number of places in the results.totalPages(number)
: Total number of pages as per page size and no of results.pageSize(number)
: 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 mapplsPin API can be used to extract the details of a place with the help of its mapplsPinn i.e. a 6 digit code or a place_id.
MapplsGL.RestApi.placeDetail(
{mapplsPin: "MMI000"}
).then(response => {
// Handle Response
})
.catch(error => {
// Handle Error
});
mapplsPin(string)
: the id or mapplsPin of the place whose details are required. The 6-digit alphanumeric code for any location. (e.g. mmi000).
mapplsPin(string)
: 6 characters alphanumeric unique identifierlatitude(number)
: The latitude of the location.longitude(number)
: The longitude of the location.
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.
MapplsGL.RestApi.POIAlongRoute({
path: path,
category: keyword,
buffer: 300,
geometries: 'polyline6',
page: 1,
}).then(response => {
// Handle Response
})
.catch(error => {
// Handle Error
});
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(number)
: Buffer of the road. Minimum value is25
, maximum is1000
and default is25
.geometries(string)
: Type of geometry encoding.page(number)
: 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(Array<SuggestedPOI>)
: List of Suggested POI location
distance(number)
: distance of the POI.mapplsPin(string)
: mapplsPin 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.poplrName(string)
: Popular name of the POI.address(string)
: Address of the POI.tel(string)
: Telephone number of the POI.email(string)
: Email of the POI.website(string)
: Website of the POI.brand_code(string)
: Brand id of the POI.
For any queries and support, please contact:
Email us at [email protected]Support Need support? contact us!