Draw a big, red point...
Hi,
I have a simple question, but I'm a little bit confused concerning the solution.
I'd like to draw one single point on a pre-loaded layer, and I thought the GM_AddPointToVectorLayer function could be good.
I gave some features for the point (throught GM_PointFeature_t), such as mColor and mPointSize, but I get every time only a little black point on the layer.
The GM_AddPointToVectorLayer function has a parameter to set the type of drawing style (default or own style) which is boolean - according to the help file. But when I run the program it claims for a Byte value.
The question is: what kind of value do I have to give this function, and do I have to set anything else in GM_PointFeature_t in order to get the desired big, red point?
Thanks in advance,
Zsolt
I have a simple question, but I'm a little bit confused concerning the solution.
I'd like to draw one single point on a pre-loaded layer, and I thought the GM_AddPointToVectorLayer function could be good.
I gave some features for the point (throught GM_PointFeature_t), such as mColor and mPointSize, but I get every time only a little black point on the layer.
The GM_AddPointToVectorLayer function has a parameter to set the type of drawing style (default or own style) which is boolean - according to the help file. But when I run the program it claims for a Byte value.
The question is: what kind of value do I have to give this function, and do I have to set anything else in GM_PointFeature_t in order to get the desired big, red point?
Thanks in advance,
Zsolt
Comments
-
The mColor and mPointSize values that you are referring to are in the font definition, so they apply to the text label for the point, not the symbol. You need to set the mSymbolName value to the name of the symbol to use. The symbol name should either exactly match one of the symbol names in Global Mapper, or be in one of the following forms:
o DOT_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o DOT_EMPTY_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o SQUARE_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o VERT_BAR_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o CROSS_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o DIAG_CROSS_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o STAR_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o STAR_EMPTY_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o TRIANGLE_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o TRIANGLE_EMPTY_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o DIAMOND_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
o DIAMOND_EMPTY_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
So to create a large red dot (size 10 pixels), use a symbol name of "DOT_CUSTOM_10_255_0_0".
The 'boolean' type in the SDK interface corresponds to a Byte value in VB.NET and C#. Using the built-in 'bool' type uses the wrong size value. Just set to 1 for TRUE and 0 for FALSE.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Mike,
first, thanks for the incredibly quick answer!..:)
You've solved the problem, now the function gives me the result I wished for. And, yes, I forgot to mention that I use the SDK in C#.
Thanks again!
Zsolt -
Hello Mike,
I'd like to use traingle points on my map, and I thought the TRIANGLE_CUSTOM_<SIZE>_<RED>_<GREEN>_<BLUE>
could be good.
But when I try to use anything else than the DOT_CUSTOM symbolName I always get only little black points on the map.
What did I do wrong?
How could I use one of the symbols from the list you sent me?
Thanks in advance,
Zsolt -
Zsolt,
Can you provide an exact symbol name that you are using that isn't working so that I can take a look?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hello Mike,
this is the code in my (C#) app:
GlobalMapperDLLWrapper.GM_PointFeature_t AccidentPoint = new GlobalMapperDLLWrapper.GM_PointFeature_t();
AccidentPoint.mPointStyle.mSymbolName = "TRIANGLE_CUSTOM_2_255_0_0";
I even can try with this:
AccidentPoint.mPointStyle.mSymbolName = "SQUARE_CUSTOM_2_255_0_0";
But I always get the same: dots.
Anyway where can I find information about the different symbols which is accepted in globalmapper? I haven't found anything..:// This is the reason why I tried to use the ones that you sent me in a previous answer.
Thanks!
Zsolt -
Zsolt,
I took a look at this and discovered there was a bug in decoding the custom symbol names so that all were coming in as a dot. I have placed a new SDK build with this fixed for you to use at http://www.globalmapper.com/developer/GlobalMapperSDK.zip.
You can find the list of all available built-in symbols on the Point Styles tab in the Configuration dialog of Global Mapper in the symbol drop-down list.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hello Mike,
First of thanks for the help!
I've downloaded the SDK and I've replaced all the files in my app's folder, but the result is the same: I always get dots..:( The size and the color can be changed, but the shape remains dot.
Secondly, thank you for the hint about the points' types, I've found them in the GlobMap app and I've found it useful! So now the "Diag Crosshair - Red" will do for awhile, but I would be very grateful if you could help me to find a solution for the custom types' problem!..:)
Thanks again,
Zsolt -
Zsolt,
Can you check the build time and date of the GlobalMapperInterface.dll that you are using? All now works fine for me. You should have a build date from November 11 around 10 AM.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hello Mike,
finally I've put the pieces together and everything is ok now.
Originally I placed the GlobalMapper.dll file into the bin/debug folder where the executable file was, but nothing changed in the symbol question when I replaced the old one with the new.
Then I dug into the Global MapperWrapper.cs and found a reference to the location of the dll, which was "../GlobalMapper.dll", so one folder above.
I placed the new dll there and now everything is ok.
Except one thing: even if I remove the dll from either locations my app runs and creates the maps... but this is an other story...
thanks for the help!
Zsolt
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website