GM_AddAreaToVectorLayer

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

I try to create an area feature with user's area style in a vector layer. A new area feature is created and displayed in the screen, but the style has not been changed.

First, I used GM_GetAreaFeature(LayerHandle, index) to get the GM_AreaFeature_t.mAreaStyle.
Then I used GM_SelectAreaStyle(pointer) to get the area style from user,
I convert the return pointer to GM_AreaStyle_t structure, and copy it to the pervious GM_AreaFeature_t.mAreaStyle,
Finally, I used GM_AddAreaToVectorLayer(LayerHandle, GM_AreaFeatrue_t, false)

Do I need to use GM_SetAreaFeatureDrawStyle to change the area style?
Or do I miss something?

Thanks
Dilys

Comments

  • global_mapper
    global_mapper Administrator
    edited June 2009
    Dilys,

    Are you wanting to create a new feature with a user-selected style or change the style of an existing feature? I'm guessing you are wanting to edit the style of an existing feature based on your call to GM_GetAreaFeature, so what you really need to call is GM_SetAreaFeatureDrawStyle as that is what you use to change the style of an existing area feature. You would only use GM_AddAreaToVectorLayer to add a completely new area feature.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com