TMapView Delphi - How to correctly use array for adding markers? -
i'm trying use arrays first time in app i'm not sure i'm missing, app keeps crashing when trigger procedure.
var mmapmarker: array of tmapmarker;
then comes procedure:
setlength(mmapmarker, mylist.count-1); // mylist generated tstringlist := 0 mylist.count-1 begin mymarker := tmapmarkerdescriptor.create(posmap, mylist[i]); mymarker.position := posmap; mymarker.draggable := false; mymarker.visible := true; mymarker.icon := icoshopping.bitmap; mmapmarker[i] := mapview1.addmarker(mymarker); // <<<- crash in line end;
also, if try use array tmapmarkerdescriptor
above, crashes in line:
mymarker[i] := tmapmarkerdescriptor.create(posmap, mylist[i]);
where missing?
Comments
Post a Comment