0
仕様にマッピング初期化されていません: のビルドのPhoneGapアプリケーションは、Googleが
上記のコードは、デスクトップアプリで正常に動作している
- PhoneGapのデスクトップアプリケーションv0.4.3を、そしてconfig.xmlはPhoneGap Desktop Appによって作成されます。 そして、私がbuild.phonegap.comで試したところ、Googleマップは初期化に失敗しました。したがって、アンドロイドには何も表示されず、白い画面になります。
var map, directionsService, directionsDisplay; function initMap() { directionsService = new google.maps.DirectionsService; directionsDisplay = new google.maps.DirectionsRenderer; map = new google.maps.Map(document.getElementById('gMap'), { zoom: 10, center: { lat: 25.0115052, lng: 66.7845126 }, mapTypeId: 'roadmap', }); directionsDisplay.setMap(map); } // initMap() ends
のconfig.xml:
<?xml version='1.0' encoding='utf-8'?> <widget id="com.phonegap.helloworld" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"> <name>TestApp</name> <description> A blank PhoneGap app. </description> <author email="[email protected]" href="http://phonegap.com"> PhoneGap Team </author> <content src="index.html" /> <access origin="*" /> </widget>
正確なエラーはありますか? – henrisycip
@henrisycip私は問題をリメイクしなければならないと思います(Googleマップを変更せずに表示する単純なアプリ)。私はその後、上記のクエリを編集します。 –