0
我想編輯它,以便在我需要的地圖中添加一些TextView。例如,右上角的文本視圖帶有位置準確性的實時信息。我可以編輯android的Google maps api嗎?
如果你知道一個方法來做到這一點,而無需修改谷歌地圖api的android,請告訴我。
我已閱讀使用條款的服務,但我沒有得到明確的答案,如果我可以修改地圖jar。
我想編輯它,以便在我需要的地圖中添加一些TextView。例如,右上角的文本視圖帶有位置準確性的實時信息。我可以編輯android的Google maps api嗎?
如果你知道一個方法來做到這一點,而無需修改谷歌地圖api的android,請告訴我。
我已閱讀使用條款的服務,但我沒有得到明確的答案,如果我可以修改地圖jar。
您不需要修改地圖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>
謝謝!它工作得很好,請編輯答案以糾正TextView標籤的關閉,我不能這樣做,因爲它少於6個字符。 – 2012-08-13 11:17:20
您不能修改的.jar。也許你可以@override它。 – Ahmad 2012-08-12 12:07:35