Options
All
  • Public
  • Public/Protected
  • All
Menu

Module ml

Public MapLarge namespace containing all classes, objects and elements.

Jump to the documentation for creating a MapLarge Map using ml.map or Layer using ml.layer methods.

Index

Variables

apimanager

apimanager: ApiManager

Singleton of ml.servers.ApiManager

cite

cite: boolean

errors

errors: any[]

googleMapsChannel

googleMapsChannel: string

Google Maps channel will be used if it contains a value.

googleMapsClientID

googleMapsClientID: string

Google Maps Client ID will be used if it contains a value.

layerShowCount

layerShowCount: number

loadLayer

loadLayer: layer

Alias for ml.layer function.

loaded

loaded: boolean

nossl

nossl: boolean

pageLoaded

pageLoaded: boolean

resources

resources: Resources

Resources Instance

version

version: string

JavaScript API version.

Functions

BarChart

  • BarChart(div: string | HTMLDivElement, data: any, opts: any): any
  • Parameters

    • div: string | HTMLDivElement
    • data: any
    • opts: any

    Returns any

LatLng

  • LatLng(lat: number, lng: number): LatLng
  • Parameters

    • lat: number
    • lng: number

    Returns LatLng

MapSync

PieChart

  • PieChart(div: string | HTMLDivElement, data: any, opts: any): any
  • Parameters

    • div: string | HTMLDivElement
    • data: any
    • opts: any

    Returns any

ajax

  • ajax(url: string, callback: function, encode?: boolean, timeout?: number, onFailCallback?: function): void
  • Parameters

    • url: string
    • callback: function
        • (...args: Array<any>): void
        • Parameters

          • Rest ...args: Array<any>

          Returns void

    • Optional encode: boolean
    • Optional timeout: number
    • Optional onFailCallback: function
        • (...args: Array<any>): void
        • Parameters

          • Rest ...args: Array<any>

          Returns void

    Returns void

all

  • all<T>(obj: T, predicate: function): boolean
  • Type parameters

    • T

    Parameters

    • obj: T
    • predicate: function
        • (key: any, value: any): boolean
        • Parameters

          • key: any
          • value: any

          Returns boolean

    Returns boolean

any

  • any<T>(obj: T, predicate: function): boolean
  • Type parameters

    • T

    Parameters

    • obj: T
    • predicate: function
        • (key: any, value: any): boolean
        • Parameters

          • key: any
          • value: any

          Returns boolean

    Returns boolean

chart

  • chart(div: string | HTMLDivElement, data: any, opts: any): any
  • Parameters

    • div: string | HTMLDivElement
    • data: any
    • opts: any

    Returns any

create

  • create(tag: string, cssText?: string, appendTo?: HTMLElement, innerHTML?: string): HTMLElement
  • Create a DOM element using optional style attributes, optionally append it to another DOM element and optionally provide HTML content.

    Example:

    var html = "<p>Mapping platform for big data visualization, analytics and publishing.</p>";
    var div = ml.create('div', 'width:100%;height:100%', document.body, html);
    

    Parameters

    • tag: string

      Type of DOM element to create.

    • Optional cssText: string

      Optional content for the style attribute.

    • Optional appendTo: HTMLElement
    • Optional innerHTML: string

      Optional HTML content.

    Returns HTMLElement

    A reference to the new DOM element.

each

  • each<T>(obj: T, callback: function): void
  • Executes the provided function once per array element or object literal property. Supports older browsers and has been optimized for performance.

    Type parameters

    • T

    Parameters

    • obj: T

      Array or object literal to iterate over.

    • callback: function

      Function to execute for each array element or object property, receiving two arguments - the key and value.

        • (key: any, value: any): any
        • Parameters

          • key: any
          • value: any

          Returns any

    Returns void

filmstrip

  • filmstrip(opts: any): any
  • Parameters

    • opts: any

    Returns any

filter

  • filter<T>(obj: T, predicate: function): any[]
  • Type parameters

    • T

    Parameters

    • obj: T
    • predicate: function
        • (key: any, value: any): boolean
        • Parameters

          • key: any
          • value: any

          Returns boolean

    Returns any[]

format

  • format(text: string, replace?: any, open?: string, close?: string, layer?: Layer, lat?: number, lng?: number): string
  • Parameters

    • text: string
    • Optional replace: any
    • Optional open: string
    • Optional close: string
    • Optional layer: Layer
    • Optional lat: number
    • Optional lng: number

    Returns string

hasOwnProperty

  • hasOwnProperty(property: string): boolean
  • Parameters

    • property: string

    Returns boolean

html

  • html(templateOrClassName: string, replace?: object, ejsdata?: string): string
  • Parameters

    • templateOrClassName: string
    • Optional replace: object
      • [key: string]: any
    • Optional ejsdata: string

    Returns string

id

  • id(): string
  • Get a unique ID.

    Returns string

    string

indom

  • indom(element: any): boolean
  • Parameters

    • element: any

    Returns boolean

is

  • is(funcType: any, item: any): any
  • Parameters

    • funcType: any
    • item: any

    Returns any

layer

  • Create an instance of a MapLarge ml.ui.map.Layer class on the map provided.

    Example:

    var map = ml.map('mapDiv');
    
    var layerOptions = {
        "query": {
            "select": {
                "type": "geo.dot"
            }
        },
        "visible": true,
        "onClick": "debug"
    };
    var layer = ml.layer(map, layerOptions);
    

    Parameters

    • map: Map

      A reference to the <> instance which will show the layer.

    • Optional layerOptions: IMlUiLayerOptionsInterface

      Layer options object

    • Default value onLoad: function = null

      Callback function for Leaflet. Executed after Leaflet has initialized the map layer.

        • (): void
        • Returns void

    • Default value triggerCallback: string = null

    Returns Layer

    A reference to an instance of the ml.ui.map.Layer class.

layerOptions

ll

  • ll(lat: number, lng: number): LatLng
  • Parameters

    • lat: number
    • lng: number

    Returns LatLng

load

  • load(div: HTMLDivElement, options: any, id: string, callback: Function): any
  • Parameters

    • div: HTMLDivElement
    • options: any
    • id: string
    • callback: Function

    Returns any

log

  • log(object: any): void
  • log(message: string, object?: any): void
  • Cross-browser console logging with tracking.

    Parameters

    • object: any

    Returns void

  • Parameters

    • message: string
    • Optional object: any

    Returns void

logerror

  • logerror(message: string, url: string, lineNumber: string | number, code?: number | string): void
  • Parameters

    • message: string
    • url: string
    • lineNumber: string | number
    • Optional code: number | string

    Returns void

map

  • map(googleMap: Map, mapOptions?: MapOptions): any
  • map(parentElement?: HTMLElement, mapOptions?: MapOptions, existingMap?: any): any
  • map(parentElementId?: string, mapOptions?: MapOptions, existingMap?: any): any
  • Create an instance of a MapLarge ml.ui.map.Map and attach to the Google map reference provided.

    Example:

    var mapOptions = {
        center: { lat: -34.397, lng: 150.644},
        zoom: 8
    };
    var googleMap = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
    var map = ml.map(googleMap);
    

    Parameters

    • googleMap: Map

      Reference to an existing Google map instance.

    • Optional mapOptions: MapOptions

      MapLarge map options object.

    Returns any

    A reference to an instance of the MapLarge <> class which uses the Google map provided.

  • Create an instance of a MapLarge ml.ui.map.Map in the DOM element provided.

    Example:

    var mapOptions = {
        "lat": 38.03078569382294,
        "lng": -95.33935546875,
        "z": 5,
        "searchBox": true,
        "api": "LEAFLET",
        "layers": [],
        "drawingToolsHidden": true,
        "drawingEditingEnabled": true
    };
    var map = ml.map(document.getElementById('mapDiv'), mapOptions);
    

    Parameters

    • Optional parentElement: HTMLElement

      Existing DOM element.

    • Optional mapOptions: MapOptions

      MapLarge map options object.

    • Optional existingMap: any

    Returns any

    A reference to an instance of the MapLarge <> class.

  • Create an instance of a MapLarge ml.ui.map.Map in the DOM element referenced by the element ID value.

    Example:

    var mapOptions = {
        "lat": 38.03078569382294,
        "lng": -95.33935546875,
        "z": 5,
        "searchBox": true,
        "api": "LEAFLET",
        "layers": [],
        "drawingToolsHidden": true,
        "drawingEditingEnabled": true
    };
    var map = ml.map('mapDiv', mapOptions);
    

    Parameters

    • Optional parentElementId: string

      Existing DOM element.

    • Optional mapOptions: MapOptions

      MapLarge map options object.

    • Optional existingMap: any

    Returns any

    A reference to an instance of the MapLarge <> class.

merge

  • merge(base: any, override: any): any
  • Parameters

    • base: any
    • override: any

    Returns any

metadata

mock

  • mock(f: any): any
  • Parameters

    • f: any

    Returns any

nvp

  • nvp(url?: string): any
  • Parameters

    • Optional url: string

    Returns any

o

  • o(prop: any, altvalue: any): any
  • Parameters

    • prop: any
    • altvalue: any

    Returns any

onload

  • onload(callback: function): void
  • Parameters

    • callback: function
        • (): void
        • Returns void

    Returns void

query

replace

  • replace(subject: string, find: string, replaceWith: string): string
  • Parameters

    • subject: string
    • find: string
    • replaceWith: string

    Returns string

round

  • round(num: number, dec: number, fixed?: number): string
  • Parameters

    • num: number
    • dec: number
    • Optional fixed: number

    Returns string

select

  • select<T>(obj: T, selector: function, includeNull?: boolean): any[]
  • Type parameters

    • T

    Parameters

    • obj: T
    • selector: function
        • (key: any, value: any): any
        • Parameters

          • key: any
          • value: any

          Returns any

    • Default value includeNull: boolean = true

    Returns any[]

shortURL

  • shortURL(path?: string, query?: QueryParamObject | string, auth?: boolean): string
  • Parameters

    • Optional path: string
    • Optional query: QueryParamObject | string
    • Default value auth: boolean = true

    Returns string

trim

  • trim(s: any): string
  • Parameters

    • s: any

    Returns string

url

  • url(path?: string, query?: any, servers?: MlServers[], customPrefix?: string, noauth?: boolean): string
  • Parameters

    • Optional path: string
    • Optional query: any
    • Optional servers: MlServers[]
    • Optional customPrefix: string
    • Default value noauth: boolean = false

    Returns string

verifyToken

  • verifyToken(user: string, token: string, callback?: function): void
  • Verify and authenticate using a token. Upon success, it will automatically enable the MapLarge UI for the authenticated user. Upon failure, it will automatically notify the MapLarge UI that the user is unauthenticated.

    Example:

    // verify and authenticate using a token
    ml.verifyToken('maplarge', '1845447458_1440097778', function(response) {
        if (response.success) {
            // authentication was successful
        else {
            // authentication failed
        }
    });
    

    Parameters

    • user: string

      An existing user login.

    • token: string

      An authentication token.

    • Optional callback: function

    Returns void

Object literals

authSettings

authSettings: object

alwaysCallLogin

alwaysCallLogin: boolean

showLoginControls

showLoginControls: boolean

showSplashScreenOnFailure

showSplashScreenOnFailure: boolean

Generated using TypeDoc