Options
All
  • Public
  • Public/Protected
  • All
Menu

webmapsjs

Index

Modules

Classes

Interfaces

Variables

Functions

Object literals

Variables

Const DatePickConnected

DatePickConnected: any = connect((state: iState) => {return {label: 'Date Picker Connected',change: (v) => {console.log(v);},val: state.oneDate}},(dispatch) => {return {change: (v) => {dispatch({type: actions.SET_ONE_DATE, d: v});}}})(DatePick)

Const DateRangeConnected

DateRangeConnected: any = connect((state: iState) => {return {maxRange: 10,start: state.twoDates.start,end: state.twoDates.end,initialEnd: state.twoDates.end,npmrds: true}},(dispatch) => {return {callback: (s: Date, e: Date, version: number) => {dispatch({type: actions.SET_TWO_DATES, start: s, end: e, version: version});}}})(DateRange)

Const Provider

Provider: any = ReactRedux.Provider

Const SET_ONE_DATE

SET_ONE_DATE: "set one date" = "set one date"

Const SET_TWO_DATES

SET_TWO_DATES: "set two dates" = "set two dates"

Let _zoomResLookup

_zoomResLookup: number[] = [156543.03392804097, //078271.51696402048, //139135.75848201024, //219567.87924100512, //39783.93962050256, //44891.96981025128, //52445.98490512564, //61222.99245256282, //7611.49622628141, //8305.748113140705, //9152.8740565703525, //1076.43702828517625, //1138.21851414258813, //1219.109257071294063, //139.554628535647032, //144.777314267823516, //152.388657133911758, //161.194328566955879, //170.5971642834779395, //180.29858214173896974, //190.14929107086948487, //200.07464553543474244, //210.03732276771737122, //220.01866138385868561, //230.009330691929342804, //240.004665345964671402, //250.002332672982335701, //260.0011663364911678506, //270.0005831682455839253 //28]

Const apiRoot

apiRoot: string = hostRoot + `/api`

Const combineReducers

combineReducers: combineReducers = Redux.combineReducers

Const connect

connect: any = ReactRedux.connect

control

control: MediaControl = new MediaControl('map')

Let coordinationLayer

coordinationLayer: LayerBaseVectorEsri = new LayerBaseVectorEsri('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0',{visible: true,autoLoad: true,name: 'Coordination',useEsriStyle: true})

Const createStore

createStore: StoreCreator = Redux.createStore

Let d

d: Date = new Date()

Let dayRange

dayRange: DayRange = new DayRange($('#day-range'), 10)

Let dragged

dragged: boolean = false

Let end

end: Date = new Date('12/31/2017')

Let endTime

endTime: number = d.getTime()

Let geocoderLoadingClass

geocoderLoadingClass: string = "geocoder-loading"

Const glob

glob: Object

Const hostRoot

hostRoot: string = isLocal ? 'http://localhost:8081' : `https://transportal.cee.wisc.edu/gis/${stage_prod}`

Let invalidClass

invalidClass: string = "geocoder-invalid"

Let isLocal

isLocal: boolean = window.location.href.indexOf('localhost') > -1

Let itsConfig

itsConfig: (object | object | object | object | object)[] = [{name: 'Camera',itsType: 'cctv',minZoom: 11,itsIconConfig: {prop: 'owner',defaultName: 'WisDOT',defaultIcon: 'cctv.png',iconArray: [['City of Madison', 'Madison', 'cctv-mad.png']]}},{name: 'Message Signs',itsType: 'DMS',minZoom: 11,itsIconConfig: {prop: 'dmsType',defaultName: 'DMS',defaultIcon: 'dms.png',iconArray: [['pcms', 'PCMS', 'pcms.png']]}},{name: 'ATR', itsType: 'atr', minZoom: 8, itsIcon: 'atr.png', visible: false},{name: 'Lighting', itsType: 'light', minZoom: 16, itsIcon: 'streetlight.png', visible: false, onDemand: true},{name: 'Bluetooth', itsType: 'blue', minZoom: 10, itsIcon: 'bluetooth.png', visible: false},{name: 'Cabinets', itsType: 'cabinet', minZoom: 10, itsIcon: 'cabinet.png', visible: false},{name: 'Hut', itsType: 'hut', minZoom: 10, itsIcon: 'hut.png', visible: false},{name: 'Vault', itsType: 'vault', minZoom: 13, itsIcon: 'vault.png', visible: false},{name: 'Advisory Radio', itsType: 'har', minZoom: 10, itsIcon: 'har.png', visible: false},{name: 'Loop Detectors',itsType: 'loop',legendCollapse: true,minZoom: 14,visible: false,itsIconConfig: {prop: 'dtctrType',defaultName: 'Other',defaultIcon: 'loopdetectorother.png',iconArray: [['detector', 'Detector', 'loopdetector.png'],['long', 'Long', 'loopdetectorlong.png'],['zone', 'Zone', 'loopdetectorzone.png']]},onDemand: true},{name: 'Microwave', itsType: 'microwave', minZoom: 14, itsIcon: 'microwave.png', visible: false},{name: 'Pull Box', itsType: 'pull', minZoom: 14, itsIcon: 'pullbox.png', visible: false, onDemand: true},{name: 'RWIS', itsType: 'rwis', minZoom: 7, itsIcon: 'rwis.png', visible: false},{name: 'Ramp Gates', itsType: 'gate', minZoom: 10, itsIcon: 'rampgate.png', visible: false},{name: 'Ramp Meter', itsType: 'meter', minZoom: 10, itsIcon: 'rampmeter.png', visible: false},{name: 'Signal', itsType: 'signal', minZoom: 13, itsIcon: 'signal.png', visible: false, onDemand: true},{name: 'Tower', itsType: 'tower', minZoom: 10, itsIcon: 'tower.png', visible: false},{name: 'Trench',itsType: 'trench',onDemand: true,visible: false,onDemandDelay: 500,minZoom: 15,legendCollapse: true,itsLineConfig: {prop: 'owner',defaultName: 'Other',//defaultWidth: 7,defaultColor: colors.hexAlphaToRgbOrRgba('#747474', 0.8),lineArray: [['WisDOT', 'WisDOT', colors.hexAlphaToRgbOrRgba('#FF032F', 0.7)],['WIN', 'WIN', colors.hexAlphaToRgbOrRgba('#FFC632', 0.7)],['USXchange', 'USXchange', colors.hexAlphaToRgbOrRgba('#2DFF46', 0.7)],['AT&T', 'AT&T', colors.hexAlphaToRgbOrRgba('#ff2be5', 0.7)],['Touch America', 'Touch America', colors.hexAlphaToRgbOrRgba('#52f3ff', 0.7)],['Qwest', 'Qwest', colors.hexAlphaToRgbOrRgba('#9278ff', 0.7)],['McLeodUSA', 'McLeodUSA', colors.hexAlphaToRgbOrRgba('#2926FF', 0.7)],['CINC', 'CINC', colors.hexAlphaToRgbOrRgba('#CB00FF', 0.7)],['City of Madison', 'Madison', colors.hexAlphaToRgbOrRgba('#000380', 0.7)]]}}]

Let itsLayerCollection

itsLayerCollection: ItsLayerCollection = new ItsLayerCollection(map)

Let lastVal

lastVal: number

Let layerArray

layerArray: LayerEsriMapServer[] = [wisDotRegions,sixYearPlan// tipConfig.tipSegmentLayer,// tipConfig.metamanagerSegments,// {// groupName: 'ITS Inventory Layers',// collapse: true,// addCheck: false,// items: tipConfig.itsLayerCollection.layers// }]

Let legend

legend: LayerLegend = new LayerLegend(layerArray, 'legend-container', {})

Let map

map: Map = quickMap()

Const mapMove

mapMove: MapMoveCls = new MapMoveCls()

The single map move object catch is that it is common to multimap pages

type

{MapMoveCls}

Const mapPopup

mapPopup: MapPopupCls = new MapPopupCls() as MapPopupCls

The single popup object catch is that it is common to multimap pages

type

{MapPopupCls}

Let media

media: MediaControl = new MediaControl($('#control'),(v: number) => {nexrhresStatic.setLayerTime(v);},{min: startTime,max: endTime,val: endTime,step: rangeStep,playInterval: 750,showAsDate: true})

Let metamanagerSegments

metamanagerSegments: LayerEsriMapServer = new LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer',{minZoom: 7,visible: true,name: 'Metamanager Segments'})

Let mouseDown

mouseDown: boolean = false

Let mouseIn

mouseIn: boolean = false

Let nexrhresStatic

nexrhresStatic: LayerRealEarthTile = new LayerRealEarthTile({products: 'nexrhres',id: 'nexrhres-static',opacity: 0.6,animate: true,name: 'Hybrid Reflectivity',// maxZoom: 10,timeLoadCallback: function (f) {console.log(f);}})

Let nm

nm: any = provide('util')

Const npmrdsApiUrl

npmrdsApiUrl: string = apiRoot + '/npmrds'

Let oakRidgeLayers

oakRidgeLayers: string[][] = [['Cameras', 'cameras33'],['HAR', 'HAR33'],['DMS', 'MessageSigns33'],//['State Summary', 'statesummary'],['Traffic Control', 'TrafficControl33'],['Traffic Detection', 'TrafficDetectionMulti'],['Weather', 'Weather33']]

Let offsetMinutes

offsetMinutes: number = (new Date()).getTimezoneOffset()

The GMT offset time in minutes

type

{number}

Const proj3070

proj3070: Projection = new Projection({code: 'EPSG:3070'})

Const proj3857

proj3857: Projection = new Projection({code: 'EPSG:3857'})

Const proj4326

proj4326: Projection = new Projection({code: 'EPSG:4326'})

Let rangeStep

rangeStep: number = Math.round((endTime - startTime) / 8)

Let regionLayer

regionLayer: LayerBaseVectorGeoJson = new LayerBaseVectorGeoJson('',{minZoom: 6,maxZoom: 12,name: 'WisDOT Regions',style: new Style({fill: new Fill({color: 'blue'}),stroke: new Stroke({color: 'yellow',width: 5})})})

Let regionLayer2

regionLayer2: LayerBaseVectorGeoJson = new LayerBaseVectorGeoJson('',{minZoom: 6,maxZoom: 12,name: 'WisDOT Regions',style: new Style({fill: new Fill({color: 'red'}),stroke: new Stroke({color: 'yellow',width: 5})})})

Let sixYearPlan

sixYearPlan: LayerEsriMapServer = new LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', {name: 'Six Year Plan', legendCollapse: true})

Let sliders

sliders: TipSliders = new TipSliders(tipConfig.slidersConfig, tipConfig.presetConfig, 'slider-container',tipConfig.$presetSelector, tipConfig.$regionSelector, tipConfig.$regionSelector, (chg) => {console.log(chg)})

Let stage_prod

stage_prod: string = window.location.pathname.indexOf('webmapsstage') > -1 ? 'webmapsstage' : 'webmaps'

Let start

start: Date = new Date('12/31/2017')

Let startTime

startTime: number = d.getTime()

Const stnApiUrl

stnApiUrl: string = apiRoot + '/stn'

Let swiper

swiper: LayerSwipe = new LayerSwipe(map)

Const theStore

theStore: Store<Object> = Redux.createStore(Redux.combineReducers({oneDate, twoDates}))

Let timeout

timeout: number = null

Const tipConfig

tipConfig: ITipConfig = {$loadingGif: $('#loading-gif'),$presetSelector: $('#preset-selector'),$regionSelector: $('#region-selector'),$versionSelector: $('#version-selector'),tipSegmentLayerMinZoom: 10,slidersConfig: [{label: 'AADT',yearOptions: [{label: '1', column: 'aadtyr_1'}]},{label: 'AADT Future',yearOptions: [{label: '5', column: 'aadtyr_5'},{label: '10', column: 'aadtyr_10'},{label: '15', column: 'aadtyr_15'},{label: '20', column: 'aadtyr_20'}]},{label: 'Growth',yearOptions: [{label: '5', column: 'growth_5'},{label: '10', column: 'growth_10'},{label: '15', column: 'growth_15'},{label: '20', column: 'growth_20'}]},{label: 'Truck',yearOptions: [{label: '1', column: 'trkdyr_1'},{label: '20', column: 'trkdyr_20'}]},{label: 'LOS',yearOptions: [{label: '1', column: 'losyr_1'}]},{label: 'LOS Future',yearOptions: [{label: '5', column: 'losyr_5'},{label: '10', column: 'losyr_10'},{label: '15', column: 'losyr_15'},{label: '20', column: 'losyr_20'}]},{label: 'Crash Rate',yearOptions: [{label: 1, column: 'crash_rate'}]},{label: 'Severity',yearOptions: [{label: 1, column: 'crash_severity'}]},{label: 'Weather',yearOptions: [{label: 1, column: 'weather'}]},{label: 'Event',yearOptions: [{label: 1, column: 'event'}]}] as Array<TipSliderConfig>,presetConfig: [{label: 'Default TIP',presets: [{column: 'aadtyr_1', value: 10.0},{column: 'aadtyr_20', value: 7.0},{column: 'growth_20', value: 7.0},{column: 'trkdyr_1', value: 4.0},{column: 'losyr_1', value: 12.0},{column: 'losyr_20', value: 12.0},{column: 'crash_rate', value: 15.0},{column: 'crash_severity', value: 13.0},{column: 'weather', value: 9.0},{column: 'event', value: 11.0}]},{label: 'Safety',presets: [{column: 'aadtyr_1', value: 20.0},{column: 'aadtyr_20', value: 0.0},{column: 'growth_20', value: 0.0},{column: 'trkdyr_1', value: 0.0},{column: 'losyr_1', value: 0.0},{column: 'losyr_20', value: 0.0},{column: 'crash_rate', value: 40.0},{column: 'crash_severity', value: 40.0},{column: 'weather', value: 0.0},{column: 'event', value: 0.0}]},{label: 'Mobility Present',presets: [{column: 'aadtyr_1', value: 25.0},{column: 'aadtyr_20', value: 25.0},{column: 'growth_20', value: 0.0},{column: 'trkdyr_1', value: 25.0},{column: 'losyr_1', value: 25.0},{column: 'losyr_20', value: 0.0},{column: 'crash_rate', value: 0.0},{column: 'crash_severity', value: 0.0},{column: 'weather', value: 0.0},{column: 'event', value: 0.0}]},{label: 'Mobility Future',presets: [{column: 'aadtyr_1', value: 0.0},{column: 'aadtyr_20', value: 25.0},{column: 'growth_20', value: 25.0},{column: 'trkdyr_1', value: 25.0},{column: 'losyr_1', value: 0.0},{column: 'losyr_20', value: 25.0},{column: 'crash_rate', value: 0.0},{column: 'crash_severity', value: 0.0},{column: 'weather', value: 0.0},{column: 'event', value: 0.0}]},{label: 'Service',presets: [{column: 'aadtyr_1', value: 30.0},{column: 'aadtyr_20', value: 0.0},{column: 'growth_20', value: 10.0},{column: 'trkdyr_1', value: 0.0},{column: 'losyr_1', value: 30.0},{column: 'losyr_20', value: 30.0},{column: 'crash_rate', value: 0.0},{column: 'crash_severity', value: 0.0},{column: 'weather', value: 0.0},{column: 'event', value: 0.0}]},{label: 'Freight Performance',presets: [{column: 'aadtyr_1', value: 20.0},{column: 'aadtyr_20', value: 0.0},{column: 'growth_20', value: 0.0},{column: 'trkdyr_1', value: 60.0},{column: 'losyr_1', value: 20.0},{column: 'losyr_20', value: 0.0},{column: 'crash_rate', value: 0.0},{column: 'crash_severity', value: 0.0},{column: 'weather', value: 0.0},{column: 'event', value: 0.0}]}] as Array<TipPresetConfig>} as ITipConfig

Let truckSpeed2014

truckSpeed2014: LayerEsriMapServer = new LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',{minZoom: 7,visible: true,name: 'truck2014',showLayers: [8]})

Let truckSpeed2015

truckSpeed2015: LayerEsriMapServer = new LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',{minZoom: 7,visible: true,name: 'truck2015',showLayers: [9]})

Const window

window: Window

Created by gavorhes on 12/10/2015.

Let wisDotRegions

wisDotRegions: LayerEsriMapServer = new LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer')

Functions

_abortHelper

  • _abortHelper(x: XMLHttpRequest): void
  • Parameters

    • x: XMLHttpRequest

    Returns void

_axiosHelper

  • _axiosHelper(endpoint: string, callback: function, params?: Object, error?: function, verb: string): any
  • Parameters

    • endpoint: string
    • callback: function
        • (d: Object): any
        • Parameters

          • d: Object

          Returns any

    • Default value params: Object = {}
    • Default value error: function = () => {}
        • (d?: Object): any
        • Parameters

          • Optional d: Object

          Returns any

    • verb: string

    Returns any

Private _colorArrayToRgba

  • _colorArrayToRgba(colorArray: [number, number, number], opacity: number): string
  • Parameters

    • colorArray: [number, number, number]

      input color array

    • opacity: number

      the opacity 0 to 1

    Returns string

    rgba string

Private _hex

  • _hex(x: number | string): string
  • helper function to convert to hex

    Parameters

    • x: number | string

      the number to convert to hex

    Returns string

    number as hex

calculateExtent

  • Parameters

    Returns number[]

callback

  • callback(d: string): void
  • Parameters

    • d: string

    Returns void

checkStyleNumber

  • Parameters

    Returns void

dateToString

  • dateToString(dte: Date, zeroPad?: boolean): string
  • Parameters

    • dte: Date
    • Default value zeroPad: boolean = true

    Returns string

dateToYyyyMmDdHh000

  • dateToYyyyMmDdHh000(dte: Date): string
  • Given a date return a string in the format YYYYmmdd_hh0000

    Parameters

    • dte: Date

      the input date

    Returns string

    the formatted date string

dateToYyyyMmDdHhMmSs

  • dateToYyyyMmDdHhMmSs(dte: Date): string
  • Given a date return a string in the format YYYY-mm-dd hh:MM:SS

    Parameters

    • dte: Date

      to convert

    Returns string

    the formatted date string

default

  • default(map: Map | function, layer: Base): Promise<Map>
  • Parameters

    • map: Map | function
    • layer: Base

    Returns Promise<Map>

defineLegend

  • Parameters

    Returns string

defineStyle

  • Parameters

    Returns Style | Style[] | iStyleFunc

    undefined, style, or style function

definedAndNotNull

  • definedAndNotNull(input: any): boolean
  • check if the input is defined and not null

    Parameters

    • input: any

      input pointer

    Returns boolean

    true defined and not null

Const delete_

  • delete_(endpoint: string, callback: function, params?: Object, error?: function): any
  • Parameters

    • endpoint: string
    • callback: function
        • (d: Object): any
        • Parameters

          • d: Object

          Returns any

    • Default value params: Object = {}
    • Default value error: function = () => {}
        • (d?: Object): any
        • Parameters

          • Optional d: Object

          Returns any

    Returns any

fitToMap

  • fitToMap(layers: Vector[] | LayerBaseVector[], mp: Map, zoomOut?: number): void
  • given one or an array of layers, fit to the map

    Parameters

    • layers: Vector[] | LayerBaseVector[]

      array of layers or single

    • mp: Map

      the map to fit

    • Optional zoomOut: number

    Returns void

Const get

  • get(endpoint: string, callback: function, params?: Object, error?: function): any
  • Parameters

    • endpoint: string
    • callback: function
        • (d: Object): any
        • Parameters

          • d: Object

          Returns any

    • Default value params: Object = {}
    • Default value error: function = () => {}
        • (d?: Object): any
        • Parameters

          • Optional d: Object

          Returns any

    Returns any

getGeometry

  • getGeometry(extent: iExtent, version: number, callback: function, options?: object, error?: function): void
  • Parameters

    • extent: iExtent
    • version: number
    • callback: function
    • Default value options: object = {}
      • Optional roadDirection?: object
        • direction: string
        • road: string
      • Optional startEnd?: object
        • end: string
        • start: string
    • Default value error: function = () => {}

    Returns void

getRoads

  • getRoads(extent: iExtent, version: number, callback: function, error?: function): void
  • Parameters

    • extent: iExtent
    • version: number
    • callback: function
    • Default value error: function = () => {}

    Returns void

getRoute

  • getRoute(road: string, direction: string, version: number, callback: function, options?: object, error?: function): void
  • Parameters

    • road: string
    • direction: string
    • version: number
    • callback: function
    • Default value options: object = {}
      • Optional extent?: iExtent
      • Optional startEnd?: object
        • end: string
        • start: string
      • Optional version?: number
    • Default value error: function = () => {}

    Returns void

getRouteGeom

  • getRouteGeom(year: number, route: number, callback?: function, error?: function): void
  • Parameters

    • year: number
    • route: number
    • Default value callback: function = (d: iRouteGeom) => {console.log(d);}
    • Default value error: function = (e) => {console.log(e);}
        • (e: iError): any
        • Parameters

          • e: iError

          Returns any

    Returns void

getRoutes

  • getRoutes(yr: number, lon: number, lat: number, searchDistance?: number, callback?: function, error?: function): void
  • Parameters

    • yr: number
    • lon: number
    • lat: number
    • Default value searchDistance: number = 200
    • Default value callback: function = (d) => {console.log(d);}
    • Default value error: function = (e) => {console.log(e);}
        • (e: iError): any
        • Parameters

          • e: iError

          Returns any

    Returns void

getSnappedPoint

  • getSnappedPoint(yr: number, routeId: number, lon: number, lat: number, searchDistance?: number, callback?: function, error?: function): void
  • Parameters

    • yr: number
    • routeId: number
    • lon: number
    • lat: number
    • Default value searchDistance: number = 200
    • Default value callback: function = (d: iGeoJsonSnappedPoint) => {console.log(d);}
    • Default value error: function = (e) => {console.log(e);}
        • (e: iError): any
        • Parameters

          • e: iError

          Returns any

    Returns void

getState

  • Returns iState

getStnSegment

  • getStnSegment(yr: number, routeId: number, lonStart: number, latStart: number, lonEnd: number, latEnd: number, searchDistance?: number, callback?: function, error?: function): void
  • Parameters

    • yr: number
    • routeId: number
    • lonStart: number
    • latStart: number
    • lonEnd: number
    • latEnd: number
    • Default value searchDistance: number = 200
    • Default value callback: function = (d: iGeoJsonStnSegment) => {console.log(d);}
    • Default value error: function = (e) => {console.log(e);}
        • (e: iError): any
        • Parameters

          • e: iError

          Returns any

    Returns void

getStnSegmentByMiles

  • getStnSegmentByMiles(yr: number, routeId: number, startMile: number, endMile: number, callback?: function, error?: function): void
  • Parameters

    • yr: number
    • routeId: number
    • startMile: number
    • endMile: number
    • Default value callback: function = (d: iGeoJsonStnSegment) => {console.log(d);}
    • Default value error: function = (e) => {console.log(e);}
        • (e: iError): any
        • Parameters

          • e: iError

          Returns any

    Returns void

getStnYears

  • getStnYears(callback?: function, error?: function): void
  • Parameters

    • Default value callback: function = (d: { years: number[] }) => {console.log(d);}
        • (d: object): any
        • Parameters

          • d: object
            • years: number[]

          Returns any

    • Default value error: function = (e) => {console.log(e);}
        • (e: iError): any
        • Parameters

          • e: iError

          Returns any

    Returns void

getTmc

  • getTmc(tmc: string, version: number, callback: function, error?: function): void
  • Parameters

    • tmc: string
    • version: number
    • callback: function
        • (d: any): any
        • Parameters

          • d: any

          Returns any

    • Default value error: function = () => {}

    Returns void

getTmcs

  • getTmcs(lon: number, lat: number, version: number, searchDist?: number, callback: function, error?: function): void
  • Parameters

    • lon: number
    • lat: number
    • version: number
    • Default value searchDist: number = 2000
    • callback: function
        • (d: any): any
        • Parameters

          • d: any

          Returns any

    • Default value error: function = () => {}

    Returns void

getUrlParams

  • getUrlParams(): object
  • Returns object

    object representation of url params

getValue

  • getValue(obj: object, keyArr: string[], defaultVal?: any): any
  • Parameters

    • obj: object
      • [s: string]: any
    • keyArr: string[]
    • Default value defaultVal: any = null

    Returns any

get_browser

  • get_browser(): object
  • get the browser name and version

    Returns object

    • name: string
    • version: string

hexAlphaToRgbOrRgba

  • hexAlphaToRgbOrRgba(hexString: string, alphaVal: number): string
  • Convert hex string to RGB or RGBA string

    Parameters

    • hexString: string

      hex color string

    • alphaVal: number

    Returns string

    • rgb or rgba color

htmlEscape

  • htmlEscape(str: string): string
  • escape html charcters

    Parameters

    • str: string

      input string

    Returns string

    escaped string

isNumber

  • isNumber(checkVal: any): boolean
  • Parameters

    • checkVal: any

    Returns boolean

keyValPairs

  • keyValPairs(obj: object): Array<keyVals>
  • iterate over the key value pairs of an object

    example

    for (let x:KeyValuePair of keyValPairs(object)){..}

    Parameters

    • obj: object

      the input object

      • [s: string]: any

    Returns Array<keyVals>

    • array of key value pairs

leadingPad

  • leadingPad(inNum: number): string
  • Parameters

    • inNum: number

    Returns string

localCacheUrl

  • localCacheUrl(folder: string, service: string): string
  • Parameters

    • folder: string
    • service: string

    Returns string

makeBlueGreenRedGradient

  • makeBlueGreenRedGradient(minVal: number, maxVal: number, flipColors?: boolean): function
  • Make a blue green red gradient

    Parameters

    • minVal: number

      minimum value

    • maxVal: number

      maximum value

    • Default value flipColors: boolean = false

      if the colors should be flipped

    Returns function

    color lookup function

      • (v: number): string
      • Parameters

        • v: number

        Returns string

makeBlueGreenRedGradientZScore

  • makeBlueGreenRedGradientZScore(median: number, stdDev: number, flipColors?: boolean): function
  • Create a function that will return colors based on a gradient

    Parameters

    • median: number

      median value

    • stdDev: number

      standard deviation

    • Default value flipColors: boolean = false

      if the colors should be flipped

    Returns function

    color lookup function

      • (v: number): string
      • Parameters

        • v: number

        Returns string

makeExtent

  • Parameters

    Returns string

makeFeatureServiceLegendAndSymbol

  • makeFeatureServiceLegendAndSymbol(esriResponse: iEsriResponse): object
  • Parameters

    Returns object

makeGuid

  • makeGuid(): string
  • guids are used to uniquely identify groups and features

    Returns string

    a new guid

makeMapServiceLegend

  • makeMapServiceLegend(esriResponse: object, showLayers?: number[]): string
  • make map service legent

    Parameters

    • esriResponse: object

      layer info

    • Default value showLayers: number[] = []

      limited number of layers to show in map service

    Returns string

    legend content

makeServiceUrl

  • makeServiceUrl(folder: string, service: string): string
  • Helper to return the url to the service on the production server

    Parameters

    • folder: string
    • service: string

    Returns string

mapServiceLegendItem

  • mapServiceLegendItem(lyrObject: iMapServiceLegend, skipLayerNameAndExpander?: boolean): string
  • Parameters

    • lyrObject: iMapServiceLegend

      the layer as defined in the response

    • Default value skipLayerNameAndExpander: boolean = false

    Returns string

    legend html

mapToBase64

  • Parameters

    • map: Map
    • callback: function
        • (imgData: string): any
        • Parameters

          • imgData: string

          Returns any

    • Optional options: iMapToBase64Options

    Returns any

me

  • me(eat?: number): void
  • Parameters

    • Default value eat: number = 1

    Returns void

oneDate

  • oneDate(state?: Date, action: object): Date
  • Parameters

    • Default value state: Date = new Date()
    • action: object
      • d: Date
      • type: string

    Returns Date

Const post

  • post(endpoint: string, callback: function, params?: Object, error?: function): any
  • Parameters

    • endpoint: string
    • callback: function
        • (d: Object): any
        • Parameters

          • d: Object

          Returns any

    • Default value params: Object = {}
    • Default value error: function = () => {}
        • (d?: Object): any
        • Parameters

          • Optional d: Object

          Returns any

    Returns any

propertiesZoomStyle

  • propertiesZoomStyle(styleFunc: function): function
  • wrapper to define a style function by properties and zoom level

    Parameters

    • styleFunc: function

      style function

        • (f: Feature, res: number): Style | Style[]
        • Parameters

          • f: Feature
          • res: number

          Returns Style | Style[]

    Returns function

    new function

      • (feature: Feature, zoom: number): Style | Style[]
      • Parameters

        • feature: Feature
        • zoom: number

        Returns Style | Style[]

provide

  • provide(namespace: string): any
  • create a namespace on the gv object

    Parameters

    • namespace: string

      to create

    Returns any

    object representing the namespace

Const put

  • put(endpoint: string, callback: function, params?: Object, error?: function): any
  • Parameters

    • endpoint: string
    • callback: function
        • (d: Object): any
        • Parameters

          • d: Object

          Returns any

    • Default value params: Object = {}
    • Default value error: function = () => {}
        • (d?: Object): any
        • Parameters

          • Optional d: Object

          Returns any

    Returns any

quickMap

  • Sets up a map with some default parameters and initializes mapMove and mapPopup

    Parameters

    Returns Map

    the ol map

quickMapBase

  • Sets up a map with some default parameters and initializes mapMove and mapPopup

    Parameters

    Returns Map

    the ol map

quickMapMulti

  • Sets up a map with some default parameters and initializes mapMove and mapPopup

    Parameters

    Returns object

    return object with map, map move, and map popup objects

rangeChange

  • Add a variety of listeners for range inputs applied to a common callback

    this

    {jQuery}

    Parameters

    • $slider: JQuery

      jquery reference to the slider

    • callback: rangeChangedCallback

      the callback

    • changeTimeout: number

    Returns any

    the jQuery object

resolutionToZoom

  • resolutionToZoom(resolution: number): number
  • Get resolution from the zoom level

    Parameters

    • resolution: number

      the resolution

    Returns number

    the zoom level

rgb2hex

  • rgb2hex(rgb: string): string
  • converts an RGB string to hex

    Parameters

    • rgb: string

      rgb color

    Returns string

    rbg as hex

rgbToRgba

  • rgbToRgba(rgb: string, alpha: number): string
  • adds alpha value to rgb string 'rgb(r, b, g)', returns 'rgba(r, g, b, a)'

    Parameters

    • rgb: string

      rgb color

    • alpha: number

      alpha value 0 to 1

    Returns string

    rgba color

stringToDate

  • stringToDate(dateStr: string): Date
  • Created by glenn on 6/13/2017.

    Parameters

    • dateStr: string

    Returns Date

timeToLocalDateString

  • timeToLocalDateString(tm: number): string
  • callback

    mediaCallback

    Parameters

    • tm: number

    Returns string

triggerCallback

  • Created by gavorhes on 11/2/2015.

    Parameters

    Returns void

twoDates

  • twoDates(state?: object, action: object): object
  • Parameters

    • Default value state: object = {start: start, end: end, version: 2}
      • end: Date
      • start: Date
      • version: number
    • action: object
      • end: Date
      • start: Date
      • type: string
      • version: number

    Returns object

    • end: Date
    • start: Date
    • version: number

undefinedOrNull

  • undefinedOrNull(input: any): boolean
  • check if the input is undefined or null

    Parameters

    • input: any

      input pointer

    Returns boolean

    true undefined or null

zoomToResolution

  • zoomToResolution(zoomLevel: number): number
  • Get the resolution given the zoom level

    Parameters

    • zoomLevel: number

      the zoom level

    Returns number

    the map resolution

Object literals

Let emptyGeojson

emptyGeojson: object

Created by glenn on 6/13/2017.

features

features: undefined[] = []

type

type: string = "FeatureCollection"

crs

crs: object

type

type: string = "name"

properties

properties: object

name

name: string = "urn:ogc:def:crs:OGC:1.3:CRS84"

Const emptyGeometry

emptyGeometry: object

geom

geom: object = emptyGeojson

Type declaration

  • features: undefined[]
  • type: string
  • crs: object
    • type: string
    • properties: object
      • name: string

roads

roads: undefined[] = []

Const emptyRoute

emptyRoute: object

lengths

lengths: object

Type declaration

line

line: object = emptyGeojson

Type declaration

  • features: undefined[]
  • type: string
  • crs: object
    • type: string
    • properties: object
      • name: string

points

points: object = emptyGeojson

Type declaration

  • features: undefined[]
  • type: string
  • crs: object
    • type: string
    • properties: object
      • name: string

roads

roads: undefined[] = []

totalDistance

totalDistance: number = -1

speed

speed: object

count

count: number = 0

dates

dates: undefined[] = []

free

free: object

Type declaration

std

std: object

Type declaration

values

values: object

Type declaration

Const reg

reg: object

features

features: object[] = [{"type": "Feature","properties": {},"geometry": {"type": "Polygon","coordinates": [[[-91.4232, 43.9834], [-91.3246, 43.9834], [-91.3465, 44.0162], [-91.3082, 44.0655], [-91.2205, 44.0546], [-91.1767, 44.0874], [-91.1493, 44.0819], [-90.9741, 44.071], [-90.9741, 44.071], [-90.9796, 44.1312], [-90.9084, 44.1586], [-90.4921, 44.1586], [-90.3114, 44.1531], [-90.3114, 44.2463], [-90.0813, 44.2463], [-89.9006, 44.2517], [-89.928, 44.197], [-89.9061, 44.1805], [-89.928, 44.1531], [-89.9718, 44.1696], [-90.0266, 44.071], [-89.9608, 43.9779], [-89.9499, 43.9231], [-89.9828, 43.9122], [-89.9608, 43.8629], [-89.8513, 43.7698], [-89.7856, 43.6383], [-89.5994, 43.6438], [-89.2434, 43.6438], [-89.0079, 43.6328], [-88.8874, 43.6328], [-88.3999, 43.6328], [-88.3999, 43.5452], [-88.4163, 43.1947], [-88.5368, 43.1947], [-88.5423, 42.8442], [-88.5478, 42.8442], [-88.7778, 42.8442], [-88.7778, 42.4936], [-88.9421, 42.4936], [-89.3639, 42.4991], [-89.4022, 42.4991], [-89.8404, 42.5046], [-89.928, 42.5046], [-90.4264, 42.5046], [-90.64, 42.5101], [-90.7112, 42.636], [-90.8974, 42.6744], [-91.0672, 42.7511], [-91.1548, 42.9866], [-91.1767, 43.0797], [-91.1767, 43.1344], [-91.0562, 43.2549], [-91.1055, 43.3152], [-91.2041, 43.3535], [-91.2041, 43.4247], [-91.2315, 43.4576], [-91.2151, 43.5014], [-91.2698, 43.6164], [-91.2589, 43.7259], [-91.2424, 43.7752], [-91.2863, 43.8464]]]}}]

type

type: string = "FeatureCollection"

crs

crs: object

type

type: string = "name"

properties

properties: object

name

name: string = "urn:ogc:def:crs:OGC:1.3:CRS84"

Const reg2

reg2: object

features

features: object[] = [{"type": "Feature","properties": {},"geometry": {"type": "Polygon","coordinates": [[[-93.0, 45.0], [-94.0, 45.0], [-94.0, 46.0], [-93.0, 46.0], [-93.0, 45.0]]]}}]

type

type: string = "FeatureCollection"

crs

crs: object

type

type: string = "name"

properties

properties: object

name

name: string = "urn:ogc:def:crs:OGC:1.3:CRS84"

Generated using TypeDoc