繁体   English   中英

我可以编辑适用于Android的Google Maps API吗?

[英]Can I edit the Google maps api for android?

我想对其进行编辑,以便在所需的地图中添加一些TextView。 例如,右上角的文本视图具有位置准确性的实时信息。

如果您知道一种无需修改Google Maps api for android的方法,请告诉我。

我已经阅读了该服务的使用条款,但是如果可以修改地图罐子,则无法得到明确的答案。

您无需修改​​maps API。 您需要做的就是将RelativeLayout用作布局的根容器,并向其中添加MapView和TextView以显示所需的文本。

这是一个示例代码

<RelativeLayout 
 android:layout_width="fill_parent"
 android:layout_height="fill_parent">
 <MapView 
  android:id="@+id/mapview"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
   />
 <TextView
  android:id="@+id/textview"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_alignTop="@id/mapview"
  android:layout_alignParentRight="true"/>

 </RelativeLayout>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM