Selection by code takes too much time to appear on map

Hi everyone,

I have a problem while selecting a shape by code:
shapefile.ShapeSelected[index]=true;
the code executed successfully, but the selection does not appears on map until I hover by mouse on the map.
The shapefile is an in-memory layer (shpefile.Volitile = true;), and shapes added at run time while tracking a car.

Thank you,
Sam

It may be that the selection just has to be refreshed. Have you tried

AxMap.Redraw2(tkRedrawType::RedrawSkipDataLayers);

which will refresh the Volatile layers without having to redraw the underlying data layers. See:

https://www.mapwindow.org/documentation/mapwingis4.9/class_ax_map.html#aca3c89d67a51f258a29a88d173dff12b

1 Like

Hi @proxyaircraft did Jerry’s suggestion help your problem?

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.