【发布时间】:2015-04-13 18:08:46
【问题描述】:
使用当前用户的位置和餐厅位置(地理坐标),用户可以点击链接打开 Google 地图并获取前往所需地点的路线。但是,当我使用 Android 的后退按钮时,它无法返回应用程序,然后应用程序“卡”在谷歌地图中,无法在应用程序中浏览回来。我该如何解决这个问题? - 使用 AngularJS 和 Ionic。
这是 hTML:
<ion-list>
<ion-item ng-controller="loadingCtrl" bindonce ng-repeat= "restaurant in restaurantList | orderBy: 'distance' " href="#">
<article class="item_frame">
<div class="marker_left_container">
<img class="venue_rest_marker" ng-src="{{restaurant.icon}}">
<span class="venu_type_text">{{restaurant.venueType}}</span>
<span class="distance_from_user_rest"> {{distanceTo(restaurant)}} km</span>
<span class="distance_from_user_rest2">from current location</span>
</div>
<div class="restaurant_details_container">
<h1 class="restaurant_name_inlist">{{restaurant.Name}}</h1>
<span class="restaurant_detail_inlist2">{{restaurant.subCuisine}}<br> {{restaurant.subsubCuisine}}</span>
<span class="restaurant_address">{{restaurant.address}}, <br> </span>
<span class="restaurant_address">{{restaurant.cp}}, {{restaurant.city}} <br><br></span>
<span class="restaurant_others">{{restaurant.phoneNumber}}<br> </span>
<span class="restaurant_others">{{restaurant.website}}<br> <br></span>
<div class="get_dir_container"><a href="https://www.google.com/maps/dir//{{restaurant.lat}},{{restaurant.long}}/">
<img src="img/get_direction_v3.png" class="get_dir_icon">
<span class="get_dir_text">Get direction on Google Maps</span>
</a></div>
</div>
</article><!--main article frame 1 -->
</ion-item>
</ion-list>
【问题讨论】: