Marker

#include <bb/platform/geo/Marker>

To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesmaps

A visual representation of a location on a map.

Markers are designed to indicate a location's position. Examples of markers include push pins, arrows, or bullseyes. A marker is a fixed image: when the map is zoomed in or out, the marker stays the same screen size.

Since:

BlackBerry 10.0.0

Public Functions Index

Marker ()
Marker (const QString &iconUri, const QSize &iconSize, const QPoint &locCoord, const QPoint &captionCoord)
Marker (const Marker &src)
~Marker ()
Marker &operator= (const Marker &src)
booloperator== (const Marker &rhs) const
booloperator!= (const Marker &rhs) const
QStringiconUri () const
QStringabsoluteIconPath () const
voidsetIconUri (const QString &uri)
QSizeiconSize () const
voidsetIconSize (const QSize &iconSize)
QPointlocationCoordinate () const
voidsetLocationCoordinate (const QPoint &locCoord)
QPointcaptionTailCoordinate () const
voidsetCaptionTailCoordinate (const QPoint &captionCoord)

Public Functions

Marker ()

Creates a Marker instance.

Since:

BlackBerry 10.0.0

Marker (

Creates a Marker instance.

Since:

BlackBerry 10.0.0

Marker (

Copy constructor.

Parameters
src

The object from which to copy information.

Since:

BlackBerry 10.0.0

~Marker ()

Destructor.

Since:

BlackBerry 10.0.0

Marker & operator= (

Assignment operator.

Parameters
src

The object from which to copy information.

Since:

BlackBerry 10.0.0

bool operator== (

Equality operator.

Return:

true if all properties are equal.

Since:

BlackBerry 10.0.0

bool operator!= (

Inequality operator.

Return:

true if any property is different.

Since:

BlackBerry 10.0.0

QString iconUri ()

Returns the URL to the icon.

Return:

The URL to the icon, as set in setIconUri().

Since:

BlackBerry 10.0.0

QString absoluteIconPath ()

Returns the absolute path to the icon stated in setIconUri.

This operation returns an absolute path to the icon's location using a POSIX format. Thus, any "file://" or "asset:///" protocols have been resolved to local paths, and relative paths have been resolved.

This is a read-only property set through setIconUri().

Return:

The absolute path to the icon.

Since:

BlackBerry 10.2.0

void setIconUri (

Sets the URI location of its graphical icon resource.

If the image that the icon points to doesn't exist, or if it is an invalid image, then no marker is displayed on the map.

Parameters
uri

The path to the local icon. Paths can be absolute paths (eg: /usr/hmi/...), relative paths (relative to the application's root directory, eg: ./app/native/assets/...), file protocols (eg: file:///...) or asset protocols (eg: asset:///...).

Since:

BlackBerry 10.0.0

QSize iconSize ()

The size of the marker's icon.

Return:

The marker's icon size.

Since:

BlackBerry 10.0.0

void setIconSize (

Sets the size of the marker's icon.

Parameters
iconSize

The new size of the icon.

Since:

BlackBerry 10.0.0

QPoint locationCoordinate ()

The coordinates within the marker that overlay the actual location.

Examples include the point of a push-pin, the center of a bullseye, or the head of an arrow.

Return:

The coordinates within the marker that represent the location.

Since:

BlackBerry 10.0.0

void setLocationCoordinate (

Sets the coordinates within the marker that represents the location.

Parameters
locCoord

The new coordinates within the marker.

Since:

BlackBerry 10.0.0

QPoint captionTailCoordinate ()

The coordinates within the marker where the caption bubble's tail should point to.

Return:

The point within the icon where the caption bubble can safely point to.

Since:

BlackBerry 10.0.0

void setCaptionTailCoordinate (

Sets the coordinates within the marker where the caption bubble's tail should point to.

Parameters
captionCoord

The point within the icon where the caption bubble can safely point to.

Since:

BlackBerry 10.0.0