Global

Members

(constant) gulp

Created by gavorhes on 5/10/2016. Helpers functions for gulp tasks
Source:

offsetMinutes :number

The GMT offset time in minutes
Type:
  • number
Source:

Methods

bundleEs2015Multiple(fileArray, production) → {*}

make multiple bundles
Parameters:
Name Type Description
fileArray Array.<Array.<string>> array with elements [input file, output file]
production boolean if is production
Source:
Returns:
output stream
Type
*

dateToYyyyMmDdHh000(dte) → {string}

Given a date return a string in the format YYYYmmdd_hh0000
Parameters:
Name Type Description
dte Date the input date
Source:
Returns:
the formatted date string
Type
string

dateToYyyyMmDdHhMmSs(dte) → {string}

Given a date return a string in the format YYYY-mm-dd hh:MM:SS
Parameters:
Name Type Description
dte Date to convert
Source:
Returns:
the formatted date string
Type
string

definedAndNotNull(input) → {boolean}

check if the input is defined and not null
Parameters:
Name Type Description
input * input pointer
Source:
Returns:
true defined and not null
Type
boolean

defineLegend(itsIconopt, itsLineStyleopt, itsIconConfigopt, itsLineConfigopt) → {string}

Parameters:
Name Type Attributes Description
itsIcon string <optional>
the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/
itsLineStyle object <optional>
A single line style
Properties
Name Type Attributes Default Description
color string the line color as rgb or hex
width number <optional>
5 the line width
itsIconConfig object <optional>
The icon subtype configuration
Properties
Name Type Attributes Default Description
prop string The property used to define icon attribute symbolization
defaultName string The default name to be used if no other match is found
defaultIcon string The default icon to be used for no other matches
iconArray object <optional>
[] an array, items with format [property, name, img]
itsLineConfig object <optional>
The property used to define icon attribute symbolization
Properties
Name Type Attributes Default Description
prop string The property used to define icon attribute symbolization
defaultName string <optional>
Other The default name to be used if no other match is found
defaultColor string <optional>
red The default line color to be used for no other matches
defaultWidth number <optional>
5 The default line width to be used for no other matches
lineArray object <optional>
[] an array, items with format [property, name, color, optional width]
Source:
Returns:
html to be added to the legend
Type
string

defineStyle(itsIconopt, itsLineStyleopt, itsIconConfigopt, itsLineConfigopt) → {*}

Parameters:
Name Type Attributes Description
itsIcon string <optional>
the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/
itsLineStyle object <optional>
A single line style
Properties
Name Type Attributes Default Description
color string the line color as rgb or hex
width number <optional>
5 the line width
itsIconConfig object <optional>
The icon subtype configuration
Properties
Name Type Attributes Default Description
prop string The property used to define icon attribute symbolization
defaultName string The default name to be used if no other match is found
defaultIcon string The default icon to be used for no other matches
iconArray object <optional>
[] an array, items with format [property, name, img]
itsLineConfig object <optional>
The property used to define icon attribute symbolization
Properties
Name Type Attributes Default Description
prop string The property used to define icon attribute symbolization
defaultName string <optional>
Other The default name to be used if no other match is found
defaultColor string <optional>
red The default line color to be used for no other matches
defaultWidth number <optional>
5 The default line width to be used for no other matches
lineArray object <optional>
[] an array, items with format [property, name, color, optional width]
Source:
Returns:
undefined, style, or style function
Type
*

hexAlphaToRgbOrRgba(hexString, alphaValopt) → {string}

Convert hex string to RGB or RGBA string
Parameters:
Name Type Attributes Description
hexString string hex color string
alphaVal number <optional>
Alpha value
Source:
Returns:
- rgb or rgba color
Type
string

htmlEscape(str) → {string}

escape html charcters
Parameters:
Name Type Description
str string input string
Source:
Returns:
escaped string
Type
string

keyValPairs(obj) → {Array.<keyValuePair>}

iterate over the key value pairs of an object
Parameters:
Name Type Description
obj object the input object
Source:
Returns:
- array of key value pairs
Type
Array.<keyValuePair>

makeBlueGreenRedGradient(minVal, maxVal, flipColors) → {colorLookupByNumber}

