Interface IPin<TEvent, TMobile>

Type Parameters

  • TEvent extends string = PinEvents

  • TMobile extends MobileOSProps<IPinIOS, {}> = MobileOSProps<IPinIOS, {}>

Hierarchy

Properties

nativeObject: { [key: string]: any }

Type declaration

  • [key: string]: any
location: { latitude: number; longitude: number }

Type declaration

  • latitude: number
  • longitude: number
android: TMobile["android"]
ios: TMobile["ios"]
title: string
subtitle: string
color: IColor
id: number
image: null | IImage<any, MobileOSProps<ImageIOSProps, ImageAndroidProps>>
visible: boolean
isClusterEnabled: boolean
onInfoWindowPress: (() => void)

Type declaration

    • (): void
    • Deprecated

      Example

      import Pin from '@smartface/native/ui/mapview/pin';

      const pin = new Pin();
      pin.on(Pin.Events.InfoWindowPress, () => {
      console.info('onInfoWindowPress');
      });

      Returns void

Events

onPress: (() => void)

Type declaration

    • (): void
    • This event will be fired when the pin is touched.

      onPress

      Deprecated

      Android

      Ios

      Since

      1.1.2

      Example

      import Pin from '@smartface/native/ui/mapview/pin';

      const pin = new Pin();
      pin.on(Pin.Events.Press, () => {
      console.info('onPress');
      });

      Returns void

Methods

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    • eventName: "infoWindowPress"
    • callback: (() => void)

      Gets as any arguments as it needs

        • (): void
        • Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "press"
    • callback: ((state: object) => void)
        • (state: object): void
        • Parameters

          • state: object

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "press" | "infoWindowPress"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Removes the specified event and invokes the callback after it is removed

    Parameters

    • eventName: "infoWindowPress"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "press"
    • callback: ((state: object) => void)
        • (state: object): void
        • Parameters

          • state: object

          Returns void

    Returns void

  • Parameters

    • eventName: "press" | "infoWindowPress"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Triggers the event manually.

    Parameters

    • eventName: "infoWindowPress"

    Returns void

  • Parameters

    • eventName: "press"

    Returns void

  • Parameters

    • eventName: "press" | "infoWindowPress"
    • Rest ...args: any[]

    Returns void

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    • eventName: "infoWindowPress"
    • callback: (() => void)

      Gets as any arguments as it needs

        • (): void
        • Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "press"
    • callback: ((state: object) => void)
        • (state: object): void
        • Parameters

          • state: object

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "press" | "infoWindowPress"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    Parameters

    • eventName: "infoWindowPress"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "press"
    • callback: ((state: object) => void)
        • (state: object): void
        • Parameters

          • state: object

          Returns void

    Returns void

  • Parameters

    • eventName: "press" | "infoWindowPress"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Adds a one-time listener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    Parameters

    • eventName: "infoWindowPress"
    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "press"
    • callback: ((state: object) => void)
        • (state: object): void
        • Parameters

          • state: object

          Returns void

    Returns void

  • Parameters

    • eventName: "press" | "infoWindowPress"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

Generated using TypeDoc