在我的谷歌地图V2为Android钛模块空白地图 [英] blank map on my google maps v2 for android titanium module

查看:201
本文介绍了在我的谷歌地图V2为Android钛模块空白地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Android的钛护目镜地图V2(版本2.1.3)和我使用钛工作室3.1.3.201309132423。

I am using the titanium Goggle Maps v2 for Android (version 2.1.3.) and I am using Titanium studio 3.1.3.201309132423.

在示例文件夹中的文件app.js样本code是为我工作。

The sample code in the app.js file in the example folder IS WORKING for me.

然而,当我试图创建自己的地图,我收到谷歌标志,在放大和缩小按钮,该按钮,这需要用户自己的当前位置。地图本身是空白但是。这是在第一次为我工作,并停止一切突然。

However, when I am trying to create my own map, I am receiving the Google logo, the zoom in and zoom out button, and the button, which takes a user to their current position. The map itself is BLANK however. THIS WAS working for me at first and stopped all of a sudden.

我使用的出现在Appcelerator的文档该模块即switch语句。

I am using the switch statement which appears in the appcelerator docs for the module i.e.

var rc = MapModule.isGooglePlayServicesAvailable();
    switch (rc) {
        case MapModule.SUCCESS:
            Ti.API.info('Google Play services is installed.');
            break;
        case MapModule.SERVICE_MISSING:
            alert('Google Play services is missing. Please install Google Play services from the Google Play store.');
            break;
        case MapModule.SERVICE_VERSION_UPDATE_REQUIRED:
            alert('Google Play services is out of date. Please update Google Play services.');
            break;
        case MapModule.SERVICE_DISABLED:
            alert('Google Play services is disabled. Please enable Google Play services.');
            break;
        case MapModule.SERVICE_INVALID:
            alert('Google Play services cannot be authenticated. Reinstall Google Play services.');
            break;
        default:
            alert('Unknown error.');
            break;
    }

我的日志汇报一号情况下Google Play服务已被安装

我ti.App.xml如下:

My ti.App.xml is the following:

<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
    <id>com.girt.MyApp</id>
    <name>MyApp</name>
    <version>1.0</version>
    <publisher>roseanne</publisher>
    <url>http://www.apps.com</url>
    <description>not specified</description>
    <copyright>2014 by roseanne</copyright>
    <icon>appicon.png</icon>
    <persistent-wifi>false</persistent-wifi>
    <prerendered-icon>false</prerendered-icon>
    <statusbar-style>default</statusbar-style>
    <statusbar-hidden>true</statusbar-hidden>
    <fullscreen>false</fullscreen>
    <navbar-hidden>true</navbar-hidden>
    <analytics>true</analytics>
    <guid>78be39e9-acb5-469f-9fa2-3724280dee14</guid>
    <property name="ti.ui.defaultunit" type="string">system</property>
    <android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest>
                <!-- <uses-sdk android:targetSdkVersion="11"/> -->
            <!-- Allows the API to download data from Google Map servers -->
            <uses-permission android:name="android.permission.INTERNET"/>
            <!-- Allows the API to cache data -->
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>  
            <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

            <!-- Use GPS for device location -->
            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
            <!-- Use Wi-Fi or mobile connection for device location -->
            <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
            <!-- Allows the API to access Google web-based services -->
            <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
            <!-- Specify OpenGL ES 2.0 as a requirement -->
            <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
            <!-- Replace <com.domain.appid> with your application ID -->
            <uses-permission android:name="com.girt.Myapp.permission.MAPS_RECEIVE"/>
            <permission android:name="com.girt.Myapp.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
            <application>
                <!-- Replace "PASTE YOUR GOOGLE MAPS API KEY HERE" with the Google API key you obtained -->
                <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="xxxxxxxxxxxxxxx"/>
            </application>
        </manifest>
    </android>
    <mobileweb>
        <precache/>
        <splash>
            <enabled>true</enabled>
            <inline-css-images>true</inline-css-images>
        </splash>
        <theme>default</theme>
    </mobileweb>
    <modules>
        <module platform="android" version="1.1">com.gbaldera.titouchgallery</module> 
        <module platform="android" version="0.1">titutorial.ratingbar</module>
        <module platform="android" version="2.1.3">ti.map</module>
    </modules>
    <deployment-targets>
        <target device="iphone">false</target>
        <target device="ipad">false</target>
        <target device="android">true</target>
        <target device="blackberry">false</target>
        <target device="mobileweb">true</target>
        <target device="tizen">false</target>
    </deployment-targets>
    <sdk-version>3.1.1.GA</sdk-version>
</ti:app>

如果任何人都可以请帮助,我一直工作在这两天并没有得出一个解决方案。关于它的最令人沮丧的一部分,这是工作,然后停了下来。

If anyone could please help, I've been working on this for two days and have not come to a solution. The most frustrating part about it, is that it WAS working, and then stopped.

推荐答案

挫折的FUL一天后,我发现,当我pressed后退按钮,我勉强能看到一个半透明地图的一瞬间。我改变了zIndex的并没有什么区别。然后,我改变了的backgroundColor窗口,以透明瞧

After a ful day of frustration, I spotted that when I pressed the back button, I could just about see a translucent map for a split second. I changed the zIndex and no difference. I then changed the backgroundColor of the window to 'transparent' and voila

这篇关于在我的谷歌地图V2为Android钛模块空白地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