Or how to find Google Maps API GLatLng (longitude and latitude) parameters for anywhere in Europe easily. If you want an easy way to find co-ordinates manually – here it is.
I use Michelin which is a superb route finding service as anyone who has used it to drive around in Europe will know, and their website covers most of Europe so there shouldn’t be many places we can’t find using it. I have used it for finding longitudes and latitudes in France, Spain, the UK and Italy for example.
Google Maps has an API interface, and you can call GLatLng with the appropriate parameters to map any chosen location like this :
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
The example above gives the longitude and latitude for a location in California – it is the example on the Google API help pages.
An Example – Find the GLatLng coordinates for a town in France
OK – so say you want to find an accurate longitude and latitude for the ski resort town of Avoriaz. The french postcode for Avoriaz is 74110. This is how I do it.
- Go to viamichelin
- Click on the maps link on the horizontal menu near the top of the page
- In the box on the left hand side, select the country of France
- Type 74110 Avoriaz into the postcode, city, area field
- Click on the yellow search button and you get a detailed map of the area, with Avoriaz in the centre,
marked with a symbol suggesting this is the exact point we were searching for.
- There is also a white bubble that appears on the map containing more options
- In this bubble, click on the link that says send this address to GPS.
- When the send to GPS pop up appears, provide a file name (with no spaces) then click on Send.
- When prompted, open the file with notepad
- You will have a file (in this case) called avoriaz.xvm
- The file contains a string with the precise longitude and latitude values, in this case : longitude=”6.78365″ latitude=”46.19011″
- Et voila!