Help us translate this website and improve this translation and earn free licenses!
Anonymous user  |  Log in  |  Create Account

How to...

Hierarchical Map Type Control

The GHierarchicalMapTypeControl is a new control to show the map types.

It's goal is show the information in the hierarchical way we configure (Although it has a good configuration by default).

We will add GHierarchicalMapTypeControlRelation to the GHierarchicalMapTypeControl .

The GHierarchicalMapTypeControlRelation has the next properties:
  • parentType: the parent mapType.
  • childType: the child mapType.
  • childText: the text of the childType.
  • isDefault: set if it's active by default.





Code.aspx
<cc1:GMap ID="GMap1" runat="server" />
Code.aspx.cs
GMap1.addMapType(GMapType.GTypes.Physical);

GHierarchicalMapTypeControl hierarchicalMapTypeControl = new GHierarchicalMapTypeControl();

hierarchicalMapTypeControl.clearPreviousRelationShips = true;
hierarchicalMapTypeControl.hierarchicalMapTypeControlRelations.Add(
    new GHierarchicalMapTypeControlRelation(GMapType.GTypes.Normal, GMapType.GTypes.Physical, "Subgurim Physical", false));
hierarchicalMapTypeControl.hierarchicalMapTypeControlRelations.Add(
    new GHierarchicalMapTypeControlRelation(GMapType.GTypes.Satellite, GMapType.GTypes.Hybrid, "Subgurim Hybrid", false));

GMap1.gHierarchicalMapTypeControl = hierarchicalMapTypeControl;
Powered by Subgurim.NET