Recently in my project, I implemented Google Maps. I was wondering if I did it the right way. Went googling for some terms, and I came across some new nifty way to share URLs. Nonetheless, it turned out, that the http protocol GEO: doesn’t work in firefox. May be Desktop Firefox is not reading it. Mobile Firefox might be displaying it.
I would like to refer to my previous entry on the same topic. (https://salmankhwaja.wordpress.com/2013/10/29/sure_way_to_lure_customers/), where I was focused on making QR Codes for locations. Imagine when you come across a Website, where it is saying, where are we located, and then they insert their P-Mail address. Duh. Then when you actually need to be there, you end up copying / pasting that address in Google Maps, search, send that location to your mobile, and then drive there. Well, it’s about time to educate those who are developing sites for such corporations.
Even if QR codes are not your forte, one could at least provide the coordinates, so that people could view them in Google Maps / Foursquare, their application of choice. Here how to do it right.
- Goto http://maps.google.com/
- type in your desired location / name. In other words, just search for it.
- Once desired results are there, a red marker should be displayed right in front of you.
- Click on it, and it will show you the GPS Coordinate right below it.
- Click the GPS Coordinates. Now those Coordinates will be displayed in SEARCH bar.
- Copy them those GPS coordinates. The most common form of GPS coordinates is in the form of 64.19,98.92, that is, x,y, where x is Latitude, and y is Longitude.
- Now open your favoutire editor and make a hyperlink like
<a href="http://maps.google.com/maps/?q=[GPSCordinates]">Click here to see our location on Google Maps.</a>
- That’s all there is to it. So the resulting hyperlink would be. Adding a location of Badshahi Mosque (randomly this location came into my mind). <a href=”http://maps.google.com/maps/?q=31.588085,74.310071″>Visit Badshahi Mosque here.</a>.
Link added for your surfing convenience.
Alternatively, one could also use the GEO Protocol.
- Once, the Geo Coordinates are known, one could use the following link to create Geo Location.
<a href="geo:31.588085,74.310071">go here</a>
- Second method sounds quite easy, but my Desktop Firefox was not pointing to right location. Link added for surfing again (Badshahi Mosque). Google Link
First method is tried and tested, and it works every time and points to Google maps, no matter on which device the user is at, well at least, most of the devices.
For those who are thinking to have some extra reading, here are the additional links shared.
Some links to see Google maps and GPS Coordinates in action
How have you implemented Google Maps in your Project.? I would definitely like to know more in comments.