简体   繁体   English

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

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

I want to edit it in order to add some TextViews in the map that I need. 我想对其进行编辑,以便在所需的地图中添加一些TextView。 For example, a textview in top right corner with a real time information of location accuracy. 例如,右上角的文本视图具有位置准确性的实时信息。

If you know a way to do it without modifying google maps api for android, please tell me. 如果您知道一种无需修改Google Maps api for android的方法,请告诉我。

I have read the terms of use os the service but i don't get a clear answer in if I can modify the maps jar. 我已经阅读了该服务的使用条款,但是如果可以修改地图罐子,则无法得到明确的答案。

You don't need to modify the maps API. 您无需修改​​maps API。 All you need to do is use a RelativeLayout as the root container of your layout and add a MapView and a TextView to it to display the text you want. 您需要做的就是将RelativeLayout用作布局的根容器,并向其中添加MapView和TextView以显示所需的文本。

Here's a sample code 这是一个示例代码

<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