Scale Layer

Dilys
Dilys Global Mapper UserTrusted User
edited April 2009 in SDK
Hi Mike,

My supervisor wants to know is it possible to change the scale of all layers except the top layer? The scale of the top layer never be changed.


Thanks,
Dilys

Comments

  • global_mapper
    global_mapper Administrator
    edited April 2009
    Dilys,

    I wonder if perhaps what you want is to have the top layer fixed on the screen and the others zoom in and out. If so, what you need to do is load the top layer with the File->Open Data File at Fixed Screen Location menu command to load the top layer and specify its desired location that way.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Dilys
    Dilys Global Mapper User Trusted User
    edited April 2009
    Mike,

    Can I do it using SDK?

    Thanks,
    Dilys
  • global_mapper
    global_mapper Administrator
    edited April 2009
    Dilys,

    Yes, to do this with the SDK you load a layer with the GM_LoadRectifiedLayer command and provide a projection (but no control points) of type GM_PRJ_FIXED_SCREEN_POS. The available projection parameters are as follows and control how the fixed layer is displayed:

    // Attributes for GM_PRJ_FIXED_SCREEN_POS projection
    GM_PRJ_ATTR_HORZ_OFFSET, // horizontal offset value in inches, percent, or longitude
    GM_PRJ_ATTR_HORZ_OFFSET_TYPE, // horizontal offset type (0 - left, 1 - right, 2 - centered)
    GM_PRJ_ATTR_HORZ_OFFSET_VTYPE, // horizontal offset value type (0 - inches, 1 - percent, 2 - degrees longitude)
    GM_PRJ_ATTR_VERT_OFFSET, // vertical offset value in inches, percent, or latitude
    GM_PRJ_ATTR_VERT_OFFSET_TYPE, // vertical offset type (0 - top, 1 - bottom, 2 - centered)
    GM_PRJ_ATTR_VERT_OFFSET_VTYPE, // vertical offset value type (0 - inches, 1 - percent, 2 - degrees latitude)
    GM_PRJ_ATTR_SIZE_VALUE, // size value (percent)
    GM_PRJ_ATTR_SIZE_VALUE_TYPE, // size value type (0 - fixed pixel size, 1 - percent width, 2 - percent height)
    GM_PRJ_ATTR_ALWAYS_ON_TOP, // make this fixed screen file show on top of everything else

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com