API Docs for: 7.2
Show:

MQA.Icon Class

Module: MQA

Image object for the POI

Constructor

MQA.Icon

(
  • imageURL
  • [iWidth]
  • [iHeight]
  • [classAttr]
)

Parameters:

  • imageURL String

    The URL of the icon image.

  • [iWidth] Number optional

    The width of the image in pixels.

  • [iHeight] Number optional

    The height of the image in pixels.

  • [classAttr] String optional

    Data to be put in the class attribute of the object.

Example:

var poi = new MQA.Poi({ lat: 39.743943, lng: -105.020089 });
poi.setIcon(new MQA.Icon('http://www.mapquestapi.com/staticmap/geticon?uri=poi-green_1.png', 20, 29));

map.addShape(poi);

Properties

classAttr

String

Data to be put in the class attribute of the object.

height

Number

The height of the image in pixels.

imageURL

String

The URL of the icon image.

width

Number

The width of the image in pixels.

Methods

clone

() MQA.Icon

Creates and returns a new MQA.Icon with the same URL, width, and height.

Returns <MQA.Icon>

A clone of the MQA.Icon.

createElement

() HTMLElement

Create an element for the icon.

Returns <HTMLElement>

The image element.