XD\MapBox\MapBox
Class MapBox
- Author: Bram de Leeuw
Synopsis
class MapBox
extends Extension
{
- // members
- private static $style = NULL;
- private static $access_token = NULL;
- private static integer $zoom = 16;
- private static bool $fit_bounds_to_markers = false;
- private static $icon_options = NULL;
- private static array $map_options = ;
- private static array $tile_layer_options = ;
- // methods
- public void onAfterInit()
- public string mapID()
- private string getZoom()
- private static string access_token()
- private static string options_as_json()
- public string getMarkers()
Hierarchy
Extends
- SilverStripe\Core\Extension
Uses
- SilverStripe\Core\Config\Configurable
Members
private
-
$access_token
The map box access token - $fit_bounds_to_markers
—
XD\MapBox\bool
Fit the map bounds to show all set markers -
$icon_options
The Icon options Just follow the leaflet icon option syntax, the options array will be json encoded -
$map_options
The Map options Just follow the leaflet map option syntax, the options array will be json encoded -
$style
The map style to use - $tile_layer_options
—
array
The Tile layer options Just follow the leaflet map option syntax, the options array will be json encoded -
$zoom
The map box zoom level
Methods
private
- access_token() — Get the access token
- getZoom() — Get the zoom level
- options_as_json() — Get options as json
public
- getMarkers() — Get the icon options
- mapID() — Create a map ID
- onAfterInit()