Coevolving Innovations

… in Business Organizations and Information Technologies


Extracting the longitude and latitude from a Google Map

Posted on May 18, 2007 by daviding

I like Google Maps, because they provide a lot of context around the location that I’m searching. With the amount of travel that I do, it’s always nice to know what’s near the hotel — particularly restaurants, hotels, and shopping.

I’m setting up a new CiviCRM web site, and it has the feature of asking about the longitude and latitude of locations (e.g. home address) when filling in the user profile. It’s easy enough to find the place using Google Maps, but decoding the URL is pretty tricky.

In an entry on Google Maps Help Group, someone asking that exact question got a response:

When I do a search, I’d like to get the latitude and longitude results for the location I’m searching. How do I do this?

Copy this line into the address bar of your browser

  • javascript:void(prompt(”,gApplication.getMap().getCenter()));

It displays the latitude and longitude of the centre point of the map.

Location-based services is thought to be one of the next big things. Knowing where you want to go works out a lot better if you know where you are, though.

1 to “Extracting the longitude and latitude from a Google Map”

  1. Donald Lobo says:

    Note that CiviCRM has a feature that will query google or yahoo and get the lat/long given an address. To enable this make sure you have entered you mapping provider and api key in global settings



Leave a Reply

 



↑ Top