Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to get the name of the country, which is located in the middle of the current application written using the functions of Google Earth API - in javascript - and get the longitude and latitude ,
Posted
Comments
Pete O'Hanlon 9-May-12 3:53am    
In the middle of the what? Do you mean the middle of the screen? Where the mouse pointer is?

1 solution

a simple method 'in browser' is just to center the map at the point you want then paste the following javascript into the address bar:
JavaScript
javascript:void(prompt('',gApplication.getMap().getCenter())); 

All information on Google Maps API (Latitude/Longitude section)can be found here:

https://developers.google.com/maps/documentation/javascript/tutorial#LatLng[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900