Global

Members

checkedToggleLayers

Toggle the legends in the layer tree when the layers are turned on
Source:

RulerControl

Fires map `ruler.on` and `ruler.off`events at the beginning and at the end of measuring.
Source:

Methods

addIEPolyfills(event, params) → {function}

Function to add polyfills for IE
Parameters:
Name Type Description
event string name of event to be fired
params object event parameters {bubbles: false, cancelable: false, detail: undefined}
Source:
Returns:
CustomEvents(event, params)
Type
function

cozSidebarToggleControl(map)

Custom Mapbox control to toggle the sidebar with hard-coded div ids and classes
Parameters:
Name Type Description
map object mapbox map object
Source:

createStory(map, geojson, storyId)

Create a story map using a GeoJSON in Mapbox GL JS
Parameters:
Name Type Description
map object mapbox map object
geojson json GeoJSON with TITLE and INFO fields
storyId element id of element where to create the story
Source:

genId(length)

genId Generate an ID of x length, NOT IN USE
Parameters:
Name Type Description
length Number
Source:

getJSON(url, successHandler)

getJSON request function to use instead of fetch
Parameters:
Name Type Description
url string
successHandler function
Source:

getLayers(map)

Returns all the current map layers in an array
Parameters:
Name Type Description
map *
Source:

getParent(el, cls)

Parameters:
Name Type Description
el element html dom element
cls string string classname
Source:

getQuery(q)

Parameters:
Name Type Description
q object
Source:

hasLayer(map, layer)

Check if a Mapbox GL JS map has a layer id in its current style
Parameters:
Name Type Description
map object Mapbox GL map
layer string string name of the layer id
Source:

highlight(map, feature, options)

Highlight features by adding a colored outline or circle-color to the a new layer with the same source as the clicked feature
Parameters:
Name Type Description
map *
feature *
options *
Source:

highlightAddFeature(map, feature, highlightOnly)

Parameters:
Name Type Description
map *
feature *
highlightOnly *
Source:

highlightClearFeature(e)

Parameters:
Name Type Description
e *
Source:

highlightLayerPaint(type)

Parameters:
Name Type Description
type *
Source:

highlightReset(map, filter, ext)

clear highlted features on the map
Parameters:
Name Type Description
map *
filter string
ext string
Source:

mapAddLayers(map, layers)

Parameters:
Name Type Description
map *
layers object an object containing the layers for the map
Source:

mapCheckRendered(map)

function to check if map is done rendering, make sure to call after all layers are added This does not seem to work as well as the mapCheckLoading script
Parameters:
Name Type Description
map *
Source:

mapGetInfo(map, e, feature, fn, hidePopup)

Too complicated map popup function
Parameters:
Name Type Description
map *
e *
feature *
fn *
hidePopup *
Source:

mapillaryLayers(options)

these options are supplied in the global config object of the plugin
Parameters:
Name Type Description
options * abject with a mapillary userKey and panamoramic boolean option 1 or 0
Source:

mapMeasureControl(map)

Custom Mapbox measure control
Parameters:
Name Type Description
map object mapbox map object
Source:

mapSelectOnLoad(map)

Select features on map load
Parameters:
Name Type Description
map *
Source:

showBoundingBox(map, bbox)

Use this to show the bounding box for debug purposes
Parameters:
Name Type Description
map * instance of Mapbox map object
bbox * bounding box
Source:

streetViewIcon()

returns a material design street view svg icon
Source:

updateQueryStringParam(key, value)

Update url parameters with a key and value pair
Parameters:
Name Type Description
key string
value string
Source: