This library is used to make Markers
whose appearance can be customized by setting properties. For examples of how to use this library see the examples page.
This class extends Marker
.
This class is a Marker
with an additional option to set a StyleIcon
.
Constructor | Description |
---|---|
StyledMarker(styledMarkerOptions:StyledMarkerOptions) |
Creates a StyledMarker that can be added to the map. This is a Marker and has all the properties and methods of a normal Marker . For a complete reference on the available options see StyledMarkerOptions |
Property | Type | Description |
---|---|---|
styleIcon |
StyledIcon |
The StyledIcon associated with this Marker . |
This class represents optional arguments to the StyledMarker constructor. It has no constructor but is instantiated as an object literal. It is an extension of MarkerOptions
and has all the same properties with the addition of the below.
Property | Type | Description |
---|---|---|
styleIcon |
StyledIcon |
The StyledIcon to associate with this Marker . |
This class extends MVCObject
.
This class is applied to a StyledMarker
to set up its appearance. Any change to the StyledIcon's
properties will affect all StyledMarkers
it's been applied to.
Constructor | Description |
---|---|
StyledIcon(styledIconType:StyledIconType, |
Creates a StyledIcon that can be applied to a StyledMarker or to another StyledIcon as a StyleClass . A StyledIcon applied as a StyleClass will automatically update, when its properties are changed, all StyledIcons that set it as their StyleClass . If you're creating a StyledIcon as a class pass StyledIconTypes.CLASS to StyledIconType . |
Method | Return Value | Description |
---|---|---|
set(name:String,value:Object) |
None |
Sets a given style property to the given value. Any Markers using this StyledIcon will be automatically updated. |
get(name:String) |
Object |
Returns a given style property |
getType() |
StyledIconType |
Returns the StyledIconType associated with the StyledIcon . |
This class represents optional arguments to the StyledIcon
constructor. It has no constructor but is instantiated as an object literal. Its properties are variable and depend on what StyledIconType
is passed to the StyledIcon
constructor.
This is an enum of StyledIconType
that can be passed to a StyledIcon
constructor.
Property | Type | Description |
---|---|---|
defaults |
MARKER |
Resembles a default Marker . Can alter color, have an optional character or two placed within it, or a have a star on its corner. |
defaults |
BUBBLE |
Resembles a small InfoWindow with a single line of text. Can alter color or have a string of text placed in it. |
This class has no properties of its own. Pass this to StyledIconType
when creating a StyledIcon
to use as a StyleClass
.
Properties for StyledIconTypes.MARKER
. Pass any of these to StyledIconOptions
when using this type.
Property | Type | Description |
---|---|---|
text |
String |
Text that will appear within the Marker . Limited to 2 characters. |
color |
String |
The color of the Marker . |
fore |
String |
The color of any text appearing within the Marker . |
starcolor |
String |
The color of the star on the Marker . If this is null or omitted then no star will appear. |
Properties for StyledIconTypes.BUBBLE
. Pass any of these to StyledIconOptions
when using this type.
Property | Type | Description |
---|---|---|
text |
String |
A string of text that will appear within the Marker . |
color |
String |
The color of the Marker . |
fore |
String |
The color of any text appearing within the Marker . |
This class holds functions for building the information needed to style markers and is used by StyledIcon
. It has no constructor but is instantiated as an object literal. Implement this class if you want to use a custom style type. The properties set in the default
property are the properties used in StyledIconOptions
.
Property | Type | Description |
---|---|---|
defaults |
StyledIconOptions |
The properties and their defaults used by this StyledIconType . |
Method | Return Value | Description |
---|---|---|
getURL(icon:StyledIcon) |
String |
Returns the URL to an image to be used by the StyledMarker icon. StyledIcon will call this when necessary. |
getShadowURL(icon:StyledIcon) |
String |
Returns the URL to an image to be used by the StyledMarker shadow. StyledIcon will call this when necessary. |
getAnchor(icon:StyledIcon,width:Number,height:Number) |
Point |
Returns a Point that indicates the point on the image where the StyledMarker is placed on the Map . StyledIcon will call this when necessary. |
getShadowAnchor(icon:StyledIcon,width:Number,height:Number) |
Point |
Returns a Point that indicates the point on the shadow image where the StyledMarker's shadow is placed on the Map . StyledIcon will call this when necessary. |
getShape(icon:StyledIcon,width:Number,height:Number) |
MarkerShape |
Returns a MarkerShape that indicates where the StyledMarker is clickable. StyledIcon will call this when necessary. |