自2018年10月18日起,高德开发者论坛除车机板块外,其他板块将停止发帖与维护,如您有使用问题请 提交工单 联系我们,感谢您的理解。

查看: 360|回复: 0
打印 上一主题 下一主题

[应用案例] 无法显示地图,白屏

[复制链接]
最佳答案
0 

1

主题

1

帖子

7

积分

新手上路

Rank: 1

积分
7
跳转到指定楼层
楼主
发表于 2018-7-30 23:05:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
发表帖子
API/SDK版本号: 2DMAP 5.2
产品: 2D地图
手机型号: HUAWEI P9
使用接口:
本帖最后由 daconghz 于 2018-7-31 19:54 编辑

已解决

无法显示地图,白屏求助,仅使用2D地图,版本5.2,没有使用location,用的是fragment
fragment定义如下public class GDMapShowFragment extends Fragment implements OnMarkerClickListener {layout如下:<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainlayout"
android:gravity="right"
androidrientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">

    <com.amap.api.maps2d.MapView
android:id="@+id/gdmap"
android:layout_width="match_parent"
android:layout_height="match_parent" />
    <LinearLayout
androidrientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/nav">
        <Button
android:id="@+id/getBYesterday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:textSize="12sp"
android:layout_weight="1"
android:textColor="@color/blue"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:background="@drawable/button_normal_selector"
android:text="@string/getBYesterday" />

        <Button
android:id="@+id/getYesterday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:textSize="12sp"
android:layout_weight="1"
android:textColor="@color/blue"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/getBYesterday"
android:layout_centerVertical="true"
android:background="@drawable/button_normal_selector"
android:text="@string/getYesterday" />

        <Button
android:id="@+id/getToday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:textSize="12sp"
android:layout_weight="1"
android:textColor="@color/blue"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/getYesterday"
android:layout_centerVertical="true"
android:background="@drawable/button_normal_selector"
android:text="@string/getToday" />
        <Button
android:id="@+id/getPrevious"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:textSize="12sp"
android:layout_weight="1"
android:textColor="@color/blue"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/getToday"
android:layout_centerVertical="true"
android:background="@drawable/button_normal_selector"
android:text="@string/getPrevious" />
        <Button
android:id="@+id/getNext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:textSize="12sp"
android:layout_weight="1"
android:textColor="@color/blue"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/getToday"
android:layout_centerVertical="true"
android:background="@drawable/button_normal_selector"
android:text="@string/getNext" />

        <Button
android:id="@+id/getDBLatest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:textSize="12sp"
android:layout_weight="1"
android:textColor="@color/red"
android:background="@drawable/button_focus_selector"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/getPrevious"
android:layout_centerVertical="true"
android:text="@string/getDBLatest" />
    </LinearLayout>

</RelativeLayout>

谢谢!



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|小黑屋|高德开发者论坛

Copyright ©2014 高德开发者论坛.All Rights Reserved |京ICP证070711号

意见反馈 常见问题 服务条款 联系我们
快速回复 返回顶部 返回列表