layer properties and label drawing
Hi,
I have two short questions;
first, I'd like to draw labels on a layer. What is the best method to do it?
I did it with setting the text in Point.mFeatureInfo.mName. It works fine, I just don't know whether this is the proper one? And is there a way to wrap a long text in order to appear in two lines?
Secondly, I'd like to change the width of the lines on a (loaded) layer. And maybe the colour. How can I do this?
Thanks in advance,
Zsolt
I have two short questions;
first, I'd like to draw labels on a layer. What is the best method to do it?
I did it with setting the text in Point.mFeatureInfo.mName. It works fine, I just don't know whether this is the proper one? And is there a way to wrap a long text in order to appear in two lines?
Secondly, I'd like to change the width of the lines on a (loaded) layer. And maybe the colour. How can I do this?
Thanks in advance,
Zsolt
Comments
-
Zsolt,
Adding a point feature is the proper way to place text. Just use "No Symbol" as the symbol name to just place text with no symbol.
If you add a new-line character in your text name ('\n') this should cause multi-line text to be displayed.
You can change the drawing style of a loaded line feature using the GM_SetLineFeatureDrawStyle function.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hello Mike,
thanks for the reply!
Maybe my question wasn't unambiguous, but I've liked to know how can I set all the layers' attributes on a layer..:) I was able to modify only 1 layer's attributes at a time with this function.
I tried to look around for the proper finction, but unfortunately I haven't found it.
Could you help me and maybe provide me a little sample code or decription?
Thanks in advance,
Zsolt -
Zsolt,
If all of your features have the same type you can change the default drawing style for a type using the GM_SetLineFeatureClassDrawStyle function. Otherwise there is not a function to change the drawing style for all features in a layer with one call, you'll just need to loop through all of the features in the layer and edit the style. You can call GM_GetLayerInfo to get the number of area, line, and point features in a layer for setting up your loop.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
Categories
- 12.9K All Categories
- 5.7K Features Discussion
- 346 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 645 GM Script Language
- 54 User Scripts
- 115 GPS Features
- 419 Projection Questions
- 829 Raster Data
- 1.4K Vector Data
- 6.6K Support
- 180 Announcement and News
- 926 Bug Report
- 561 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 575 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 242 How I use Global Mapper
- 108 Global Mapper Forum Website