Skip to content

rollinsw/Google-Maps-Location-Picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Google-Maps-Location-Picker

Returns latitude and longitude by dropping a point on the map, moving the pointer around the map or by location search.

Description

Use Google Maps to find the latitude and longitude of any point. This is intended to be used in an application where you need to capture the latitude and longitude of a point specified by a user on the map. Latitude and longitude will be returned in one of three ways:

  • Click any point on the map to drop a map marker
  • Drag the map marker to any point on the map
  • Use the search field to find geocoded locations from Google Maps

Using the location search method will return a reverse geocoded lat/lng for that address. Placing a pin on the map will return the lat/lng for that point, which should be more accurate than the location search.

This example includes only basic css for styling the page, you will want to apply your own styles to the form elements.

Requirements

  • jQuery
  • jQuery UI - Used for the location search autocomplete
  • Google Maps API v3

Installation and Setup

Open map.html in your broswer.

Credit

Location search based on Robbie Shade's example: http://rjshade.com/2012/03/27/Google-Maps-autocomplete-with-jQuery-UI/

About

Returns latitude and longitude by dropping a point on the map, moving the pointer around the map or by location search.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published