Skip to content

Latest commit

 

History

History
100 lines (69 loc) · 5.15 KB

Geolocation.md

File metadata and controls

100 lines (69 loc) · 5.15 KB

Mappls Geolocation API

The Geolocation API returns a location on the basis of cell tower information that any mobile client can detect.
Any mobile user will send the information of all the connected or recently connected cell towers information in the API, Now API will articulate approximate user location on the basis of the provided cell towers information. MMI will use its cell towers geo-location database to calculate the approximate geo-location of the user.

Java
MapplsGeolocation mapplsGeolocation = MapplsGeolocation.builder()  
        .addCellTower(cellId, lac, mcc, mnc)  
        .build();  
        //To call In Foreground Thread
MapplsGeolocationManager.newInstance(mapplsGeolocation).call(new OnResponseCallback<GeolocationResponse>() {  
    @Override  
  public void onSuccess(GeolocationResponse geolocationResponse) {  
          
    }  
  
    @Override  
  public void onError(int i, String s) {  
  
    }  
});
  			        //OR
                //To call in Background Thread
ApiResponse<GeolocationResponse> geolocationResponse = MapplsGeolocationManager.newInstance(mapplsGeolocation).executeCall(); 

Request Parameter

  1. addCellTower(Integer, Integer, Integer, Integer): The following are the parameters are required in Cell Tower:
    • Cell Id: Unique identifier of the cell. Required for radioType gsm (default), cdma, wcdma and lte.
    • Location Area Code: The Location Area Code (LAC) for GSM and WCDMA networks.
    • Mobile Country Code: The cell tower's Mobile Country Code (MCC).
      Valid range: 0–999.
    • Mobile Network Code: The cell tower's Mobile Network Code. This is the MNC for GSM, WCDMA, LTE and NR.
      Valid range for MNC: 0-999 and for SID: 0-32767

Response Code (as HTTP response code)

Success:

  1. 200: To denote a successful API call.
  2. 204: To denote the API was a success but no results were found.

Client side issues:

  1. 400: Bad Request, User made an error while creating a valid request.
  2. 401: Unauthorized, Developer’s key is not allowed to send a request with restricted parameters.
  3. 403: Forbidden, Developer’s key has hit its daily/hourly limit.

Server-Side Issues:

  1. 500: Internal Server Error, the request caused an error in our systems.
  2. 503: Service Unavailable, during our maintenance break or server downtimes.

Response Messages (as HTTP response message)

  1. 200: Success.
  2. 204: No matches were found for the provided query.
  3. 400: Something’s just not right with the request.
  4. 401: Access Denied.
  5. 403: Services for this key has been suspended due to daily/hourly transactions limit.
  6. 500: Something went wrong.
  7. 503: Maintenance Break.

Response Parameter

GeolocationResponse Result parameter
  1. location(Geolocation): The estimated geolocation i.e. latitude and longitude, in degrees.
Geolocation Result parameter
  1. latitude(Double): latitude of the estimated location.
  2. longitude(Double): longitude of the estimated location.




For any queries and support, please contact:


Email us at apisupport@mappls.com


Support
Need support? contact us!






@ Copyright 2024 CE Info Systems Ltd. All Rights Reserved.