As you can see from the question I need to put some button on mapView, where the app will by presing the button by user, refresh the mapView with current location. I know how to put the button above, under, but how to put on map??? If anyone has some sample code, or some guidance help is appreciated...
You'll want to use a RelativeLayout and lay the button over top of the MapView. Just make sure not to place it over the Google logo. Here's a sample XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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/google_maps"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="@string/maps_key"/>
<Button android:id="@+id/googlemaps_select_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="Select"/>
</RelativeLayout>
Hi man search for overlay item is what you need :D here google link http://developer.android.com/resources/tutorials/views/hello-mapview.html
and good sample :D
https://github.com/jgilfelt/android-mapviewballoons
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With