Global Mapper v25.0

GM_Projection_t Structure

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

Are my GM_Projection_t and GM_ProjAttrValue_t definitions below correct?

<StructLayout(LayoutKind.Sequential)> Public Structure GM_Projection_t
Public mProjSys As PROJSYS ' Projection system
Public mDatum As DATUM ' Horizontal datum
Public mUnit As UNIT ' Ground units
Public mNumAttrs As ULong ' Number of attributes in attribute list

Public mAttrVal1 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal2 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal3 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal4 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal5 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal6 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal7 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal8 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal9 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal10 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal11 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal12 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal13 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal14 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal15 As GM_ProjAttrValue_t ' First attribute value
Public mAttrVal16 As GM_ProjAttrValue_t ' First attribute value
End Structure

<StructLayout(LayoutKind.Sequential)> Public Structure GM_ProjAttrValue_t
Public mAttr As PROJATTR ' Attribute
Public mValue As Double ' Attribute value
End Structure

After I updated the latest SDK beta, a layer with an area feature displayed not properly. The area style lost. The mNumAttrs in GM_Projection_t definition returned an incorrect value. When I loaded a layer with no attribute in Projection, the value of mNumAttrs of GM_Projection_t returned 1. I have attached the screen shots for your reference.

Thanks for your help in advance.
Dilys

Comments

  • global_mapper
    global_mapper Administrator
    edited August 2009
    Dilys,

    How are your PROJSYS, DATUM, UNIT, and PROJATTR enumerations defined? You need to make sure they are defined as UInt16 enumerations. However this hasn't changed since the earlier SDK releases so I'm guessing you have this correct and it's not the problem. In the new SDK the GM_PRJ_GEO projection now supports an attribute, which is probably what you are seeing.

    How are you setting the style for the area and what do your relevant structure definitions there look like?

    Thanks,

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

    I use my area style structure definitions to create and draw the area feature with no problem. Anyway, please find my attachment and let me know if my definitions have problem.

    Thanks
    Dilys
  • global_mapper
    global_mapper Administrator
    edited August 2009
    Dilys,

    So is it working correctly now? I checked your declarations and didn't see any problems. I didn't see your GM_FontDef_t definition though to check it.

    Thanks,

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

    It is ok and everything fine when I create and draw the area feature. But the only problem is when I LOAD a layer with area feature, the area style lost. So I think there may be a problem with the projection, but I am not sure. Even I use your GMDLL_Tester - v1.31 (SDK Build Date: 08/10/09) application to load the layer, has the same problem: the area style lost. You could find my attachment to test it via the GMDLL_Tester and Global Mapper applications.

    Thanks
    Dilys
  • global_mapper
    global_mapper Administrator
    edited August 2009
    Dilys,

    It looks like there was a bug added recently causing the style attributes to not work. I have found it and fixed it based on your file. I have placed a new SDK build at http://www.globalmapper.com/GlobalMapperSDK_v131_beta.zip which should fix the problem.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com