1

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. enter image description here

anshul
  • 982
  • 1
  • 11
  • 33
  • 3
    first of all, link doesn't work. 2nd. Stackoverflow have an ability where you can upload pictures to your post. 3rd Have you tried something, or just hoping people will code it for you? – Anders Metnik Nov 28 '12 at 07:50
  • @Anders hope now you can see the pic.I have tried by myself but i was not able to get it.if you can help , would be great. – anshul Nov 28 '12 at 08:58

2 Answers2

1

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>
Adrián Rodríguez
  • 1,836
  • 15
  • 16
0

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

Community
  • 1
  • 1
Anders Metnik
  • 6,096
  • 7
  • 40
  • 79