[android-developers] Re: Button On Map
Hi I asked the question on this mailing list myself with no response (http://groups.google.com/group/android-developers/browse_thread/ thread/ac596b6b85d2548c#). So a friend makes me pay attention to your thread. How did you manage to get that speech bubble on your map? I used the MyItemizedOverlay.java from the MapsView-Tutorial. I found out that there are 2 onTap calls: protected boolean onTap(int index) { return true; } and public boolean onTap(GeoPoint p, MapView mapView) { return true; } What to change in this functions to get the speech bubble? Should I set something to allow an onTap call? Where can I find more about that stuff. Google's reference is a little bit confusing to me. Thank You and Best wishes to all of you :-D --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Button On Map
hi.. i have difficulty in adding buttton on map ? can help? thx in adv Geminlite On Feb 9, 10:29 pm, Cadge carruthersgor...@googlemail.com wrote: Hi, Don't know if this will still be useful, but here goes. To bring up a map on the emulator I have 3 different parts: 1) A Class that extends MapActivity Something like import com.google.android.maps.MapActivity; import android.os.Bundle; public class MapApp extends MapActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override protected boolean isRouteDisplayed() { return false; } } 2) The layout file, here main.xml, should be something like ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent com.google.android.maps.MapView android:id=@+id/mapView android:layout_width=fill_parent android:layout_height=fill_parent android:enabled=true android:clickable=true android:apiKey=my_api_key / /LinearLayout *** Where my_api_key is your own api key. 3) And lastly there are 2 bits you will need to add to your manifest.xml file a) uses-library android:name=com.google.android.maps / --- This goes inbetween the application /application tags b) uses-permission xmlns:android=http://schemas.android.com/apk/res/android; android:name=android.permission.INTERNET --- I've put this after the /application tag /uses-permission This might not be the quickest, best etc way to do it but it will show a map you can pan around (look at the api if you want to add zoom functionality) Hope this was what you were asking for and not a waste of time haha :D --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Button On Map
Hi, Don't know if this will still be useful, but here goes. To bring up a map on the emulator I have 3 different parts: 1) A Class that extends MapActivity Something like import com.google.android.maps.MapActivity; import android.os.Bundle; public class MapApp extends MapActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override protected boolean isRouteDisplayed() { return false; } } 2) The layout file, here main.xml, should be something like ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent com.google.android.maps.MapView android:id=@+id/mapView android:layout_width=fill_parent android:layout_height=fill_parent android:enabled=true android:clickable=true android:apiKey=my_api_key / /LinearLayout *** Where my_api_key is your own api key. 3) And lastly there are 2 bits you will need to add to your manifest.xml file a) uses-library android:name=com.google.android.maps / --- This goes inbetween the application /application tags b) uses-permission xmlns:android=http://schemas.android.com/apk/res/android; android:name=android.permission.INTERNET --- I've put this after the /application tag /uses-permission This might not be the quickest, best etc way to do it but it will show a map you can pan around (look at the api if you want to add zoom functionality) Hope this was what you were asking for and not a waste of time haha :D --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Button On Map
Its ok I figured out how to pin buttons to GeoPoints so all is fine now. On Jan 20, 8:17 pm, Cadge carruthersgor...@googlemail.com wrote: Currently I have a MapView and an Itemized overlay which displays different locations on the map. When one of these locations is tapped the onTap method creates a new Overlay object which draws an empty speech bubble (the type you would find normally on google maps). What I want to do is then populate this empty speech bubble with some buttons but I am unsure how to do the following: 1) Get a reference to a button from an xml file in the Overlay class ( can't use findViewById() as it isn't an Activity? ). 2) Pin a button so it stays with the speech bubble. Would it be best to create a new layout which contains buttons and place this over the speech bubble? Is that even possible? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Button On Map
As I learned from your below details that you are able to create Google Map Application. I am trying to do that but not able to use Mapview in application. Can you please give some details about how to bring up the simplest Google Map Application ? Regards, _-_Mayank Rana_-_ On Jan 21, 6:06 am, Cadge carruthersgor...@googlemail.com wrote: Its ok I figured out how to pin buttons to GeoPoints so all is fine now. On Jan 20, 8:17 pm, Cadge carruthersgor...@googlemail.com wrote: Currently I have a MapView and an Itemized overlay which displays different locations on the map. When one of these locations is tapped the onTap method creates a new Overlay object which draws an empty speech bubble (the type you would find normally on google maps). What I want to do is then populate this empty speech bubble with some buttons but I am unsure how to do the following: 1) Get a reference to a button from an xml file in the Overlay class ( can't use findViewById() as it isn't an Activity? ). 2) Pin a button so it stays with the speech bubble. Would it be best to create a new layout which contains buttons and place this over the speech bubble? Is that even possible?- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---