Class: LabelPlaces

lucid.maps.places. LabelPlaces

Searches for places and adds labels (Marker and Limb) to a map.This class uses the google.maps.places.PlacesService to find placesand displays them using a lucid.maps.limbs.LimbMarkerFactory.This logic can optionally be synchronised to a button (lucid.maps.places.LabelPlacesButton).

new LabelPlaces(options)

Parameters:
Name Type Description
options lucid.maps.places.LabelPlacesOptions Configuration for the labelling of places.
Source:

Methods

addPlaces()

Add places to the map.The Google PlacesService will be called to find the places to show. The locationsreturned are then marked on the map with a Marker and a LIMB.You can remove the labels with a call to 'removePlaces'.
Source:

getNumberOfPlaces() → {number}

Source:
Returns:
The total number of places being labelled (includes any labels currently being hidden).
Type
number

hide()

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

removePlaces()

Remove places from the map.
Source:

setPlaceTypes(types)

Set the type(s) of place this instance searches for.
Parameters:
Name Type Description
types string[] A list of Google places types.
Source:

show()

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

Events

post_add_labels

Raised after labels have been added to the map.
Type:
  • object
Source:

post_remove_labels

Raised after labels have been removed from the map.
Type:
  • object
Source:

pre_add_labels

Raised before new places are labelled on the map.
Type:
  • object
Source:

pre_remove_labels

Raised before removing place labels from the map.
Type:
  • object
Source: