I’m testing GeoComplete and Parsley validaton.
Updated version is at the following URL: https://github.com/ubilabs/geocomplete
How to set positive message if street is found?
It provides the ability of populating these coordinates after selecting the address from the list and we can use these values to validate the address via the callback validator. I need to reset the latitude, longitude values and mark the field as not validated.
Need help.
As you see it is limited to UK addresses.
Form is as usual:
name=“mystreetfield” placeholder=“Postal address” required data-parsley-trigger=“change”
<!DOCTYPE HTML>
Untitled
<script src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="../jquery.geocomplete.js"></script>
<script src="logger.js"></script>
<script>
$(function()
{
var center = new google.maps.LatLng(50.863257, -0.090621);
$(“#geocomplete”).geocomplete(
{
map: “.map_canvas”,
types:[‘establishment’],
country: ‘UK’
}
);
}
);