I just created a .NET wrapper project to manage all functions of MapViewer ActiveX control.
Now I try to figure out how to manage redline colors and fills correctly. And I'm in trouble.
I would like to set color, fill color, and is filled properties. Since there is no such methods I tried to combine available functions:
I also wrote a method to get this values in .NET System.Drawing.Color format. It all works fine, I successfully get and set this color/transparency values.
Now I would like to create 2 more method:
Its not so easy, since there is no properties such as ZoomAreaFillColor and ZoomAreaFilled.
I found a property ActiveElementFillColor but there is no any documentation for that. So I don't know if it accepts TBGR or just BGR value?
On the other side when I create new element by calling StartCommand method I couldn't set if new element is filled. And there is no any global settings for that. I found in API there is a functions to create elements programmatically. These functions accept isfilled argument like CreatePolygonElement (points, isFilled) but when I start element creation by start a command I don't know how should I set IsFilled?
ps.: Is there a GWP SDK for v08.11.09.028? I currently use MapViewerApiReference for v08.11.07.430 but I use GWP v08.11.09.028.
See the following property and method description. The Geo Web Publisher SDK should be available soon on SELECT download.
A read/write integer that specifies the fill color to be assigned to subsequently created editable overlay (redline) shapes. Changing the active fill color has no effect on previously created elements.
The value encodes alpha, color's red, green, and blue components in TBGR order. For example, 0x7D0000FF specifies semi-translucent red, while 0x0FF00000 specifies opaque blue.
For legacy reasons, ActiveElementColor sets both outline and fill color. Although, the first call to ActiveElementFillColor will prevent any next ActiveElementColor calls to modify the fill color.
SetCommandIntOption (commandID, option, value)
Sets a command option.
Thank you for your answer! The SetCommandIntOption was exactly what I needed.
But after a quick test I found a bug in this method. Just call it 2 times with same parameters. It throws an exception. I tested:
SetCommandIntOption(317,1,2); //SUCCESS
SetCommandIntOption(317,1,2); //EXCEPTION: The value out of the expected range.
ps.: Error message may different because I translated it from hungarian.