Google Maps™ Tutorial
tutorial | list | insert by Wayne lambright

How to make Google Maps™ using ASP Classic when you don't have the longitude or Latitude
by Wayne Lambright


Who is this video overview and code sample for?

Anybody looking to integrate Google Maps using classic ASP, especially if you don’t have the longitude or Latitude coordinates.

This video overview is broken into two-phases.

Phase I: will get you up and going with a simple google map.

Phase II: We will take your address and build a google map on the fly, If you don’t have the longitude or latitude, we will do a SOAP call to ServiceObjects.com get the longitude or Latitude coordinates, then update the database, so we don’t have to do the SOAP call again, then we show your map, best of all you can download working code here.

Phase I   watch video overview Turn up your sound

don't forget to turn up your sound!

Google Maps API Documentation

Only one requirement is necessary to put google maps on your site.

1. A google map api key is required to run the example on YOUR site, its free click here

You will need two api keys Example:(domain.com, www.domain.com)

www.sfsurvey.com/gmaps=ABQIAAAAr9YylxVlyCA-a457MLk5URQQTZwVtRvTPfJHsrUbxc1B_DNJTRSkfXb0toQVOzrPWdAQj5aPLz68MQ
    sfsurvey.com/gmaps=ABQIAAAAr9YylxVlyCA-a457MLk5URR9gXAfZSYn9wM_LOeF5CPzzNhIShTfxYAcfRHwOAYV9K-FgEU_ivbv7g

 

Now that you have your toe's wet, lets jump into the pool, and move to phase II


Phase II
Video overview Phase II, How the code works

don't forget to turn up your sound!

In this phase you will install the example files on your server, you will be able to take a full address without the longitude or Latitude, the code will do a SOAP ping to ServiceObjects it will grab the longitude or Latitude, then it will update the database.

Requirements

  • ASP 2.0 - 3.0
  • Internet information server "IIS" or equivalent 4 and up
  • Access 2000
  • Microsoft xml parsers Which is part of windows 2000 server
  • any text editor, such as Dreamweaver, which I used to build the data driven pages
  • you will need your own Service Objects SOAP KEY, they offer a no risk free trial

Setup

Unzip all files into a folder and upload to web server running IIS4 and above.

  • Make a DSN (data source name) not DNS (Domain Name Server) to the database "gmaps.mdb" name it {gmaps} "no curly brackets". Make sure you have the "uid=;pwd=;" or you will get a 80004005 errors the finished string will look like this "dsn=gmaps;uid=;pwd=;"
  • Make sure you have read / write permissions on the database or you will get 80004005 errors
  • Some web hosts make you change the name of the dsn, such as "dsn=YOURNAME;uid=;pwd=;", you will have to change it in your "Connections" folder.

     

     One easy solution to the api domain key challenge.

    <%
    str_google_api_key = Request.ServerVariables("HTTP_HOST")
    %>

    <% IF left(str_google_api_key,16)="www.sfsurvey.com" then %>
    ABQIAAAAr9YylxVlyCA-a457MLk5URQQTZwVtRvTPfJHsrUbxc1B_DNJTRSkfXb0toQVOzrPWdAQj5aPLz68MQ
    <% End If %>

    < % IF left(str_google_api_key,12)="sfsurvey.com" then %>
    ABQIAAAAr9YylxVlyCA-a457MLk5URR9gXAfZSYn9wM_LOeF5CPzzNhIShTfxYAcfRHwOAYV9K-FgEU_ivbv7g
    < % End If %>

    Special thanks to Service Objects

    ServiceObjects, Inc.
    133 East de la Guerra Street
    Santa Barbara, CA 93101

     

     

    I hope you enjoyed this video overview.

    Best Regards

    Wayne Lambright
    founder, sfSurvey.com
    415-750-1921
    wayne@sfsurvey.com


    links to us