Documentation
Getting started
Maps API aims to make you have the much cheaper option than google maps API with a slightly different in performance. This API is in staging in environment, if you want to use our production url, please contact us.
V1 Reverse Geocode
This endpoint search nearest location based on long lat
body
Query parameters
limitintegerOptionalExample:
Limit locations retrieved
5Responses
200
A JSON array of location
application/json
400
You have invalid request
application/json
500
Error from our server
application/json
post
/maps/revgeocodeconst raw = JSON.stringify({
"longitude": 106.8536213,
"latitude": -6.157215
});
const requestOptions = {
method: "POST",
headers: Header,
body: raw,
redirect: "follow"
};
fetch("https://api-stg.oppna.dev/v1/maps/revgeocode", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
{
"data": [
{
"geolocation_id": "67769bXBnMDE6Q2hJSkViMlplckV1QURJUjdqT29OTVlVUWFN",
"country": "Indonesia",
"province": "Kalimantan Barat",
"city": "Kapuas Hulu",
"district": null,
"subdistrict": null,
"title": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
"latitude": 0.3457623,
"longitude": 112.7152125,
"street_name": null,
"formatted_address": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
"postal_code": 78762,
"distance": 7783
},
{
"geolocation_id": "67769bXBnMDE6Q2hJSkViMlplckV1QURJUjdqT29OTVlVUWFN",
"country": "Indonesia",
"province": "Kalimantan Barat",
"city": "Kapuas Hulu",
"district": null,
"subdistrict": null,
"title": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
"latitude": 0.3457623,
"longitude": 112.7152125,
"street_name": null,
"formatted_address": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
"postal_code": 78762,
"distance": 7783
}
],
"message": "SUCCESS",
"code": "01",
"processed_time": 1.2314
}V1 Autocomplete
This endpoint search nearest location based on query text
Query parameters
qstringRequiredExample:
Query string from location
menara+tendeanlngnumberOptionalExample:
Your longitude
106.827205latnumberOptionalExample:
Your latitude
-6.168287limitintegerOptionalExample:
Limit locations retrieved
5Responses
200
A JSON array of address with cluster and subcluster
application/json
400
You have invalid request
application/json
500
Error from our server
application/json
get
/maps/autocompleteconst requestOptions = {
method: "GET",
headers: Header,
redirect: "follow"
};
fetch("https://api-stg.oppna.dev/v1/maps/autocomplete?q=menara+tendean", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
{
"data": [
{
"geolocation_id": "67769bXBnMDE6Q2hJSkViMlplckV1QURJUjdqT29OTVlVUWFN",
"title": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
"formatted_address": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762"
},
{
"geolocation_id": "67769bXBnMDE6Q2hJSkViMlplckV1QURJUjdqT29OTVlVUWFN",
"title": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762",
"formatted_address": "Kapuas Hulu, Kalimantan Barat, Indonesia, 78762"
}
],
"message": "SUCCESS",
"code": "01",
"processed_time": 1.2314
}Last updated
Was this helpful?