Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

afoysal's avatar

Select an area based on PostCode of UK

How can I select an area based on PostCode of UK like below image ?

https://i.stack.imgur.com/IloC2.jpg

0 likes
16 replies
Snapey's avatar

The answer is going to depend on whose maps you are using and what API

1 like
afoysal's avatar

@Snapey Thanks. I am trying to use on Google Map. I am not using any API. Thanks.

martinbean's avatar

@afoysal Select an area to do what with? Either way, you’re going to need to know the polygon of each postcode.

1 like
afoysal's avatar

@martinbean Thanks. Actually I don't know how to do this whole project. I need a whole solution. Thanks.

martinbean's avatar

@afoysal Well what are you actually trying to do? Why do you need the outlines of UK postcodes?

1 like
afoysal's avatar

@martinbean Thanks. I would like to find an area based on PostCode of UK. That's why I need outlines of UK. Thanks.

martinbean's avatar

@afoysal You just keep repeating the same thing.

Why do you need to select/highlight postcodes? What feature or problem are you trying to solve? You obviously have some reason for wanting a user to select a postcode area.

1 like
afoysal's avatar

@martinbean Thanks. I would like to select delivery zone of a Restaurant using PostCode. Thanks.

afoysal's avatar

@Snapey Thanks. I am looking for something similar to your example. But I would like to find the area using PostCode.

How can I implement your example in Web Page ?

kokoshneta's avatar

@afoysal Implementing an API like that into a full-blown website is hundreds or thousands of lines of code. You need to do that yourself or pay someone to do it for you. Nobody here is going to make your project for you.

1 like
afoysal's avatar

@kokoshneta Thanks. I know all those. But Could you please share similar tutorial from where I can get an idea ?

Please or to participate in this conversation.