The Google Maps API

Now that we can find out the logitude and latitude of  a persons mobile number (see this post) the next step is to get the Google API set up.   This post talks you through setting up the Maps API (its very simple)

 1 .. First of all you need to register for a google maps api account. You can do that here

2 ..  Make sure that you specify a the folder that you file will actually be sitting in. (it wont work otherwise)

3 ..  You then simply need to create a file in the folder specifed and then add the below code.

4 .. Note that you will need to change the “YOURKEY” value to your key.


 <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
<html xmlns=”“>
    <script src=”

  <body onload=”load()” onunload=”GUnload()”>
  <script type=”text/javascript”>   
  function load()
   if (GBrowserIsCompatible())
    var map = new GMap2(document.getElementById(“map”));       
    var map = new GMap2(document.getElementById(“map”));
    map.setCenter(new GLatLng(51.5052680969, -0.102480553091), 13);
    document.createTextNode(“Simon is here “));
      <span class=”style1″>BT SDK Location Service </span></p>
    <div id=”map” style=”width: 500px; height: 300px”></div>


On the above application the script is current hard coded to show my current location (51.5052680969, -0.102480553091).  Over the coming posts I will discuss how to integrate this fuctionality into the the BT SDK location example


One thought on “The Google Maps API

Comments are closed.