org.moxieapps.gwt.highcharts.client
Class MapNavigation

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<MapNavigation>
      extended by org.moxieapps.gwt.highcharts.client.MapNavigation

public class MapNavigation
extends Configurable<MapNavigation>

TODO: HIGHMAPS A configurable class that represents the custom map mapNavigation options which can then be set on the chart via MapChart.setMapNavigation(MapNavigation) These options control the look and functionality of buttons that allow panning and zooming on a map. Example usage:


     map.setMapNavigation(new MapNavigation()
          .setEnabled(true)
          .setZoomInButton(new ButtonOptions()
              .setWidth(10)
           )
     );
 

Since:
1.7.0
Author:
cskowron@moxiegrouop.com (Cory Skowronek)

Nested Class Summary
static class MapNavigation.AlignTo
          An enumeration of supported 'alignTo' values, which can be passed to the method ButtonOptions#setAlignTo(org.moxieapps.gwt.highcharts.client.MapNavigation.AlignTo)
 
Constructor Summary
MapNavigation()
           
 
Method Summary
 MapNavigation setButtonOptions(org.moxieapps.gwt.highcharts.client.MapNavigation.ButtonOptions buttonOptions)
          Convenience method for setting the 'buttonOptions' option of the mapNavigation.
 MapNavigation setEnableButtons(boolean enableButtons)
          Convenience method for setting the 'enableButtons' option of the mapNavigation.
 MapNavigation setEnabled(boolean enabled)
          Convenience method for setting the 'enabled' option of the mapNavigation.
 MapNavigation setEnableDoubleClickZoom(boolean enableDoubleClickZoom)
          Convenience method for setting the 'enableDoubleClickZoom' option of the mapNavigation.
 MapNavigation setEnableDoubleClickZoomTo(boolean enableDoubleClickZoomTo)
          Convenience method for setting the 'enableDoubleClickZoomTo' option of the mapNavigation.
 MapNavigation setEnableMouseWheelZoom(boolean enableMouseWheelZoom)
          Convenience method for setting the 'enableMouseWheelZoom' option of the mapNavigation.
 MapNavigation setEnableTouchZoom(boolean enableTouchZoom)
          Convenience method for setting the 'enableTouchZoom' option of the mapNavigation.
 MapNavigation setZoomInButton(org.moxieapps.gwt.highcharts.client.MapNavigation.ButtonOptions buttonOptions)
          Convenience method for setting the 'zoomIn' button options of the mapNavigation.
 MapNavigation setZoomOutButton(org.moxieapps.gwt.highcharts.client.MapNavigation.ButtonOptions buttonOptions)
          Convenience method for setting the 'zoomOut' button options of the mapNavigation.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable
getOptions, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapNavigation

public MapNavigation()
Method Detail

setEnableButtons

public MapNavigation setEnableButtons(boolean enableButtons)
Convenience method for setting the 'enableButtons' option of the mapNavigation. Equivalent to:

     mapNavigation.setOption("enableButtons", false);
 
Whether to enable navigation buttons. By default it inherits the enabled setting.

Parameters:
enableButtons - Whether to enable navigation buttons.
Returns:
A reference to this MapNavigation instance for convenient method chaining.

setEnableDoubleClickZoom

public MapNavigation setEnableDoubleClickZoom(boolean enableDoubleClickZoom)
Convenience method for setting the 'enableDoubleClickZoom' option of the mapNavigation. Equivalent to:

     mapNavigation.setOption("enableDoubleClickZoom", false);
 
Enables zooming in on an area on double clicking in the map. By default it inherits the enabled setting.

Parameters:
enableDoubleClickZoom - Whether to enable zooming via double-clicks.
Returns:
A reference to this MapNavigation instance for convenient method chaining.

setEnableDoubleClickZoomTo

public MapNavigation setEnableDoubleClickZoomTo(boolean enableDoubleClickZoomTo)
Convenience method for setting the 'enableDoubleClickZoomTo' option of the mapNavigation. Equivalent to:

     mapNavigation.setOption("enableDoubleClickZoomTo", true);
 
