latitude-longitude
Calculating bounding box a certain distance away from a lat/long coordinate in Java
I wrote an article about finding the bounding coordinates: http://JanMatuschek.de/LatitudeLongitudeBoundingCoordinates The article explains the formulae and also provides a Java implementation. (It also shows why IronMan’s formula for the min/max longitude is inaccurate.)
Converting longitude/latitude to X/Y coordinate
The big issue with plotting maps is that the spherical surface of the Earth cannot be conveniently converted into a flat representation. There are a bunch of different projections that attempt to resolve this. Mercator is one of the simplest: it assumes that lines of equal latitude are parallel horizontals, while lines of equal longitude …
Get latitude and longitude based on location name with Google Autocomplete API
You can use the Google Geocoder service in the Google Maps API to convert from your location name to a latitude and longitude. So you need some code like: var geocoder = new google.maps.Geocoder(); var address = document.getElementById(“address”).value; geocoder.geocode( { ‘address’: address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { // do something with the …
3D coordinates on a sphere to Latitude and Longitude
I guess it should not be difficult to find the spherical polar coordinates from x,y,z (3d-coordinate system). r is always constant if it’s on surface. (90 – θ) your latitude (negative means it’s on the bottom) as it’s measured from top. φ is your longitude. (but not quite sure about longitude system) Also check this …
How to get the Google Map based on Latitude on Longitude?
Create a URI like this one: https://maps.google.com/?q=[lat],[long] For example: https://maps.google.com/?q=-37.866963,144.980615 or, if you are using the javascript API map.setCenter(new GLatLng(0,0)) This, and other helpful info comes from here: https://developers.google.com/maps/documentation/javascript/reference/?csw=1#Map
Maximum Lat and Long bounds for the world – Google Maps API LatLngBounds()
The links provided by @Marcelo & @Doc are good for understanding the derivation of the Lat Lng: http://www.cienciaviva.pt/latlong/anterior/gps.asp?accao=changelang&lang=en https://groups.google.com/forum/?hl=en&fromgroups=#!msg/google-maps-api/oJkyualxzyY/pNv1SE7qpBoJ https://en.wikipedia.org/wiki/Mercator_projection#Mathematics_of_the_Mercator_projection But if you just want an answer for the maximum bounds for Google Maps: Latitude: -85 to +85 (actually -85.05115 for some reason) Longitude: -180 to +180 Try it for yourself on the Google Maps: …
Retrieve latitude and longitude of a draggable pin via Google Maps API V3
Either of these work google.maps.event.addListener(marker, ‘click’, function (event) { document.getElementById(“latbox”).value = event.latLng.lat(); document.getElementById(“lngbox”).value = event.latLng.lng(); }); google.maps.event.addListener(marker, ‘click’, function (event) { document.getElementById(“latbox”).value = this.getPosition().lat(); document.getElementById(“lngbox”).value = this.getPosition().lng(); }); You might also consider using the dragend event also google.maps.event.addListener(marker, ‘dragend’, function (event) { document.getElementById(“latbox”).value = this.getPosition().lat(); document.getElementById(“lngbox”).value = this.getPosition().lng(); });