GM_AddAreaToVectorLayer
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
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
-
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
Categories
- 13K All Categories
- 5.8K Features Discussion
- 350 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 182 Announcement and News
- 943 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.8K Technical Support
- 581 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 245 How I use Global Mapper
- 111 Global Mapper Forum Website
