I have implemented angular google map in my ionic app.and its working fine but for search places we used angular google map search box .when we search like Gurgaon india its show results but when i click on any one then map don,t moving to that location .and when i long press to result then it works.
I have implemented angular google map in my ionic app.and its working fine but for search places we used angular google map search box .when we search like Gurgaon india its show results but when i click on any one then map don,t moving to that location .and when i long press to result then it works.
can u please help me .i need to work on click.
here is my code:
html file:
controller:
angular.extend($scope, { searchbox: { template: 'searchbox.tpl.html', events: { click: function(searchbox, eventName, originalEventArgs) { console.log("searchbox",searchbox); console.log("eventName",eventName); console.log("originalEventArgs",originalEventArgs); console.log("originalEventArgs", originalEventArgs[0]); }, places_changed: function(searchbox, eventName, originalEventArgs) { console.log("searchbox1",searchbox.getPlaces()); console.log("eventName2",eventName); console.log("originalEventArgs2",originalEventArgs); showLoader(); var place = searchbox.getPlaces(); var newCenter = { latitude: place[0].geometry.location.lat(), longitude: place[0].geometry.location.lng() } $scope.marker = { coords: { latitude: place[0].geometry.location.lat(), longitude: place[0].geometry.location.lng() }, options: { draggable: true, icon: 'img/marker.png' } }