Jump to content

Google Map from database info


ldg1976

Recommended Posts

Hi - I have an ASP page that displays a post code taken from my database. I would like it if the user could click on the post code and a new page open with Google Maps with the location from the code. I have searched for the solution, but no luck. :) Does anyone know if this can be done and if so, how?Cheers

Link to comment
Share on other sites

This is what a link to a Google map looks like:

http://maps.google.com/maps?f=q&hl=en&geocode=&q=5621+w+beverly+lane,+glendale+az&ie=UTF8&t=h&z=17&iwloc=addr

The q variable has the address in it. If you have an address in your database then you can substitute it there, set the zoom level or map type or whatever you want. If you have a latitude and longitude you can also use that, the variable for that is called sll instead of q. Do some searches on Google maps and click on the Link To This Page button to see what the URL looks like. There are some parts of the URL you can remove and still have it work, you can probably get rid of the hl, geocode, and ie variables, and maybe some of the others. Just experiment with it and see how it works.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...