How to get users current Postcode from Latitude and Longitude in Reactive web?
Application Type
Reactive, Service
Service Studio Version
11.10.20 (Build 41361)

Actually, I want to accumulate the postcode of user using latitude and longitude in Reactive Web application. I am able to detect the current location in which latitude n longitude is there but additionally I need the Postcode as well. So, please guide me in this asap. 

Hello @Aditya Chinchole , you can either have a back office or a database with all the postcodes with latitude and longitude and then filter by longitude and latitude to get the postcode itself, or with javascript!!

Go to the answer on stack and you will find your solution.


Márcio C.

Hello @Marcio Carvalho . I have an aggregate with Postcode, lat and lang. Now, i have to detect the location of user and get postcode as well. So, can u plz tell me what will be the javascript for that. I have attached my javascript so that you can tell me the modifications


I have to see it clearly, but I think you need to do this.

Get the latitude and longitude and the formatted address from this location plugin and then pass it. Then you can use geocode API to get the address where you will get the postcode also. Also usually, I prefer to use what OutSystems already have, like @Camila Teixeira said, you can use the documentation on GeoCode API and the uber use case.

These forge components from OutSystems already have the javascript on their components, so you will not have to do the heavy work!!

Can you use it?


I found this article that maybe can help you: 

In this case, they are using the GeoCode API - - that based on latitude and longitude, they return an address. On of the fields returned is the postal code.

Hope that it helps!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.