I had to show a few (about 600, everything that could be marked to show some information about them) to overlay elements on a mapview. Regarding performance issues, I thought it would be wise to group them into different ItemizedOverlay classes, because each group will show different information about them. (The company's activity is airports, VOR, NDB, etc.).
My problem is that if I separate them into classes and show them, the performance is super. The map flows smoothly. But when I add a second layer on top of the first, the elements on the first layer become invisible.
When I read a lot and debugged using the Log.i method, I realized that each layer gets a click, but only the OnTap method is called (geodata point, MapView mapview). Calling super.onTap (point, mapview) does not work. I need the onTap (int index) method to identify the marker. (I have both methods in my classes (after I read a lot of examples)).
So what should I do? Is there any way to solve my problem? I do not want to go into difficult approaches, such as comparing clicked coordinates to all the coordinates of the overlay elements to find something close.
Thanks in advance.
source share