Google maps display location or area according to their Geo coordinates (Latitude and Longitude). There are several method to get coordinates of location. In this post i will explain you how to create a simple application to get coordinates of location using google map.

Find Latitude and Longitude

This is a simple app use google map to find latitude and longitude of area. You need to drag pin to place you want to get position.

Code

To find location coordinates we are using google map and write some javascript function to calculate location.

In above function we load google map and make pin draggable through which can move and place pin anywhere over map and get coordinates.

In above function we perform some mathematical operation to get accurate coordinates and display latitude and longitude result inside text fields.

This function is used to display a popup when you click over pin popup is appear to display you latitude and longitude.

This function help clear input fields value which are used to display latitude and longitude position.

Thankyou.