繁体   English   中英

在圆圈内显示地图

[英]Showing map inside a circle

我正在做一个需要在圆圈内显示地图的项目。如何在圆圈内显示mapview。 在此处输入图片说明

您可以使用FrameLayout构成布局。 第一项必须是MapView,然后是ImageView,该ImageView引用带有透明圆圈的png。 希望能有所帮助。

编辑后添加一个示例:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:clickable="true"
        android:apiKey="whateverYourApiKeyIs"/>

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/fullSizeImageWithTransparentCircle"/>

</FrameLayout>

既然你写了这么一个坏问题。 请允许我以相同的方式回答。
进行mapview。
圆角样式

我什至会给你一个圆角链接

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM