正在开发离子应用程序,我设法从搜索输入加载json数据中的数据,所以我的问题是当我用谷歌地图搜索时链接那些地方,并在我点击后点击特定地点显示标记, 这是我在json数据中的请求
click here to see the output result image
$scope.preview = false;
$scope.searchAtms = function(){
$scope.preview = true;
console.log("Button works");
$http.get("https://atmlocate.firebaseio.com/.json").then(function (response) {
$scope.map_positions = response.data;
$scope.object_by_id = $filter('filter')($scope.map_positions.results, {Location: $scope.location });
});
};
我用tha数据得到那个输出,所以如何连接google map api,并在我触发函数search_item(item)时找到那些地方
<ion-item item-icon-right ng-repeat="item in object_by_id" ng-show="preview" >
<div class="test" >
<a class="button icon icon-right ion-location" href="location.html" ng-click="placeMarker(item)">
{{item.ATM}}
{{item.Location}}
</a>
</div>
</ion-item>
</ion-list>