1

Google マップ JavaScript API v3、phonegap 2.6.0、Jquery mobile 1.2.0 を使用して 1 つのアプリケーションを作成しました。このアプリケーションでは、Google 方向サービスを使用して、病院のリストと、ユーザーの現在の場所と病院の間の希望の距離と所要時間を表示します (距離マトリックス サービスも使用してみてください)。このアプリケーションは、2.2 および Gingerbird (samsung 2.3.6) で正常に動作します。しかし、このアプリケーションを Android のアイス クリーム サンドウィッチ & ジェリー ビーン (Nexus 7、Micromax 4.1、Lg Optimus 4.0、HTC Desire 4.0.3) で実行しようとすると、動作しません。アプリケーションをデバッグすると、Google 方向サービス オブジェクトがポップアップする前にアラート ステートメントが表示されますが、Google 方向サービス アラートがポップアップしません。だから私の質問は、ジェリービーンとサンドウィッチのバージョンで、Googleの方向サービスまたは距離マトリックスサービスが機能しているかどうかです。

私のアプリケーションがより高いバージョンで動作するように、適切なガイドラインを教えてください。

ここに私のコードがあります..

alert('start route'); <----pop up
var directionsService = new google.maps.DirectionsService();
var request = {
    origin : new google.maps.LatLng(cLat, cLng),
    destination : new google.maps.LatLng(destination_lat, destination_long),
    travelMode : google.maps.DirectionsTravelMode.DRIVING
};
alert('end route'); <----Not pop up

また

alert('start route');<----pop up
var Service = new google.maps.DistanceMatrixService();
var request = {
    origin : new google.maps.LatLng(cLat, cLng),
    destination : new google.maps.LatLng(destination_lat, destination_long),
    travelMode : google.maps.DirectionsTravelMode.DRIVING
};`enter code here`
alert('end route');<----Not pop up

よろしく、 アマール・パテル

4

0 に答える 0