This is an easy to integrate nearby search by MAPPLS.
To search the nearby records as per specified record types from the Custom Nearby Record Search database around the provided reference location.
The plugin will search the results based on Custom Search database wherein the data is managed by you through the use of simple APIs which perform basic CRUD operations that can be performed on database applications: Create (Add Records), Update (Update Records), and Delete(Delete Records).
The plugin will facilitate you in various ways:
- Include the Nearby Search method with or without an interactive Map component.
- Method to initiate nearby search across all categories of places.
- Compatible with our other MAPPLS UI widgets For eg Place Search, place Picker and Directions etc.
We're helping any website or app developer to easily integrate this information, for the benefit of your users and visitors.
Classes used for nearby Finder search is MapplsNearbyRecordFinderManager. Create a MapplsNearbyRecordFinderManager object using your rest key or alternatively, you can place your rest key in the MapplsRestKey key of your application's Info.plist file, then use the shared instance of MapplsNearbyRecordFinderManager class.
To perform nearby Finder search use MapplsNearbyFinderOptions class to pass recordType and a reference location as parameters to get Nearby finder search results with an option to pass region in parameter withRegion, which is an enum of type MapplsRegionType. If no value is passed for region, It will take default value which is India.
MapplsRegionType is used to validate and get result for different countries. Currently five countries are supported including India which are Sri Lanka, India, Bhutan, Bangladesh, Nepal.
MapplsAPICore and MapplsAPIKit are dependencies which will require to use this SDK.
| Version | Last Updated | Release Note |
|---|---|---|
| 3.0.0 | 24 Feb 2026 | Added support for auth-2 Intergrated Along The Route api in NRF. |
This library is available through Swift Package Manager.
https://github.com/mappls-api/mappls-nearby-finder-ios-distribution.gitIt is required to set MAPPLS's keys to use any MAPPL's SDK. Please see here to achieve this.
Method can be implemented in simple way.
Create a MapplsNearbyRecordFinderManager object using your rest key or alternatively, you can place your rest key in the MapplsRestKey key of your application's Info.plist file, then use the shared instance of MapplsNearbyRecordFinderManager` class.
let locations = CLLocation(latitude: 28.00, longitude: 77.98)
let nearbyFinderSearchOptions = MapplsNearbyFinderOptions(recordType: "", refLocation: locations)
let nearbyFinderSearchManager = MapplsNearbyRecordFinderManager.shared
nearbyFinderSearchManager.getSearchResults(nearbyFinderSearchOptions) { (response, error) in
if let error = error {
print("Error")
} else if let response = response, let records = response.records {
print("Resonse: \(records)")
} else {
self.showAlertController(message: "No Results")
}
}recordType (String): The category or class of the record, referenced by a defined set of category codes from client.location (double, double): Provides the location around which the search will be performed. e.g. location(28.454,77.435)
The refLocation parameter can also accept mapplsPin as reference location.
Example: location("1T182A")
-
radius (Integer): The radius in meters for radial search. Default radius: 10000 meters. -
bounds (String)(x1,y1;x2,y2): Allows the developer to send in map bounds to provide a nearby search of the geobounds. where x1,y1 are the lat lng of the bound. The bounds are set from topLeft to bottomRight (North-West to South-East). Example :28.639256,77.211133;28.625214,77.237483. -
sortBy (String): Provides configured sorting operations for the client on cloud. Below are the available sorts: - dist:asc & dist:desc - will sort data in order of distance from the passed location (default). - name:asc & name:desc - will sort the data on alphabetically bases.if let nearbyFinderSortBy = UserDefaultsManager.nearbyFinderSortBy { let sortByType = MMISearchByType(nearbyFinderSortBy) if sortByType == .importance { nearbyFinderSearchOptions.sortBy = RecordFinderSortby(sortBy: .importance) } else { if let nearbyFinderOrderBy = UserDefaultsManager.nearbyFinderOrderBy { nearbyFinderSearchOptions.sortBy = RecordFinderSortByDistanceWithOrder(orderBy: MMISortByOrderType(rawValue: nearbyFinderOrderBy)) } } }
-
filter (String): This field accepts mapplsPin and restricts the search to the provided administrative area mapplsPin. Example : filter("cop:TAVI5S").if let nearbyFinderFilterMapplsPin = UserDefaultsManager.nearbyFinderFilterMapplsPin { nearbyFinderSearchOptions.filters = [MapplsNearbyRecordFinderKeyValueFilter(filterKey: "cop", filterValues: [nearbyFinderFilterMapplsPin])] }
-
createdTime (Int): This is an epoch value in seconds. All records whose creation time is 'greater than' the provided input time here are responded back in results. Example: createdTime(1628855941) -
modifiedTime (Int): This is an epoch value in seconds.All records whose modified time is 'greater than' the provided input time here are responded back in results. Example: modifiedTime(1628855941) -
itemCount (Int): Number of items per page. Minimum is 1; Default is 10.
You will find below useful properties in suggestion object :
latitude: Latitude of the location.longitude: Longitude of the location.distance: Provides the distance from the provided location bias in meters.recordMapplsPin: Place Id of the location 6-char alphanumeric.customNote: Any string Type.createdOn:: This is an epoch value in seconds. All records whose creation time is 'greater than' the provided input time here are responded back in results. Example:createdTime=1628855941.modifiedOn:This is an epoch value in seconds. All records whose creation time is 'greater than' the provided input time here are responded back in results. Example:modifiedTime=1628855941isExpired:false. If set true while adding the record in addRecord api, that particular record will not be searchable.recordType (String):Type of category used while adding the record.orderIndex(Int): The order where this result should be placed.extendedInfo: The value added in key:value pairs while adding the records will be returned in this parameter.
let alongTheRouteOption = MapplsNearbyFinderAlongTheRouteOptions(path: routeGeometry, recordType: "WFHORWFO")
alongTheRouteOption.geometryType = .polyline6
let _ = MapplsNearbyFinderAlongTheRouteManager.shared.getAlongTheRoute(alongTheRouteOption) { (response, error) in
if let error = error {
// Error to be handled.
} else if response == nil {
// error
} else if let response = response {
// Your Logic ...
}
}path(String): This parameter takes the encoded route along which records have to be searched.recordType(String): The category or class of the record, referenced by a defined set of category codes from client.
sort(Bool): Gets the sorted records along route.geometryType(GemoetryType): Type of geometry encoding. Below are the available geometries:- GemoetryType.polyline5
- GemoetryType.polyline6 (Default)
- GemoetryType.base64
page(Int): Used for pagination. By default, a request returns maximum 10 results and to get the next 10 or so on pass the page value accordingly. Default is 1.buffer(Int): Buffer of the road. Minimum value is 25, maximum is 1000 and default is 25.
responseCode(Int)pageInfo(MapplsNearbyFinderAlongTheRouteResponsePageInfo)suggestedPOIs([MapplsNearbyFinderAlongTheRouteResponseData])
distance(Int)customNote(String)createdOn(Int)recordType(String)modifiedOn(String)latitude(Double)longitude(Double)address(String)recordId(String)orderIndex(Int)extendedInfo([String: String])
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!


















