Icon
Extends:
Represents an icon to provide when creating a marker
Example:
var myIcon = new KQ.Struct.Icon({
iconUrl: '../../images/custom-marker.png',
iconSize: [ 25, 41 ],
iconAnchor: [ 13, 40 ],
shadowUrl: '../../images/marker-shadow.png',
shadowSize: [ 25, 41 ],
shadowAnchor: [ 8, 40 ],
});
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) Constructor |
Public Constructors
public constructor(options: Object) source
Constructor
Params:
Name | Type | Attribute | Description |
options | Object | Config params |
|
options.iconUrl | Object | The URL to the icon image |
|
options.iconSize | Object | Size of the icon image in pixels |
|
options.iconAnchor | Object | The coordinates of the "tip" of the icon (relative to its top left corner). The icon will be aligned so that this point is at the marker's geographical location. Centered by default if size is specified, also can be set in CSS with negative margins. |
|
options.popupAnchor | Object | The coordinates of the point from which popups will "open", relative to the icon anchor. |
|
options.shadowUrl | Object | The URL to the icon shadow image. If not specified, no shadow image will be created. |
|
options.shadowSize | Object | Size of the shadow image in pixels. |
|
options.shadowAnchor | Object | The coordinates of the "tip" of the shadow (relative to its top left corner) (the same as iconAnchor if not specified). |