Put my location in One Map

Hello

What is the API used to retrieve the address ? on tapping a location on One Map .

Thanks

@Itsupport

If you know the postal code / building / address, you can use OneMap Search: https://docs.onemap.sg/#search. No need API Token.

If you do not know the postal code / building / address, you can use OneMap Reverse Geocode: https://docs.onemap.sg/#reverse-geocode-wgs84 (You need to know your lat and lng). Requires API Token.

Hi Kyroskoh

Thanks , but that was not my question. Would like to elaborate it.
Suppose Im browsing through One map and I click on a location on the map,what is the map interface which will provide me all the details of the location ?
( In this case I would not know the Postal code.building/address or the Latitude/Longitude)

similar to “put location on google map”

@Itsupport

We use leaflet which will give lat and lng of a marker to the user. You can refer to their documentation: https://leafletjs.com/reference-1.5.0.html#marker-getlatlng

After you have the lat and lng, you can use OneMap Reverse Geocode: https://docs.onemap.sg/#reverse-geocode-wgs84 to return the postal code / building / address

Furthermore, here’s the other related resources:

Sample: http://bl.ocks.org/vaertsen/99b3b752342e6ef888820a100d1b5891

Thanks kyroskoh for the reply