Hi,
I'm setting custom icon to marker with WebGMaps1.Markers[0].Icon:='abc.png';, when marker on the move i'm using MapPanTo function to follow marker, but when i use MapPanTo my custom icon resetting to default map icon.
Hi,
Hi,
Hi Bart,
I'm getting marker positions from database and creating markers icons according to speed limit, my code as below;
spdlmt:=sorgu.Fields[7].AsInteger;
lat:=StrToFloat(StringReplace(trim(sorgub.Fields[5].AsString), '.', ',', [rfReplaceAll]));
lon:=StrToFloat(StringReplace(trim(sorgub.Fields[6].AsString), '.', ',', [rfReplaceAll]));
spd:=Round(Strtofloat(StringReplace(copy(sorgub.Fields[7].asstring,0,12), '.', ',', [rfReplaceAll])));
WebGMaps1.Markers.Add(lat,lon,Trim(sorgu.Fields[1].asstring));
if (spd>=spdlmt) then
begin
WebGMaps1.Markers[mi].Icon:=ikon+'ikaz_48.png';
WebGMaps1.Markers[mi].MapLabel.Text:=Trim(sorgu.Fields[1].asstring)+' - '+sorgub.Fields[9].AsString+' - '+sorgub.Fields[10].AsString+' Hız : '+inttostr(spd)+' KM - <b><font color=red>Hız Aşımı Uyarısı</b></font>';
end//hız limiti aşımı
else
begin
WebGMaps1.Markers[mi].Icon:=ikon+Trim(sorgu.Fields[6].asstring);
WebGMaps1.Markers[mi].MapLabel.Text:=Trim(sorgu.Fields[1].asstring)+' - '+sorgub.Fields[9].AsString+' - '+sorgub.Fields[10].AsString+' Hız : '+inttostr(spd)+' KM';
end;
WebGMaps1.Markers[mi].InitialDropAnimation:=True;
sorgu.Next;
end;//while
cxComboBox1.ItemIndex:=-1;
cxComboBox1.Enabled:=False;
cxTextEdit1.Enabled:=False;
cxTextEdit2.Enabled:=False;
WebGMaps1.MapOptions.DefaultLatitude:=41.06035;
WebGMaps1.MapOptions.DefaultLongitude:=28.848891;
WebGMaps1.MapOptions.ZoomMap:=12;
WebGMaps1.Launch;
am i missing something ?
Hi,
above codes was belong to test project, with main project i edited my code to as simple as possible and resetting problem has gone, now custom icons works fine.