简体   繁体   中英

Showing map inside a circle

I am working on a project where i need to have a map to be shown inside a circle.How can i show a mapview inside a circle. 在此处输入图片说明

You can compose the layout with a FrameLayout. The first item must be the MapView and then an ImageView referencing a png with that circle transparent. Hope that helps.

Edited to add an example:

<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>

Since you write such a bad question. Allow me to answer in the same style.
Take a mapview.
Style it with round corners

I'll even give you a link to round corners

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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