Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can use layouts and the parameters in your XML layout file to change sizes, positions, etc. For example, from google's sample code for showing 4 copies of the map in 4 quadrants of the screen:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" android:id="@+id/map_container" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"&gt; &lt;LinearLayout android:id="@+id/map_container2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0.5" android:orientation="horizontal"&gt; &lt;fragment android:id="@+id/map1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0.5" class="com.google.android.gms.maps.SupportMapFragment" map:cameraTargetLat="40.72" map:cameraTargetLng="-74.00" map:cameraZoom="8"/&gt; &lt;fragment android:id="@+id/map2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0.5" class="com.google.android.gms.maps.SupportMapFragment" map:cameraTargetLat="51.51" map:cameraTargetLng="-0.12" map:cameraZoom="8"/&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/map_container2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0.5" android:orientation="horizontal"&gt; &lt;fragment android:id="@+id/map3" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0.5" class="com.google.android.gms.maps.SupportMapFragment" map:cameraTargetLat="48.85" map:cameraTargetLng="2.35" map:cameraZoom="8"/&gt; &lt;fragment android:id="@+id/map4" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0.5" class="com.google.android.gms.maps.SupportMapFragment" map:cameraTargetLat="35.69" map:cameraTargetLng="139.69" map:cameraZoom="8"/&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload