html5 - add geolocation to jquery location picker -


i'm trying put html5 geolocation in script attached no luck. find users location when page loads.

any appreciated

thanks

        location : <input type="text"  id="us3-address" />      raius : <input type="text" id="us3-radius" />      <div id="us3" style="width: 550px; height: 400px;"></div>          lat:  <input type="text"  id="us3-lat" />         long:  <input type="text"  id="us3-lon" />       <script>         $('#us3').locationpicker({             location: {                 latitude: 46.15242437752303,                 longitude: 2.7470703125             },             radius: 300,             inputbinding: {                 latitudeinput: $('#us3-lat'),                 longitudeinput: $('#us3-lon'),                 radiusinput: $('#us3-radius'),                 locationnameinput: $('#us3-address')             },             enableautocomplete: true,             onchanged: function (currentlocation, radius, ismarkerdropped) {                 // uncomment line below show alert on each location changed event                 //alert("location changed. new location (" + currentlocation.latitude + ", " + currentlocation.longitude + ")");             }         });     </script> 

http://logicify.github.io/jquery-locationpicker-plugin/#examples


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -