maps.nyc.gov

Namespace: layer

nyc.ol.layer

Classes

BaseLayer
Group

Namespaces

plow
transit
zoning

Methods

(static) colorswap(event, beforeColors, afterColors, varianceopt)

An event handler for ol.layer.Layer#postcompose to re-render the layer in with colors swapped
Parameters:
Name Type Attributes Default Description
event ol.render.Event The event data from the ol.layer.Layer#postcompose event
beforeColors Array.<Array.<number>> The RGB values of the colors to replace
afterColors Array.<Array.<number>> The RGB values of the replacement colors
variance number <optional>
0 The variance for considering RGB values equal
Source:

(static) grayscale(event)

An event handler for ol.layer.Layer#postcompose to re-render the layer in grayscale
Parameters:
Name Type Description
event ol.render.Event The event data from the ol.layer.Layer#postcompose event
Source:

Type Definitions

Adds

Object type to hold the results of adding layers
Type:
  • Object
Properties:
Name Type Description
groupLayers Array.<ol.layer.Base> The layers added to the map
proxyLayers Array.<ol.layer.Vector> The layers proxy layers added to the map by {nyc.ol.style.mvt.proxyPointLayer}
allLayers Array.<ol.layer.Base> The groupLayers and the proxyLayers
tips Array.<ol.FeatureTip> The feature tips added to the map
Source: