How to get coordinates using javascript Google Maps JavaScript API v3 of the center of the currently viewed area on google maps? Thanks
Enter Coordinates on Android Open Google Maps, enter the coordinates into the Search box at the top, and hit the Search key on the keyboard. You'll see a pin appear on the map for the spot. Swipe up from the bottom to get directions or view details for the location.
You can call:
map.getCenter();
to return a LatLng object.
Updated 2018 The below codes are for Google Maps API for Android. In case anyone needs this Script:
double mylat = mGoogleMap.getCameraPosition().target.latitude; double mylon = mGoogleMap.getCameraPosition().target.longitude;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With