I'm trying to draw a map with a lot of markers on it. Just say more than 3000 markers, and this is taking a very long time to process and is using a lot of memory.
But I have the same map on Google Earth and this open very quickly. Somebody knows a way to speedup the process using gmLib?
Take a look at RTree structures.
Queries like the one you expect will become almost immediate... :)
I use the RTree extension available in SQLite3. Our Open Source framework interfaces this kind of virtual tables with Delphi classes. BTW it works from Delphi 6 up to XE5.
If you are afraid of using a RTree, just ordering the data in order will help a lot searching e.g. via a binary search algorithm.