javascript - jQuery location picker API location name field is not working -


i'm using jquery location picker api map view. in api working fine except when give input location name doesn't work. , autocomplete option not working , map not show location.

location: <input type="text" id="location" style="width: 200px"/> lat <input type="text" id="lat" style="width: 200px"/> long: <input type="text" id="lng" style="width: 200px"/> <div id="us2" style="width: 500px; height: 400px;"></div>     <script>$('#us2').locationpicker({ location: {latitude: 46.15242437752303, longitude: 2.7470703125},    radius: 0, inputbinding: {     latitudeinput: $('#lat'),     longitudeinput: $('#lng'),     locationnameinput: $('#location') },  enableautocomplete: true,  onchanged: function(currentlocation, radius, ismarkerdropped) {   alert("");  }  });   </script>  

i had same problem. turns out need enable "google places api web service" in google developer console if using google maps api api key. after did this, autocomplete worked.


Comments

Popular posts from this blog

github - Git errors while pushing -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -