Class IWIcon

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

IWIcon(url, hotspot, size)

Method Detail

getHotspot

IWPoint getHotspot()

getSize

IWSize getSize()

getUrl

String getUrl()

setHotspot

void setHotspot(hotspot)

setSize

void setSize(size)

setUrl

void setUrl(url)

toString

String toString()

Event Detail

update

void update()

Source-Code Copyright 2007-2016 infoware GmbH - Documentation generated on Tue Nov 29 2022 14:20:15 GMT+0100 (MEZ)