Jul 08

A very light, simple and easy to use address picker using Google Maps API v3 and jQuery, you may use this widget to embd in you web forms if you want user to input address or/and latitude/longtitude.

Map Address Picker

Live Demo

Download

Code sample:

<script type="text/javascript"
    src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="map.js"></script>

<input type="reset" id="pick_addr" value="Pick Address" />

<script type="text/javascript">
<!--
$(document).ready(function(){
	function callback(pos, addr, addr_ext){
		alert(pos, addr, addr_ext);
	}

	var default_pos = new google.maps.LatLng(39.904214, 116.407413);
	var opt = {
		pos: default_pos,
		callback: callback
	};
	var addr_picker = new AddressPicker(opt);

	$('#pick_addr').click(function(){
		addr_picker.open();
	});
});
//-->
</script>

Written by ideawu at 2011-07-08 16:27:21 | Views: 1846 | tags: , ,

6 Responses to “Address Picker Using Google Maps API v3”

  1. 1. jawwad Says:

    hi
    plz email me a code of google location picker i am waiting your response

  2. 2. ideawu Says:

    to jawwad: just download from this link: http://www.ideawu.com/prj/address-picker/map.js

  3. 3. jawwad Says:

    thanks ,yes i download it. i want to show lat long in a text field not in alert and save button on google map, not in mark

  4. 4. ideawu Says:

    Hi, jawwad, I don’t quite follow you question. The demo shows how to display lat long in a callback function which set as part of the options when you new a AddressPicker.

  5. 5. jawwad Says:

    can help for get latlon ? in text field

  6. 6. Allen Lowder Says:

    Useful tips. Thanks for this blog. I can use this as tool for my ***job***

    .

Pages:

Leave a Reply

JavaScript needed to post comment!

Linode VPS