1
私はアンドロイドアプリのために 'jquery-ui-map'を使用しています。私のエミュレータはGoogle APIレベル13バージョン3.2です。私のJavascriptコードは:Androidエミュレータ - ジオロケーションを取得する方法
$('#gps_map').live("pageshow", function() {
$('#map_canvas_2').gmap('refresh');
$('#map_canvas_2').gmap('getCurrentPosition', function(position, status) {
if (status === 'OK') {
var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude)
$('#map_canvas_2').gmap('get', 'map').panTo(latlng);
$('#map_canvas_2').gmap('search', { 'location': latlng }, function(results, status) {
if (status === 'OK') {
$('#from').val(results[0].formatted_address);
}
});
} else {
alert('Unable to get current position');
}
});});
このコードは常に場所を取得できません。エミュレータでGPSアイコンが表示されません。私は可能なすべての権限を設定しようとしましたが、geo fixメソッドでlatlong座標を設定しようとしましたが、何も動作しません。地理的な場所がアンドロイドで動作する方法はありますか?
OK「jquery-ui-map」を忘れてしまいます。エミュレータでGPSの位置を正しく扱うことができますか? – Ved