Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Google maps v2: problem with authorisation (tiles leaves black)

$
0
0

Hi, goal: displaying of maps on android device in debug mode. Following the description in api documentation I have first retrieved SHA-key with:

keytool -list -v -keystore '/Library/Application Support/Titanium/mobilesdk/osx/3.1.1.GA/android/dev_keystore'
Answer:
Certificate fingerprints:
     MD5:  66:5E:D1:7F:C4:2C:B9:73:AD:7F:4D:DD:29:12:56:56
     SHA1: CC:E3:7F:08:FA:03:9C:88:07:BC:CB:AB:7B:88:61:F4:75:9D:47:9F
     Signature algorithm name: MD5withRSA
     Version: 1
The creation date is May 23, 2009 (Nolan's Gang)

The appid name is 'de.appwerft.xenocanto'.

Now I have opened api console and putted in section Key for Android apps (with certificates):

CC:E3:7F:08:FA:03:9C:88:07:BC:CB:AB:7B:88:61:F4:75:9D:47:9F;de.appwerft.xenocanto
This produced an API key:
AIzaSyA4nA*******UAZ7YixixpXJeZq8
This is my entry in tiapp.xml:
<android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest>
            <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="de.appwerft.xenocanto.permission.MAPS_RECEIVE"/>
            <permission android:name="de.appwerft.xenocanto.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
            <application>
                <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA4nAIOO******-AUAZ7YixixpXJeZq8"/>
            </application>
        </manifest>
</android>
I have tested with a couple of Titanium SDK versions and a couple of Android SDK versions. In all cases I see only an empty map.

Here the code of modul:

exports.create = function() {
    var self = Ti.UI.createWindow();
    var MapModule = require('ti.map');
    switch (MapModule.isGooglePlayServicesAvailable()) {
        case MapModule.SUCCESS:
            Ti.API.info('Google Play services is installed.');
    }
    var gmap = MapModule.createView({
        userLocation : true,
        mapType : MapModule.TERRAIN_TYPE,
        region : {
            latitude : 53.53,
            longitude : 10,
            latitudeDelta : 0.1,
            longitudeDelta : 0.1
        }
    });
    self.add(gmap);
    return self;
}
Any ideas?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>