【发布时间】:2016-08-26 12:49:25
【问题描述】:
谁能解释一下如何在 Delphi 中为 Android 应用程序更改标记图标?
我的尝试不起作用
s.Create(16, 16); //Image size
position.Latitude := mapview1.Location.Latitude;
position.Longitude := mapview1.Location.Longitude;
MyMarker := TMapMarkerDescriptor.Create(Position, 'MyMarker');
MyMarker.Draggable := True;
Mymarker.Icon := imagelist1.Bitmap(s,0);
MyMarker.Visible :=True;
Fmarkers.Add(MapView1.AddMarker(MyMarker));
Imagelist 是表单上的 Timagelist。添加了 16x16 图像。
如果我运行我的应用程序,则不会显示任何标记。我是否评论//带有图标的行然后一切正常,但我没有自定义标记图标。
我想要一组 4 个不同的标记图标。
【问题讨论】:
-
你的变量
s声明为什么? -
s 是我对这个问题的测试和研究的 TSizeF。我可以通过使用 TImage 而不是使用 imagelist 来获得自定义图标,我继续我的研究
标签: android google-maps delphi