简体   繁体   English

Android地图绘制自定义标记

[英]android map draw custom marker

Say I have multiple Overlay items in my map. 假设我的地图中有多个叠加项。 Is it possible to draw some text (say the overlay number) on the default marker ? 是否可以在默认标记上绘制一些文本(例如重叠编号)?

You could define some custom markers. 您可以定义一些自定义标记。 You can't edit the default ones... 您无法编辑默认值...

Create a Textview and use the map layout param (with the position you want it, as it accepts a geopoint) to add it to textview that you created. 创建一个Textview并使用地图布局参数(具有您希望的位置,因为它接受一个Geopoint)将其添加到您创建的Textview中。 Add the textview to the mapView Your text will appear on the map over the marker 将textview添加到mapView您的文本将显示在地图上的标记上方

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

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