Button overlay on map!?

Put your problem here if it does not fit any of the other categories.

Button overlay on map!?

Postby bluefloyd8 » Fri Feb 29, 2008 8:59 pm

I was just thinking it would be nice to be able to overlay a button on the map (ie.. so the user could choose a location on the map by clicking).

Is this possible? Has anyone tried something similar?

thanks
User avatar
bluefloyd8
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Jan 22, 2008 3:57 am
Location: Indiana, USA

Top

Postby plusminus » Sat Mar 01, 2008 2:15 pm

Hello bluefloyd,

this is the code I use for AndNav to overlay two clickable button-style (ImageViews) over a MapView:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.     android:layout_width="fill_parent"
  6.  
  7.     android:layout_height="fill_parent">
  8.  
  9.      <view class="com.google.android.maps.MapView"
  10.  
  11.          android:id="@+id/map_map"
  12.  
  13.          android:layout_width="fill_parent"
  14.  
  15.          android:layout_height="fill_parent"/>
  16.  
  17.      <ImageView
  18.  
  19.          android:id="@+id/iv_map_zoomin"
  20.  
  21.          android:layout_alignParentTop="true"
  22.  
  23.          android:layout_alignParentRight="true"
  24.  
  25.          android:layout_width="wrap_content"
  26.  
  27.          android:layout_height="wrap_content"
  28.  
  29.          android:src="@drawable/plus_32"/>
  30.  
  31.      <ImageView
  32.  
  33.          android:id="@+id/iv_map_zoomout"
  34.  
  35.          android:layout_alignParentTop="true"
  36.  
  37.          android:layout_alignParentLeft="true"
  38.  
  39.          android:layout_width="wrap_content"
  40.  
  41.          android:layout_height="wrap_content"
  42.  
  43.          android:src="@drawable/minus_32"/>
  44.  
  45. </RelativeLayout>
Parsed in 0.003 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 15 guests