Class: LimbFactory

lucid.maps.limbs. LimbFactory

A factory class for generating LIMBs.This class provides a slight performance gain by refreshing multiple LIMBs within a single event handler when the map moves.This also provides convenience methods for hiding/showing LIMBs as and when the map is hidden or shown.

new LimbFactory(map, defaultOptions)

Parameters:
Name Type Argument Description
map google.maps.Map The map that is displaying the LIMBs.
defaultOptions lucid.maps.limbs.LimbOptions <optional>
Default settings for each LIMB being created by this factory.
Source:

Methods

add(limb)

Get this factory to manage a LIMB.The LIMB should have its "independent" property set to false.If you don't have an instance of a LIMB, use the create method to create and add a new LIMB object.
Parameters:
Name Type Description
limb lucid.maps.limbs.Limb The LIMB to be managed by this factory.
Source:

create(markerOrOptions) → {lucid.maps.limbs.Limb}

Create a new LIMB and manage it.
Parameters:
Name Type Description
markerOrOptions lucid.maps.limbs.LimbOptions | google.maps.Marker Settings for the LIMB to be created. These settings will override the defaultOptions passed into the constructor. Or the Marker to be tracked by the LIMB.
Source:
Returns:
The LIMB that has been created.
Type
lucid.maps.limbs.Limb

destroyAll()

Destroy all the LIMBs in this collection.The LIMB will be removed from the page.
Source:

hide()

Temporarily hide the labels.This does not remove the LIMBs and targets, it just takes them off display.Call this if you hide the map element.
Source:

removeAll()

Remove all LIMBs from this collection.The LIMB will still exist, it just won't be managed by this container anymore.
Source:

show()

Re-display the labels after being hidden with a call to 'hide'.
Source: