Google-maps feature

7-6-2008  18:09 by Peter

In my post about the sites I created with umbraco. On 1 site (www.hizihair.nl) I'm using google-maps to show locations of shops.
There's also another feature: Visitors can put in their postal-code. A script then uses google-maps to lookup the shops that are within a certain distance (a variable the editor can fill in). Try yourself, goto the site, fill in 2132DK in the fill-in top-right and press enter. You'll then get to see the shops within a certain distance from that postal-code, the closest one is top-most one.

Just thought to share, if you want to konw more, drop me a line.



5 comment(s) for “Google-maps feature”

  1. Josh Reid Says:
    Hey Peter!
    I would love to see some source or a package of this, I am aiming to implement something similar and could contribute to some degree and share back?
    Cheers!!!
    Josh
  2. bob baty-barr aka bootnumlock Says:
    really interested in your map solution with umbraco... sounds very cool.
  3. F Says:
    Great stuff, do you have any code to share? or maybe better, a package?
  4. PeterD Says:
    Glad you asked! Why? Well, I went to lookup the source and got a bit scared after 10 minutes......my source was gone!
    Then I realised, I must have written this right before I started using my new laptop. Luckily I found the code in my backup-folder again :-)
    Back to topic: What I do: each shop has his latitude and longitude stored in umbraco. When someone enters a postal-code, I use google-API to lookup the lat-long for that also. Then I use a sort of method you mentioned to calculate the distance.
    Maybe later I'll post a sample-code. Right now back to soccer again :-)
  5. Martijn Maris Says:
    Codegarden08 has inspired you to start blogging again? Great to read this post. I'm also coding something like your google maps app. Are you using the API to measure distances between the postal code and nearby shops? Or do you use something like the formula at http://www.zipcodeworld.com/samples/distance.cs.html?