Make a blue green red gradient
Parameters:
Name Type Description
minVal number minimum value
maxVal number maximum value
flipColors boolean if the colors should be flipped
Source:
Returns:
color lookup function
Type
colorLookupByNumber

makeBlueGreenRedGradientZScore(median, stdDev, flipColors) → {colorLookupByNumber}

Create a function that will return colors based on a gradient
Parameters:
Name Type Description
median number median value
stdDev number standard deviation
flipColors boolean if the colors should be flipped
Source:
Returns:
color lookup function
Type
colorLookupByNumber

makeFeatureServiceLegendAndSymbol(esriResponse) → {styleAndLegend}

Parameters:
Name Type Description
esriResponse object layer info
Source:
Returns:
style and legend object
Type
styleAndLegend

makeGuid() → {string}

guids are used to uniquely identify groups and features
Source:
Returns:
a new guid
Type
string

makeMapServiceLegend(esriResponse) → {string}

make map service legent
Parameters:
Name Type Description
esriResponse object layer info
Source:
Returns:
legend content
Type
string

mapServiceLegendItem(lyrObject, iconsOnlyopt) → {string}

Parameters:
Name Type Attributes Default Description
lyrObject object the layer as defined in the response
iconsOnly boolean <optional>
false use only icons
Source:
Returns:
legend html
Type
string

processLessFile(inputFile, outputFile) → {*}

convert less file
Parameters:
Name Type Description
inputFile string input less file
outputFile string output css file
Source:
Returns:
stream
Type
*

propertiesZoomStyle(styleFunc) → {function|*}

wrapper to define a style function by properties and zoom level
Parameters:
Name Type Description
styleFunc propertiesZoomStyle | * style function
Source:
Returns:
new function
Type
function | *

provide(namespace) → {object}

create a namespace on the gv object
Parameters:
Name Type Description
namespace string to create
Source:
Returns:
object representing the namespace
Type
object

quickMap(optionsopt) → {ol.Map}

Sets up a map with some default parameters and initializes mapMove and mapPopup
Parameters:
Name Type Attributes Default Description
options object <optional>
{} config options
Properties
Name Type Attributes Default Description
divId string <optional>
map map div id
center object <optional>
{} center config object
Properties
Name Type Attributes Default Description
x number <optional>
-10018378 center x, web mercator x or lon
y number <optional>
5574910 center y, web mercator y or lat
zoom number <optional>
7 zoom level
minZoom number <optional>
min zoom
maxZoom number <optional>
max zoom
baseSwitcher boolean <optional>
true if add base map switcher
fullScreen boolean <optional>
false if add base map switcher
Source:
Returns:
the ol map
Type
ol.Map

quickMapBase(optionsopt) → {ol.Map}

Sets up a map with some default parameters and initializes mapMove and mapPopup
Parameters:
Name Type Attributes Default Description
options object <optional>
{} config options
Properties
Name Type Attributes Default Description
divId string <optional>
map map div id
center object <optional>
{} center config object
Properties
Name Type Attributes Default Description
x number <optional>
-10018378 center x, web mercator x or lon
y number <optional>
5574910 center y, web mercator y or lat
zoom number <optional>
7 zoom level
minZoom number <optional>
min zoom
maxZoom number <optional>
max zoom
baseSwitcher boolean <optional>
true if add base map switcher
fullScreen boolean <optional>
false if add base map switcher
Source:
Returns:
the ol map
Type
ol.Map

quickMapMulti(optionsopt) → {quickMapMultiReturn}

Sets up a map with some default parameters and initializes mapMove and mapPopup
Parameters:
Name Type Attributes Default Description
options object <optional>
{} config options
Properties
Name Type Attributes Default Description
divId string <optional>
map map div id
center object <optional>
{} center config object
Properties
Name Type Attributes Default Description
x number <optional>
-10018378 center x, web mercator x or lon
y number <optional>
5574910 center y, web mercator y or lat
zoom number <optional>
7 zoom level
minZoom number <optional>
min zoom
maxZoom number <optional>
max zoom
baseSwitcher boolean <optional>
true if add base map switcher
fullScreen boolean <optional>
false if add base map switcher
Source:
Returns:
return map, map move, and map popup objects
Type
quickMapMultiReturn

