Archive | Geo Location RSS feed for this section

A mash-up using the Geo-Location API, Google maps V3 and PHP – Part 2

16 Jun

Hey friends, we’re back to the mash-up tutorial. I had divided the tutorial in two parts, which were:

  • Plot user’s location using the Geo-location API, google maps and PHP
  • Update the map based on the users choice

I explained the first part in the previous blog, you can check it out here. This is the second part. In this I’ll explain how to plot the points from a list provided along, which will update the map accordingly. The first question is how to get the points? We are not using the addresses for plotting, but we’re using the co-ordinates.There are many ways to get the co-ordinates. What we’re doing is, we’re storing the locations we want to show on google maps in a database table. Then we’ll loop through them and fetch corresponding co-ordinates using a very simple PHP script, and store these co-ordinates in the same table. Continue reading

Advertisements

A mash-up using the Geo-Location API, Google maps V3 and PHP – Part 1

26 Mar

      Wouldn’t it be awesome if your map-apps showed the user’s exact location without taking any input from him? Of course it is possible using  the famous IP address trick… but it is too approximate, and sometimes everything but correct! You might be sitting on one end of the city and the IP address trace would tell you’re on the other end! But now getting the users exact location is possible using the Geo location API. It returns various pieces of information about the person’s physical location such as the geographical co-ordinates i.e. Latitudes and Longitudes, Altitudes, Heading etc. The returned information can then be used for a number of purposes. But, right now it only works on Mozilla Firefox 3.5+.  Read more about the Geo-Location API here : Geo Location API reference and a few cool tips and tricks here. We divide the mash-up in two parts,

  • Plot user’s location using the Geo-location API, google maps and PHP,
  • Update the map based on the users choice.

Continue reading