Forum Academy Marketplace Showcase Pricing Features

OpenWeather based on extracted current location


I am looking to extract a user’s current postcode then use that on Open Weather to find out about the current weather there. Can someone give me a bit of guidance on this? I have already found how I can find a user’s current location but I am not sure where I should put that (in what element?) so then I can then use it with OpenWeather.

Thanks in advance!

You would use a search field and set it for geographic location.

See this demo:, Even thought it says enter a full address, it will accept just a postcode.

You can get the editor for seeing behind the scenes at this link:

Dave thanks for the reply!
I thought perhaps there is a way where the user doesn’t have to enter his/her info manually, but the app knows his/her location, the postcode anyway.
Is this possible?
I have seen an option saying ‘current location’ postcode

Yes, you can pull the current location. it won’t necessary be the postcode, but a lat/long or place name etc. most weather services should handle anything you throw at them.

Of course, if the user has blocked location services then it won’t work, or may prompt them to allow the services.

1 Like

I have just edited the demo to set the default to current geographic location.

This topic was automatically closed after 70 days. New replies are no longer allowed.