Class: LocationStrategy

lucid.maps.limbs.location. LocationStrategy

A strategy class for computing the location of target objects.The location of the target object is needed to determine the direction the object lies andthereby the placement of the LIMB at the edge of the map.For a 1 dimensional marker the location is trivial - it is the marker's position.For 2 dimensional shapes this strategy is used to derive a point from shape of the target object.This base class does nothing. Use one of the concrete sub-classes, e.g. BoundsEdgeLocationStrategyto choose your preferred algorithm.

new LocationStrategy(options)

Parameters:
Name Type Description
options lucid.maps.limbs.location.LocationStrategyOptions The options controlling the location calculation.
Source:

Methods

computeLocation(target, mapBounds) → {google.maps.LatLng}

Parameters:
Name Type Description
target google.maps.Marker | google.maps.Polyline | google.maps.Polygon | google.maps.Rectangle | google.maps.Circle The given target.
mapBounds google.maps.LatLngBounds The bounds of the current map view.
Source:
Returns:
The location of the target. The actual location will vary between different strategy classes.
Type
google.maps.LatLng

getMethodForTargetType(target) → {function}

Parameters:
Name Type Description
target google.maps.Marker | google.maps.Polyline | google.maps.Polygon | google.maps.Rectangle | google.maps.Circle The given target.
Source:
Returns:
The function that will compute the location for the type of target given.
Type
function