Quantcast
Viewing all articles
Browse latest Browse all 2341

New Post: Strange behavior of shape and drawing layer index

Hello,

I come again to you to expose you a problem I often encounter.
I develop an application with MapWinGIS 4.8 which need to save index of shape created in shapefile and handle of drawing layers (5 or 6 drawing layers in the same time).
After many times to debug, I notice this behaviour :
  • when you delete a shape into a shapefile, all shape index after are decreased. In other words, index of shape are always a contenuous list of integer which start at 0.
  • same behaviour with drawing layers
    This behaviour is really strange because when you need to save reference to a shape in the aim to modify it after, its very difficult to keep consistency between shape index and my index.
    Moreover, for the drawing layers, I have an exemple :
  • I have one drawing layer to display scale bar. Each times the extents of axmap changed, the scale bar is redraw :
 _axMap.ClearDrawing(_handleDrawingLayerForScalebar);
_handleDrawingLayerForScalebar = _axMap.NewDrawing(tkDrawReferenceList.dlScreenReferencedList);
  • I have one drawing layer to display result of simulation computation.
==>> In this state, drawing layers handle are respectively 0 and 1
  • I have a checkbox to hide the result of simulation computation. When user click on this checkbox, I use SetDrawingLayerVisible function to make disappear the drawing layer.
    If there was no extent change of the map, this works. But, when a change extent happen (so, clear and newdrawing for scale bar happen), its the result of simulation computation which disappear.
==>> In this state, drawing layers handlde are respectively 0 and 1 for me BUT for MapWingis 0 is the second drawing layer and 1 is the first : the clear of the drawing layer for the scale bar caused decrement of the second index.

I don't know if its a normal behaviour for you but its really hard to develop a big application with lots of data with MapWinGIS. Especially an application of simulation.

Best regards,

Tristan

Viewing all articles
Browse latest Browse all 2341

Trending Articles