Open website by zipcode

I am currently developing multiple websites.
I want to create one landing page to enter customer’s zip code and according to the entered zip code opens closest location’s website or something like that.
Please advise me!

Hi,

You can probably craft something like this using the Google Maps API

Or you can either do something like this:

function decide() {
    if(Number($w("#zipEntered").value) >= 1000 && Number($w("#zipEntered").value) <= 1999) {
     wixLocation.to(`https://website.com`)
    } else if(Number($w("#zipEntered").value) >= 2000 && Number($w("#zipEntered").value) <= 2999) {            
     wixLocation.to(`https://newsite.com`)     
    }