Global Mapper v25.0

Draw Order for Vector Objects

Qldblue
Qldblue Global Mapper User
edited December 2008 in SDK
Mike,

I have created a series of layers representing the types of objects needed in the program. For instance Buildings for all building types (an area oject), Ground for ground contours (a line object), etc.

I then placed (created) these layers in the order I would like them to be drawn. In this way I can buildup a logical map picture,with the layers drawn later obscuring the information in the layers drawn previously.

However, I note that the layer draw order does not seem to function for these user created layers. In fact draw order does not even appear to be in object creation order. To confirm this I exported the layers created and viewed using GM V9.0. I then modified the layer draw order inside GM9 and the draw order remained the same.

Is it possible to arrange for the draw order of user created layers to be in accordance the layer order.

Thanks in advance

Mark

Comments

  • global_mapper
    global_mapper Administrator
    edited December 2008
    Mark,

    By default if you are rendering multiple vector layers at once all area features area drawn first, then all line features, following by all point features.

    If you would prefer that vector features would be drawn one layer at a time, simply pass the GM_DrawFlags_SeparateVectorLayers flag to the GM_DrawLayerList function.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Qldblue
    Qldblue Global Mapper User
    edited December 2008
    Mike

    I'll try that. Can I also change the draw order within a layer. I assume that the order is in the order the objects are created (and retained on a list). It would be handy to bump an object up and down the list.

    Thanks

    Mark
  • global_mapper
    global_mapper Administrator
    edited December 2008
    Mark,

    Within a single layer the order is always areas first, then lines, then points. Within a single grouping (i.e. areas), the classification of the layer is first used to determine draw order, at least for the built-in types. After that the order of the features with the layer is used (assuming that all features have the same drawing style).

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Qldblue
    Qldblue Global Mapper User
    edited December 2008
    Mike,


    Thanks for the reply.

    My layers will only have one type of object, ie all point or all line, and all will have the same user created type.

    However the main issue will be the area objects. Sometimes I will want to vary the draw order to better represent the map.

    Hence the question is can I vary the draw order of these objects/features within a layer (in the same way as the draw order of entire layers can be varied with draw sooner, draw first, draw later, draw last)

    Cheers and Thanks

    Mark
  • global_mapper
    global_mapper Administrator
    edited December 2008
    Mark,

    There really isn't a straight-forward way to vary the draw order of area features with the same type within a layer. You would need to move areas to different layers to get them draw in a different order.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com