public class MarkerImage extends JavaScriptObject
Modifier | Constructor and Description |
---|---|
protected |
MarkerImage()
A structure representing a Marker icon or shadow image.
|
Modifier and Type | Method and Description |
---|---|
Point |
getAnchor()
gets The position at which to anchor an image in correspondance to the location of the marker on the map.
|
Point |
getOrigin()
gets The position of the image within a sprite, if any.
|
Size |
getScaledSize()
gets The size of the entire image after scaling, if any.
|
Size |
getSize()
gets The display size of the sprite or image.
|
String |
getUrl()
gets The URL of the image or sprite sheet.
|
static MarkerImage |
newInstance(String url)
creates A structure representing a Marker icon or shadow image.
|
static MarkerImage |
newInstance(String url,
Size size)
creates A structure representing a Marker icon or shadow image.
|
static MarkerImage |
newInstance(String url,
Size size,
Point origin)
creates A structure representing a Marker icon or shadow image.
|
static MarkerImage |
newInstance(String url,
Size size,
Point origin,
Point anchor)
creates A structure representing a Marker icon or shadow image.
|
static MarkerImage |
newInstance(String url,
Size size,
Point origin,
Point anchor,
Size scaledSize)
creates A structure representing a Marker icon or shadow image.
|
void |
setAnchor(Point anchor)
sets The position at which to anchor an image in correspondance to the location of the marker on the map.
|
void |
setOrigin(Point origin)
sets The position of the image within a sprite, if any.
|
void |
setScaledSize(Size scaledSize)
sets The size of the entire image after scaling, if any.
|
void |
setSize(Size size)
sets The display size of the sprite or image.
|
void |
setUrl(String url)
sets The URL of the image or sprite sheet.
|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
protected MarkerImage()
public static final MarkerImage newInstance(String url)
url
- The URL of the image or sprite sheet.MarkerImage
public static final MarkerImage newInstance(String url, Size size)
url
- The URL of the image or sprite sheet.size
- The display size of the sprite or image. When using sprites, you must specify the sprite size. If the size is not provided, it will be set when the image loads.MarkerImage
public static final MarkerImage newInstance(String url, Size size, Point origin)
url
- The URL of the image or sprite sheet.size
- The display size of the sprite or image. When using sprites, you must specify the sprite size. If the size is not provided, it will be set when the image loads.origin
- The position of the image within a sprite, if any. By default, the origin is located at the top left corner of the image (0, 0).MarkerImage
public static final MarkerImage newInstance(String url, Size size, Point origin, Point anchor)
url
- The URL of the image or sprite sheet.size
- The display size of the sprite or image. When using sprites, you must specify the sprite size. If the size is not provided, it will be set when the image loads.origin
- The position of the image within a sprite, if any. By default, the origin is located at the top left corner of the image (0, 0).anchor
- The position at which to anchor an image in correspondance to the location of the marker on the map. By default, the anchor is located along the center point of the bottom of the image.MarkerImage
public static final MarkerImage newInstance(String url, Size size, Point origin, Point anchor, Size scaledSize)
url
- The URL of the image or sprite sheet.size
- The display size of the sprite or image. When using sprites, you must specify the sprite size. If the size is not provided, it will be set when the image loads.origin
- The position of the image within a sprite, if any. By default, the origin is located at the top left corner of the image (0, 0).anchor
- The position at which to anchor an image in correspondance to the location of the marker on the map. By default, the anchor is located along the center point of the bottom of the image.scaledSize
- The size of the entire image after scaling, if any. Use this property to stretch/shrink an image or a sprite.MarkerImage
public final void setAnchor(Point anchor)
anchor
- public final Point getAnchor()
public final void setOrigin(Point origin)
origin
- public final Point getOrigin()
public final void setScaledSize(Size scaledSize)
scaledSize
- public final Size getScaledSize()
public final void setSize(Size size)
size
- public final Size getSize()
public final void setUrl(String url)
url
- public final String getUrl()
Copyright © 2011-2013 Gone Vertical LLC. All Rights Reserved.