Pin

Pin

longdo.PanoramaViewer.Pin

Constructor

new Pin(location, option)

Class represent a pin (marker) on panorama view
Parameters:
Name Type Description
location object Location object.
option object Panorama view options.

Methods

active() → {boolean}

Pin will be active when it is added to panorama view.
Returns:
Type:
boolean
Pin is added to panorama view

animation(_animation)

Set pin's animation. Pin's animation are one of longdo.PanoramaViewer.Animation.ANIMATE_XXX
Parameters:
Name Type Description
_animation Number A new animation code.

getOption() → {Object}

Return option when initializing this pin.
Returns:
Type:
Object
Initialization option.

icon(iconUrl) → {string|self}

Set pin icon
Parameters:
Name Type Description
iconUrl string
Returns:
  • Type:
    string
    Current url of icon.
  • Type:
    self

isValidPin() → {boolean}

Check whether this pin is a valid pin.
Returns:
Type:
boolean
Whether this pn is a valid pin.

label(_label) → {string|self}

Change label associates with this pin. Label will appear under pin's icon.
Parameters:
Name Type Description
_label string A new label
Returns:
  • Type:
    string
    Current label if a parameter is not set.
  • Type:
    self

location(_loc) → {Array.<object>|self}

Adjust pin's location
Parameters:
Name Type Description
_loc object A new location object
Returns:
  • Type:
    Array.<object>
    Current pin's coordinates if a parameter is not set.
  • Type:
    self
    .

offset(_offset)

Adjust pin's icon offset in percentage unit.
Parameters:
Name Type Description
_offset object New offset, for example {x:0, y:0}.

scale(_scale)

Adjust scale of an icon. 1 = 1x, 2 = 2x and so on.
Parameters:
Name Type Description
_scale float A new scale for this pin's icon