To my knowledge there are no built in components to do this, but of course you can always put any view you want on top of the map activity. The way I do this is that I have my MapActivity layout defined something like
<?xml version="1.0" encoding="UTF-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.google.android.maps.MapView android:id="@+id/map" android:layout_width="wrap_content" android:layout_height="wrap_content" android:enabled="true" android:clickable="true" android:apiKey="apiKey" /> </RelativeLayout> <com.android.MyPackage.MyCustomView android:id="@+id/bubble" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="true" android:focusableInTouchMode="true" android:visibility="gone" /> </FrameLayout> Where MyCustomView is the view that I want to display when a marker is pressed. Now in may Overlay subclass in the onTap method I do something like public boolean onTap(GeoPoint point, MapView map) { Point pxPoint = map.getProjection().toPixels(point, null); mListener.onItemClick(pxPoint); } here mListener is an instance of my MapActivity subclass where in the onItemClick method I draw my custom view... public void onItemClicked(Point point) { MyCustomView view = (MyCustomView)findViewById(R.id.bubble); view.layout(point.x, point.y, view.getWidht(), view.getHeight()); view.setVisibility(View.VISIBLE); view.invalidate(); } That's the basic idea. You might have to force the layout before drawing or set some limits to the view width and height, because getWidth() and getHeight() return 0 before the first layout. But I think you should get the basic idea how to do this... -Mika On Nov 16, 6:38 am, Timmah <timrys...@gmail.com> wrote: > I am looking for code examples of how to draw a description box when > clicking on a map marker. Something similar to google map's > implementation > -http://code.google.com/apis/maps/documentation/examples/icon-custom.html > (Click on the marker to see an example) > > Much appreciated ! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en