Home Forums Programming General Zip code --> Distance in google maps RE: Zip code --> Distance in google maps

  • countryflora13 (8/23/2013)


    So, where do we have to put this script I mean can I put it in my website or what? please explain little more

    One thing I use it for is on store location forms. The user submits an address or zip code on a form and the parameters are passed to the procedure(s). The first procedure returns the latitude and longitude. In the case of a store locator I usually have a table of locations which has each location's lat/lon. But you can also take the lat/lon and using the Google or other mapping service have the API display the location in real time.

    So for example, the end-user enters an address. The first procedure gives you their lat/lon which you could use for comparing to a predefined list of locations. Then take the submitted address as Address1 and compare it to the address of locations within a certain number of miles to create a descending list of locations from the submitted address.

    Here's another example that plots the location of entries on the form (this is from my dev site...the live campaign was in 2011).

    Lowe's Million Tree Giveaway Earth Day 2011[/url]