Leaflet Location Picker

Simple Example:


$('.geolocs').leafletLocationPicker();
Change default geographic location:
Custom location format:

$('#geoloc2').leafletLocationPicker({
	locationFormat: '{lat}@{lng}#WGS84',
	position: 'bottomleft'
});
Custom callback:


Value from callback:

$('#geoloc4').leafletLocationPicker(function(e) {
	$(this).siblings('em').text(e.location);
});
Events:




string location
$('#geoloc3').leafletLocationPicker({
	locationSep: ' - '
})
.on('show', function(e) {
	$(this).siblings('em').text('click on map for insert the location');
})
.on('hide', function(e) {
	$(this).siblings('em').text('');
})
.on('changeLocation', function(e) {
	$(this)
	.siblings('#geolat').val( e.latlng.lat )
	.siblings('#geolng').val( e.latlng.lng )
	.siblings('i').text('"'+e.location+'"');
});
Fixed container and always open map:
	$('#geoloc5').leafletLocationPicker({
			alwaysOpen: true,
			mapContainer: "#fixedMapCont"
	});
Opengeo.tech