resolutionToZoom(resolution) → {number|*}

Get resolution from the zoom level
Parameters:
Name Type Description
resolution number the resolution
Source:
Returns:
the zoom level
Type
number | *

rgb2hex(rgb) → {string}

converts an RGB string to hex
Parameters:
Name Type Description
rgb string rgb color
Source:
Returns:
rbg as hex
Type
string

rgbToRgba(rgb, alpha) → {string}

adds alpha value to rgb string 'rgb(r, b, g)', returns 'rgba(r, g, b, a)'
Parameters:
Name Type Description
rgb string rgb color
alpha number alpha value 0 to 1
Source:
Returns:
rgba color
Type
string

triggerCallback()

Created by gavorhes on 11/2/2015.
Source:

undefinedOrNull(input) → {boolean}

check if the input is undefined or null
Parameters:
Name Type Description
input * input pointer
Source:
Returns:
true undefined or null
Type
boolean

zoomToResolution(zoomLevel) → {number|*}

Get the resolution given the zoom level
Parameters:
Name Type Description
zoomLevel number the zoom level
Source:
Returns:
the map resolution
Type
number | *

Type Definitions

colorLookupByNumber(num) → {string}

Parameters:
Name Type Description
num number the number to use to retrieve the color
Source:
Returns:
rgb color
Type
string

dirNameFilePath

Type:
  • object
Properties:
Name Type Description
dirName string directory name
fileName string file name
Source:

keyValuePair

Type:
  • object
Properties:
Name Type Description
key string
value object
Source:

makeGetParams(extent, zoomLevel)

callback to generate the parameters passed in the get request
Parameters:
Name Type Description
extent object extent object
Properties
Name Type Description
minX number minX
minY number minY
maxX number maxX
maxY number maxY
zoomLevel number zoom level
Source:

mapMoveCallbackFunction(extent, zoomLevel, evtTypeopt)

This callback is displayed as a global member.
Parameters:
Name Type Attributes Description
extent object extent object
Properties
Name Type Description
minX number minX
minY number minY
maxX number maxX
maxY number maxY
zoomLevel number zoom level
evtType string <optional>
undefined for initial load, otherwise one of 'change:center', 'change:resolution'
Source:

mapMoveMakeGetParams(lyr, extent, zoomLevel)

The make mapMoveGetParams function takes the extent and the zoom level context is 'this' object, probably want to do something with this.mapMoveParams
Parameters:
Name Type Description
lyr LayerBaseVector
extent object
Properties
Name Type Description
minX number
minY number
maxX number
maxY number
zoomLevel number
Source:

mediaCallback(newValue)

Parameters:
Name Type Description
newValue number
Source:

olStyleFunction()

Definition for openlayers style function
Source:

popupCallback(featureProperties, jqRef) → {string}

The popup callback function
Parameters:
Name Type Description
featureProperties object the feature properties
jqRef jQuery reference to the div content to do some async stuff inside the div
Source:
Returns:
the html content to be added to the popup
Type
string

popupChangedFunction($popContent)

Definition for popup changed callback functions
Parameters:
Name Type Description
$popContent jquery reference to the popup content
Source:

propertiesZoomStyle(properties, zoom)

A style function based on properties and zoom level, wraps normal feature, resolution function
Parameters:
Name Type Description
properties object the feature properties
zoom number level
Source:

quickMapMultiReturn

Type:
  • object
Properties:
Name Type Description
map ol.Map The X Coordinate
mapMove MapMoveCls The Y Coordinate
mapPopup MapPopupCls The Y Coordinate
Source:

rangeChangeCallback(newValue, ratio, evt)

callback on range change interaction, context of this is the firing dom element
Parameters:
Name Type Description
newValue number
ratio number value from 0 to 1 relative of the value to the min and max
evt object
Source:

styleAndLegend

style and legend object
Type:
  • object
Properties:
Name Type Description
style styleFunc style function
legend string legend content
Source:

styleFunc(feat, resolution)

This callback is displayed as part of the Requester class.
Parameters:
Name Type Description
feat ol.Feature openlayers feature
resolution number map resolution
Source: