Hello,
Titanium Studio, build: 3.4.1
Titanium SDK: 3.5.0
ti.map : 2.2.2
I am trying to implement map in my app with above mentioned things. I've followed the steps mentioned here Google_Maps_v2 & generated the api key. Added the following code in tiapp.xml
<manifest> <application android:theme="@style/Theme.AppCompat.Light.DarkActionBar"/> <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <uses-permission android:name="<my.app.id>.permission.MAPS_RECEIVE"/> <permission android:name="<my.app.id>.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <application> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="<API_KEY>"/> </application> </manifest>I've a button click on index.js when opens secondwin.js & loads the map this works perfectly fine. But when I close secondwin.js or hit a back button the app crashes. I've attached my code below.
index.js
function doadd(evt){ Alloy.createController('secondwin').getView().open(); }
secondwin.js
var Map = require('ti.map'); var mapview = Map.createView({mapType:Map.NORMAL_TYPE}); $.secondwin.add(mapview);
Please help me with the map
Thanks,