com.google.gwt.maps.client.maptypes
Class MapTypeStyler

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.maptypes.MapTypeStyler

public class MapTypeStyler
extends JavaScriptObject

A styler affects how a map's elements will be styled. Each MapTypeStyler should contain one and only one key. If more than one key is specified in a single MapTypeStyler, all but one will be ignored. For example: var rule = {hue: '#ff0000'}.

See MapTypeStyler API Doc


Constructor Summary
protected MapTypeStyler()
          A styler affects how a map's elements will be styled.
 
Method Summary
 double getGamma()
          gets Gamma.
 String getHue()
          gets Sets the hue of the feature to match the hue of the color supplied.
 boolean getInvertLightness()
          gets Inverts lightness.
 int getLightness()
          gets Lightness.
 int getSaturation()
          gets Saturation.
 String getVisibility()
          gets Visibility: Valid values: 'on', 'off' or 'simplifed'.
static MapTypeStyler newGammaStyler(double gamma)
          Create gamma styler.
static MapTypeStyler newHueStyler(String hue)
          Create a hue styler.
static MapTypeStyler newInvertLightnessStyler(boolean invertLightness)
          Create invert_lightness styler.
static MapTypeStyler newLightnessStyler(int lightness)
          Create lightness styler.
static MapTypeStyler newSaturationStyler(int saturation)
          Create saturation styler.
static MapTypeStyler newVisibilityStyler(String visibility)
          Create visibility styler.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapTypeStyler

protected MapTypeStyler()
A styler affects how a map's elements will be styled. Each MapTypeStyler should contain one and only one key. If more than one key is specified in a single MapTypeStyler, all but one will be ignored. For example: var rule = {hue: '#ff0000'}. use newInstance();

Method Detail

newHueStyler

public static final MapTypeStyler newHueStyler(String hue)
Create a hue styler.
Sets the hue of the feature to match the hue of the color supplied. Note that the saturation and lightness of the feature is conserved, which means that the feature will not match the color supplied exactly. Valid values: An RGB hex string, i.e. '#ff0000'.

Parameters:
hue - i.e. #445566

newGammaStyler

public static final MapTypeStyler newGammaStyler(double gamma)
Create gamma styler.
Modifies the gamma by raising the lightness to the given power. Valid values: Floating point numbers, [0.01, 10], with 1.0 representing no change.

Parameters:
gamma - [0.01,10]

newLightnessStyler

public static final MapTypeStyler newLightnessStyler(int lightness)
Create lightness styler.
Shifts lightness of colors by a percentage of the original value if decreasing and a percentage of the remaining value if increasing. Valid values: [-100, 100].

Parameters:
lightness - [-100,100]

newInvertLightnessStyler

public static final MapTypeStyler newInvertLightnessStyler(boolean invertLightness)
Create invert_lightness styler.
A value of true will invert the lightness of the feature while preserving the hue and saturation.

Parameters:
invertLightness -

newSaturationStyler

public static final MapTypeStyler newSaturationStyler(int saturation)
Create saturation styler.
Shifts the saturation of colors by a percentage of the original value if decreasing and a percentage of the remaining value if increasing. Valid values: [-100, 100].

Parameters:
saturation - [-100, 100]

newVisibilityStyler

public static final MapTypeStyler newVisibilityStyler(String visibility)
Create visibility styler.
Sets the visibility of the feature. Valid values: 'on', 'off' or 'simplifed'.

Parameters:
visibility - {'on'|'off'|'simplifed'}

getGamma

public final double getGamma()
gets Gamma. Modifies the gamma by raising the lightness to the given power. Valid values: Floating point numbers, [0.01, 10], with 1.0 representing no change.


getHue

public final String getHue()
gets Sets the hue of the feature to match the hue of the color supplied. Note that the saturation and lightness of the feature is conserved, which means that the feature will not match the color supplied exactly. Valid values: An RGB hex string, i.e. '#ff0000'.


getInvertLightness

public final boolean getInvertLightness()
gets Inverts lightness. A value of true will invert the lightness of the feature while preserving the hue and saturation.


getLightness

public final int getLightness()
gets Lightness. Shifts lightness of colors by a percentage of the original value if decreasing and a percentage of the remaining value if increasing. Valid values: [-100, 100].


getSaturation

public final int getSaturation()
gets Saturation. Shifts the saturation of colors by a percentage of the original value if decreasing and a percentage of the remaining value if increasing. Valid values: [-100, 100].


getVisibility

public final String getVisibility()
gets Visibility: Valid values: 'on', 'off' or 'simplifed'.



Copyright © 2011-2013 GWT Maps API V3. All Rights Reserved.