Register  |  Login   Search
ThinkGeo - GPS Tracking and Mapping Solutions  |  Home  |  Cygnus Track  |  Developer Community
 
LivePerson Chat

Discussion Forums

The online community for users of Map Suite GIS components

Legend Control Operation
Last Post 12-11-2006 11:04 AM by ThinkGeo. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
GaryUser is Offline
Level 1
Level 1
Posts:8

--
12-04-2006 10:24 AM
I am using the Legend control and have some questions.

1. The general operation adds and removes posible layers from display as you zoom in and out of the map. Is there a way to control how this is presented so that I can see all layers at all times and not dependant on zoom level?
2. Can I get a list of capibilities for the Legend control?

3. I have a button that redraws the map to show new colors and layers as I add them. The button code looks like this:
(BUTTON CODE)
map1.Layers.Clear();
DoMap();

and DoMap looks like this:
(DoMap Code)
string DataPath = (@"C:\MapData\USA\");
map1.MapUnit = MapSuite.Geometry.MapLengthUnits.DecimalDegrees;
map1.Mode = MapSuite.DesktopEdition.ModeType.TrackZoomIn;
RenderUSA.ClsRenderMap Renderers = new RenderUSA.ClsRenderMap();
Renderers.LoadLayers(map1.Layers, DataPath);
map1.CurrentExtent = Renderers.GetDefaultExtent();
map1.CanvasColor = Renderers.GetDefaultCanvasColor();
legend1.LayerVisibilityControl = true;
legend1.Map = map1;
legend1.IconBackColor = Color.White;
map1.Refresh();

When I press the Button Code the first time the ledgend operates successfully. On the second press, the legend does not respond to the check box request to remove layers from the view.
Am I missing something?

Thanks,
Gary.

ThinkGeoUser is Offline
MVP
MVP
Posts:1591
Avatar

--
12-11-2006 11:04 AM

Gary,

Thanks for your post!

The legend control is only designed to show the layer that are currently available on the map, so seeing all the layers at one time is not currently possible, unless all the layers are showing on the map.

The best resource for the legends properties is the help file included with Map Suite.

Your button code looks good, but you need to refresh the legend using a RefreshLegend.

ThinkGeo Support

You are not authorized to post a reply.

Active Forums 4.1