Open jammy525 opened 8 years ago
View code:
' <ui-gmap-google-map refresh="true" center="map.center" zoom="map.zoom" draggable="true" options="options">
<ui-gmap-search-box template="searchbox.template" parentdiv="searchbox.parentdiv" events="searchbox.events" options="searchbox.options">
</ui-gmap-search-box>
<ui-gmap-marker coords="marker.coords" options="marker.options" events="marker.events" idkey="marker.id">
</ui-gmap-marker>
</ui-gmap-google-map>`
@jammy525 I've added ISSUE_TEMPLATE.md so there explains how to report a potential bug better.
Please provide detailed info, as per the ISSUE_TEMPLATE, including jsbins/plunkr/jsfiddle in order to help you better.
Thanks.
I am using ionic modal to show map. And using searchbox outside the map.My issue is that its rendering the search input box twice and not working properly.Please someone help me. _Controller code: _
$scope.place = { name : '', address: '', "location": { "lat": '', "lng": '' } };
var events = { place_changed:function (searchBox) { var placeSerached = searchBox.getPlace(); console.log('place',placeSerached); if (!placeSerached || placeSerached == 'undefined' || placeSerached.length == 0) { console.log('no place data :('); return; } $scope.map = { center:{ latitude : $scope.place.location.lat = placeSerached.geometry.location.lat(), longitude : $scope.place.location.lng = placeSerached.geometry.location.lng() }, zoom:12 };
` $scope.marker = { id:0, options:{ draggable:true }, coords:{ latitude : $scope.place.location.lat = placeSerached.geometry.location.lat(), longitude : $scope.place.location.lng = placeSerached.geometry.location.lng() }, events: { dragend: function (marker, eventName, args) { $scope.place.location.lat = marker.getPosition().lat(); $scope.place.location.lng = marker.getPosition().lng();` thanks in advance.