SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A class representing an icon which can be placed on the map in an overlay (e.g. IWMarker
).
The icon is defined by an URL, hotspot and size.
The hotspot defines a pixel position in the icon (relative to the upper left corner) which is placed at the coordinate of the overlay. When using a circle with a symbol in the center, the hotspot should be the center of the icon. If you use a symbol like a pushpin instead, the hotspot should point to the needle of the pushpin.
Constructor Summary | |
IWIcon(url, hotspot, size)
Creates a new icon. |
Method Summary | |
IWPoint
|
getHotspot()
Returns the hotspot of the image. |
IWSize
|
getSize()
Returns the size of the image in pixel. |
String
|
getUrl()
Returns the URL of the image. |
void
|
setHotspot(hotspot)
Sets the hotspot of the image. |
void
|
setSize(size)
Sets the size of the image in pixel. |
void
|
setUrl(url)
Sets the URL of the image. |
String
|
toString()
Returns a string representation of this icon. |
Event Summary | |
void
|
update()
The update event is fired when properties like URL or hotspot of an icon change. Register an event listener with IWEventManager.addListener(yourIcon, 'onupdate', yourHandlerMethod(event)); to receive this event. |
Constructor Detail |
IWIcon(url, hotspot, size)
String url
- an absolute URL to the image
IWPoint hotspot
- the hotspot (optional, defaults to 0,0)
IWSize size
- the size of the image in pixels
Method Detail |
IWPoint getHotspot()
IWPoint
IWSize getSize()
IWSize
String getUrl()
String
void setHotspot(hotspot)
IWPoint hotspot
void
void setSize(size)
IWSize size
- the size of the image in pixel
void
void setUrl(url)
String url
- an absolute URL to the image
void
String toString()
String
Event Detail |
void update()
Register an event listener with IWEventManager.addListener(yourIcon, 'onupdate', yourHandlerMethod(event)); to receive this event.
void