Print Page | Close Window

Change Marker Icon at Runtime

Printed From: TMS Software
Category: FMX Components
Forum Name: FMX WebGMaps / WebOSMaps
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=5269
Printed Date: 18 Sep 2019 at 3:28pm


Topic: Change Marker Icon at Runtime
Posted By: Jung Michael
Subject: Change Marker Icon at Runtime
Date Posted: 02 Jun 2015 at 6:25pm
Assigned new icons on app start, but cannot change these at runtime.
If marker is deleted and recreated with different icon it is not shown on map.
As in one forum topic shown here BeginUpdate ... EndUpdate did not help.

Any hint ? 

Mike



Replies:
Posted By: Bart Holvoet
Date Posted: 03 Jun 2015 at 10:51am
Hi,

I have not been able to reproduce this issue.

Example:
//create marker
  TMSFMXWebGMaps1.Markers.Add(50, 3, 'Update', 'image1.png', false, true, true, false, false, 0);

//remove and recreate marker with different image
  if TMSFMXWebGMaps1.Markers.Count > 0 then
  begin
    TMSFMXWebGMaps1.DeleteMapMarker(0);
    TMSFMXWebGMaps1.Markers.Add(50, 3, 'Update', 'image2.png', false, true, true, false, false, 0);




Print Page | Close Window