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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -