Global Mapper Pro

Rendering only labels?

Toni Heimala
Toni Heimala Global Mapper User
edited May 2012 in SDK
Is it possible to render just the labels? Like GM_DrawFlags_HideLabels for DrawLayerList() but it would render only the labels and nothing else.

I need this because I render the whole part of the map in layers so I get two problems:
  1. Grid has to be drawn after tiles are drawn (otherwise grid labels are on every tile) -> Grid is drawn over labels, which is not good.
  2. Labels near the edge of a tile are drawn on several tiles.

So my plan is to render:
  1. All tiles without grid and without labels.
  2. Grid for the whole display.
  3. Labels for the whole display.

Comments

  • global_mapper
    global_mapper Administrator
    edited May 2012
    There isn't a flag to draw just the labels. What you would have to do is spin through all of the vector features and set the drawing style to an empty/NULL style, then draw them resulting in just the labels.

    Another option rather than tiling might be to use the latest v13.2 SDK release and the GM_DrawFlags_IncrementalRender flag to get updates as the map is drawn so you can copy the results to your screen DC for rendering. The C++ sample application in the latest SDK release now does this, including with a callback since the sample application uses a background bitmap for rendering.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Toni Heimala
    Toni Heimala Global Mapper User
    edited May 2012
    I tried using the IncrementRender flag but it seems that it is as slow if not slower than direct rendering and far from the speed of tiled rendering. Also disabling/enabling draw styles per render sounds slow but haven't tried it.
  • global_mapper
    global_mapper Administrator
    edited May 2012
    The IncrementalRender flag would not gain you any speed, in fact it will always be slightly slower as you are doing extra BitBlts throughout the draw to show what has been drawn so far. It just seems faster to users as they get updates throughout the process rather than having to wait until the end to see the results.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
Sign In or Register to comment.