Whether to zoom in on an area when that area is double clicked. Defaults to false.

Parameters:
enableDoubleClickZoomTo - Whether to zoom in on an area when that area is double clicked.
Returns:
A reference to this MapNavigation instance for convenient method chaining.

setEnableMouseWheelZoom

public MapNavigation setEnableMouseWheelZoom(boolean enableMouseWheelZoom)
Convenience method for setting the 'enableMouseWheelZoom' option of the mapNavigation. Equivalent to:

     mapNavigation.setOption("enableMouseWheelZoom", false);
 
Enables zooming by mouse wheel. By default it inherits the enabled setting.

Parameters:
enableMouseWheelZoom - Whether to enable zooming via the mouse wheel.
Returns:
A reference to this MapNavigation instance for convenient method chaining.

setEnableTouchZoom

public MapNavigation setEnableTouchZoom(boolean enableTouchZoom)
Convenience method for setting the 'enableTouchZoom' option of the mapNavigation. Equivalent to:

     mapNavigation.setOption("enableTouchZoom", false);
 
Whether to enable multitouch zooming. Note that if the chart covers the viewport, this prevents the user from using multitouch and touchdrag on the web page, so you should make sure the user is not trapped inside the chart. By default it inherits the enabled setting.

Parameters:
enableTouchZoom - Whether to enable multitouch zooming.
Returns:
A reference to this MapNavigation instance for convenient method chaining.

setEnabled

public MapNavigation setEnabled(boolean enabled)
Convenience method for setting the 'enabled' option of the mapNavigation. Equivalent to:

     mapNavigation.setOption("enabled", true);
 
Whether to enable map navigation. The default is not to enable navigation, as many choropleth maps are simple and don't need it. Additionally, when touch zoom and mousewheel zoom is enabled, it breaks the default behaviour of these interactions in the website, and the implementer should be aware of this.

Individual interactions can be enabled separately, namely buttons, multitouch zoom, double click zoom, double click zoom to element and mousewheel zoom.

Defaults to false.

Parameters:
enabled - Whether to enable map navigation.
Returns:
A reference to this MapNavigation instance for convenient method chaining.

setButtonOptions

public MapNavigation setButtonOptions(org.moxieapps.gwt.highcharts.client.MapNavigation.ButtonOptions buttonOptions)
Convenience method for setting the 'buttonOptions' option of the mapNavigation. Equivalent to:

     mapNavigation.setOption("buttonOptions", );
 

Parameters:
buttonOptions -
Returns:
A reference to this MapNavigation instance for convenient method chaining.

setZoomInButton

public MapNavigation setZoomInButton(org.moxieapps.gwt.highcharts.client.MapNavigation.ButtonOptions buttonOptions)
Convenience method for setting the 'zoomIn' button options of the mapNavigation. Equivalent to:

     mapNavigation.setOption("buttons/zoomIn", new ButtonOptions());
 
The individual options for the 'zoomIn' button. Properties for this button are normally inherited from those set via mapNavigation.setButtonOptions(), while individual options can be overridden. By default, the onclick, text, and y options are individual.

Parameters:
buttonOptions - A set of options for the zoomIn button.
Returns:
A reference to this MapNavigation instance for convenient method chaining.

setZoomOutButton

public MapNavigation setZoomOutButton(org.moxieapps.gwt.highcharts.client.MapNavigation.ButtonOptions buttonOptions)
Convenience method for setting the 'zoomOut' button options of the mapNavigation. Equivalent to:

     mapNavigation.setOption("buttons/zoomOut", new ButtonOptions());
 
The individual options for the 'zoomOut' button. Properties for this button are normally inherited from those set via mapNavigation.setButtonOptions(), while individual options can be overridden. By default, the onclick, text, and y options are individual.

Parameters:
buttonOptions - A set of options for the zoomOut button.
Returns:
A reference to this MapNavigation instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.