The prefabricated controls are those provided by Google by default. With ASP.NET it is very easy to add them to our map. To do it you need
GControl.
You need to initialize the GControl with the enumerator element GControl.preBuilt (see sample code). There are 6 types of GControl.preBuilt:
- GControl.preBuilt.MapTypeControl: allows you to choose different types of maps (satellite, hybrid, physical...)
- GControl.preBuilt.MenuMapTypeControl: allows you to choose different types of maps in a dropdownlist way.
- GControl.preBuilt.HierarchicalMapTypeControl: allows you to choose different types of maps in a hierarchical menu.
- GControl.preBuilt.SmallMapControl: adds four navigating arrows for the map, and two buttons to zoom in and to zoom out.
- GControl.preBuilt.LargeMapControl: adds four navigating arrows for the map, and two buttons to zoom in and to zoom out as well as a bar to choose the level of zoom.
- GControl.preBuilt.SmallZoomControl: buttons to increase or reduce the zoom
- GControl.preBuilt.ScaleControl: marks the scale of the map.
- GControl.preBuilt.GOverviewMapControl: adds a smaller map (which you can minimize) that allows you to navigate the actual map from a larger perspective.
- GControl.preBuilt.LargeMapControl3D: creates a new 3D-style control with buttons to pan in four directions, and zoom in and zoom out, and a zoom slider.
- GControl.preBuilt.SmallZoomControl3D: creates a new 3D-style control with buttons to zoom in and zoom out.
- GControl.preBuilt.NavLabelControl:Creates a dynamic "breadcrumb" label indicating the address of the current viewport as a series of nested address components. This control additionally provides navigation links to each of the individual address subcomponents.
Besides the GControl.preBuilt, the GControl allows you to move in four possible directions using the
position property of the type
GControlPosition. See examples for more detail. The four directions are accessible from the enumeratior GControlPosition.position and they are:
- Top_Right: Top Right.
- Top_Left: Top Left.
- Bottom_Right: Bottom Right.
- Bottom_Left: Bottom Left.