Jump to content
John van de Waeter

TMapview and changing marker's position

Recommended Posts

Hi All,

I have a TMapview and 12 markers.

The position (Lat/Long) of these markers change every 0.5 seconds.

Everytime I delete the Markers and add them with the new positions.

 

This works OK on Android, but on iOS the app crashes the iPhone after about an hour. The iPhone gets completely frozen, no response to Screen  Home-key and On/Off key anymore. After a while the iPhone automatically reboots.

 

The deleting of the markers is done by Marker.DisposeOf.   If I change to Marker.Remove, result is the same.

I guess it is a memory issue inside the mapview. No errors are thrown if I use a try... except.

 

Instead of recreating the Markers, I tried to set a new location using Marker.Descriptor.Position.Latitude:=..., but Delphi complains that "Left Side cannot be assigned to", so readonly.

 

Is it really necessary to delete/recreate a marker when it's position is changed?

 

Thanks,

John

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×