bbbfly. MapBox class control

new bbbfly.MapBox (def, ref, parent)

Parameters

Name Type Description
def bbbfly.MapBox.Definition optional Descendant definition
ref object optional Reference owner
parent object | string optional Parent DIV element or it's ID

Properties

Name Type Default Description
MapControls bbbfly.MapBox.control none Set this property to allow desired map controls.
Drawings bbbfly.MapDrawingsHandler Drawings handler
DrawSingleIcon boolean false If map can contain max one icon
DrawSingleGeometry boolean false If map can contain max one geometry

Extends

In Packages

Interfaces

Members

static control enum integer

Possible values for bbbfly.Mapbox.MapControls
Name Type Default Description
none integer 0
copyrights integer 1
layers integer 2
drawBar integer 4
modeBar integer 8
sideBar integer 16
zoomSlider integer 32
drawMarker integer 64
drawGeometry integer 128

Methods

inherited AddChildControl (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Child control reference
See:

inherited AddLayer (def){boolean}

Add new map layer.
Parameters:
Name Type Description
def bbbfly.Map.Layer
See:
Returns:
Type Description
boolean - If layer was added

inherited AddLayers (defs){boolean}

Add new map layers.
Parameters:
Name Type Description
defs Array.<bbbfly.Map.Layer>
See:
Returns:
Type Description
boolean - If all layers were added

inherited CreateControl (def){object|null}

Parameters:
Name Type Description
def ngControl.Definition optional Child control definition
See:
Returns:
Type Description
object | null Created control
Create Leaflet layer wrapper.
Parameters:
Name Type Description
def bbbfly.Map.Layer
See:
Returns:
Type Description
bbbfly.Map.layer

inherited CreateMap (){object}

Create Leaflet map.
See:
Returns:
Type Description
object Leaflet Map

inherited DestroyMap (){boolean}

Destroy Leaflet map.
See:
Returns:
Type Description
boolean If map was destroyed

inherited DisposeControls ()

See:

inherited DoCreateMap (options){object}

Do reate Leaflet map from its options.
Parameters:
Name Type Description
options object Leaflet Map options
See:
Returns:
Type Description
object Leaflet Map

inherited DoGetLayerName (layer){string|null}

Get layer name for current language.
Parameters:
Name Type Description
layer bbbfly.Map.layer
Returns:
Type Description
string | null

inherited EnableAnimation (enable){boolean}

Enable or disable map animation.
Parameters:
Name Type Description
enable boolean
Returns:
Type Description
boolean If state has changed

inherited FitBounds (bounds, padding){boolean}

Pan and zoom map to fit certain bounds with padding.
Parameters:
Name Type Description
bounds mapBounds Bounds to fit
padding padding Padding between map edge and bounds
See:
Returns:
Type Description
boolean If fit was successful

inherited FitCoords (coords, padding){boolean}

Pan and zoom map to fit certain bounds with padding.
Parameters:
Name Type Description
coords mapPoint Coordinates to fit
padding padding Padding between map edge and coords
See:
Returns:
Type Description
boolean If fit was successful

FitDrawing (id){boolean}

Pan to see drawing
Parameters:
Name Type Description
id string
See:
Returns:
Type Description
boolean If fit was successful

FitDrawings (){boolean}

Pan and zoom to see all drawings
See:
Returns:
Type Description
boolean If fit was successful

inherited GetAlt (){string|null}

See:
Returns:
Type Description
string | null
Get all layers attributions.
See:
Returns:
Type Description
bbbfly.Map.attribution

inherited GetBoundsPadding (padding){padding}

Get map bounds padding.
Parameters:
Name Type Description
padding padding optional Bounds padding
See:
Returns:
Type Description
padding Bounds padding
Get map position.
See:
Returns:
Type Description
mapPoint | null Center point

inherited GetClassName (suffix){string}

Parameters:
Name Type Description
suffix string optional Control part class name
Returns:
Type Description
string Control class name

inherited GetControlsHolder (){object}

See:
Returns:
Type Description
object ControlsPanel control or self

inherited GetControlsPanel (){object|null}

See:
Returns:
Type Description
object | null ControlsPanel control

inherited GetFrame (){bbbfly.Renderer.frame}

Returns:
Type Description
bbbfly.Renderer.frame Frame definition

inherited GetFrameDims (){object}

Returns:
Type Description
object Frame dimensions

inherited GetFramePanel (){object|null}

See:
Returns:
Type Description
object | null FramePanel control
Get map layer.
Parameters:
Name Type Description
id string
See:
Returns:
Type Description
bbbfly.Map.layer

inherited GetLayerName (id){string|null}

Get layer name for current language.
Parameters:
Name Type Description
id string
Returns:
Type Description
string | null
Get map layers.
See:
Returns:
Type Description
Array.<bbbfly.Map.layer>

inherited GetMap (){object}

Get Leaflet map.
See:
Returns:
Type Description
object Leaflet Map

GetMapControls (type){Array.<bbbfly.MapControl>}

Get passed type linked map controls.
Parameters:
Name Type Default Description
type string undeUnlinkMapControlfined optional
See:
Returns:
Type Description
Array.<bbbfly.MapControl>

inherited GetMapLayerName (mapLayer){string|null}

Get map layer name for current language.
Parameters:
Name Type Description
mapLayer L.Layer
Returns:
Type Description
string | null

inherited GetMaxZoom (){number|null}

Get map maximal zoom level.
See:
Returns:
Type Description
number | null zoom - Zoom level

inherited GetMinZoom (){number|null}

Get map minimal zoom level.
See:
Returns:
Type Description
number | null zoom - Zoom level

GetMode (modeType){string|null}

Get map mode
Parameters:
Name Type Description
modeType string
See:
Returns:
Type Description
string | null

GetModes (){Array.<string>}

Get all map modes
See:
Returns:
Type Description
Array.<string>

inherited GetState (){bbbfly.Renderer.state}

Returns:
Type Description
bbbfly.Renderer.state Control state

inherited GetZoom (){number|null}

Get map zoom level.
See:
Returns:
Type Description
number | null zoom - Zoom level

LinkMapControl (type, ctrl){boolean}

Link map control to map.
Parameters:
Name Type Description
type string
ctrl bbbfly.MapControl
See:
Returns:
Type Description
boolean If control was linked

inherited RemoveChildControl (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Child control reference
See:

inherited RemoveLayer (id){boolean}

Remove map layer.
Parameters:
Name Type Description
id string
See:
Returns:
Type Description
boolean - If layer was removed

inherited RemoveLayers (ids){boolean}

Remove map layers.
Parameters:
Name Type Description
ids Array.<string> optional All layers will be removed if no ID is passed
See:
Returns:
Type Description
boolean - If all layers were removed

inherited SetAlt (alt, update)

Parameters:
Name Type Default Description
alt string | null Value to set
update boolean true optional If update control
See:

inherited SetBoundsPadding (padding){boolean}

Set map bounds padding.
Parameters:
Name Type Description
padding padding | px Bounds padding
See:
Returns:
Type Description
boolean If padding was set

inherited SetCenter (coords){boolean}

Set map position.
Parameters:
Name Type Description
coords mapPoint Center point
See:
Returns:
Type Description
boolean If center was set

SetDrawControlDrawing (drawing){boolean}

Set draw control geometry type
Parameters:
Name Type Description
drawing bbbfly.MapDrawingItem
Returns:
Type Description
boolean

inherited SetEnabled (enabled, update){boolean}

Parameters:
Name Type Default Description
enabled boolean true optional Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

inherited SetInvalid (invalid, update){boolean}

Parameters:
Name Type Default Description
invalid boolean true optional Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

inherited SetLayerVisible (id, visible){boolean}

Shows or hides map layer.
Parameters:
Name Type Description
id string
visible boolean
See:
Returns:
Type Description
boolean - If layer visibility was set

SetMapControlsVisible (type, visible){boolean}

Set visibility of passed type map controls.
Parameters:
Name Type Default Description
type string
visible boolean true optional
See:
Returns:
Type Description
boolean If map control visibility was set.

inherited SetMaxBounds (bounds){boolean}

Set maximal map bounds.
Parameters:
Name Type Description
bounds mapBounds | array Maximal bounds
See:
Returns:
Type Description
boolean If bounds were set

inherited SetMaxZoom (zoom){boolean}

Set maximal map zoom level.
Parameters:
Name Type Description
zoom number Zoom level
See:
Returns:
Type Description
boolean If zoom was set

inherited SetMinZoom (zoom){boolean}

Set minimal map zoom level.
Parameters:
Name Type Description
zoom number Zoom level
See:
Returns:
Type Description
boolean If zoom was set

SetMode (modeType, mode){string|null}

Set map mode
Parameters:
Name Type Description
modeType string
mode string | null
See:
Returns:
Type Description
string | null

inherited SetOverflow (overflowX, overflowY, update){boolean}

Parameters:
Name Type Default Description
overflowX bbbfly.Renderer.overflow hidden optional Horizontal value to set
overflowY bbbfly.Renderer.overflow hidden optional Vertical value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

inherited SetReadOnly (readonly, update){boolean}

Parameters:
Name Type Default Description
readonly boolean true optional Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

inherited SetSelected (selected, update){boolean}

Parameters:
Name Type Default Description
selected boolean true optional Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

inherited SetView (coords, zoom){boolean}

Set map position and zoom level.
Parameters:
Name Type Description
coords mapPoint Center point
zoom number Zoom level
See:
Returns:
Type Description
boolean If view was set

inherited SetZoom (zoom){boolean}

Set map zoom level.
Parameters:
Name Type Description
zoom number Zoom level
See:
Returns:
Type Description
boolean If zoom was set

StopDrawControlActions ()

Stop all draw control actions

inherited TrackChildControls ()

inherited TrackControl (ctrl, track)

Parameters:
Name Type Default Description
ctrl ngControl optional Tracked control reference
track boolean true optional Pass false to cancel tracking

UnlinkMapControl (type, ctrl){boolean}

Unlink map control from map.
Parameters:
Name Type Description
type string
ctrl bbbfly.MapControl
See:
Returns:
Type Description
boolean If control was unlinked

inherited ZoomIn (zoomBy){boolean}

Zoom map in.
Parameters:
Name Type Description
zoomBy number Number of zoom levels
See:
Returns:
Type Description
boolean If map was zoomed

inherited ZoomOut (zoomBy){boolean}

Zoom map out.
Parameters:
Name Type Description
zoomBy number Number of zoom levels
See:
Returns:
Type Description
boolean If map was zoomed

Events

inherited IsTrackedControlChanged (ctrl, options)

Parameters:
Name Type Description
ctrl ngControl optional Tracked control reference
options object optional Per tracker options
See:

inherited OnChildControlAdded (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Child control reference
See:

inherited OnChildControlRemoved (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Child control reference
See:

inherited OnEnabledChanged ()

See:

inherited OnInvalidChanged ()

See:

inherited OnLayersChanged ()

See:

OnModeChanged (modeType, mode)

Parameters:
Name Type Description
modeType string
mode string | null
See:

inherited OnOverflowChanged ()

See:

inherited OnReadOnlyChanged ()

See:

inherited OnSelectedChanged ()

See:

inherited OnSetAlt (alt, update){boolean}

Parameters:
Name Type Default Description
alt boolean Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnSetEnabled (enabled){boolean}

Parameters:
Name Type Description
enabled boolean Value to set
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnSetInvalid (invalid){boolean}

Parameters:
Name Type Description
invalid boolean Value to set
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnSetOverflow (overflowX, overflowY){boolean}

Parameters:
Name Type Description
overflowX bbbfly.Renderer.overflow optional Horizontal value to set
overflowY bbbfly.Renderer.overflow optional Vertical value to set
See:
Returns:
Type Description
boolean Return false to deny values change

inherited OnSetReadOnly (readonly){boolean}

Parameters:
Name Type Description
readonly boolean Value to set
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnSetSelected (selected){boolean}

Parameters:
Name Type Description
selected boolean Value to set
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnTrackedControlChanged (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Tracked control reference

inherited OnZoomChanged (zoom)

Parameters:
Name Type Description
zoom number Actual zoom level
See: