interface MapboxMarker {
    android?: any;
    icon?: string;
    iconPath?: string;
    id?: any;
    ios?: any;
    lat: number;
    lng: number;
    onCalloutTap?: Function;
    onTap?: Function;
    selected?: boolean;
    subtitle?: string;
    title?: string;
    update?: ((newSettings) => void);
}

Hierarchy (view full)

Properties

android?: any
icon?: string

Prefix with 'res://' and load a file from the resources folder. Details on how 'res://' is used can be found here: https://docs.nativescript.org/ui/images#load-images-from-resource Example: "res://icon.file"

iconPath?: string

The preferred way is using the 'icon' property, but you can still reference a local file directly. Example: "~/assets/markers/green_pin_marker.png"

id?: any

Set this in case you want to later pass it to 'removeMarker'.

ios?: any
lat: number
lng: number
onCalloutTap?: Function

A callback function to invoke when the callout (popup) of this marker is tapped.

onTap?: Function

A callback function to invoke when the marker is tapped.

selected?: boolean

Set to true to select the marker when rendered - effectively showing any configured callout. Note that only 1 callout will be shown at any time on a Mapbox map. Default false.

subtitle?: string
title?: string
update?: ((newSettings) => void)

Type declaration

    • (newSettings): void
    • Parameters

      Returns void