Skip to content
Ian Schneider edited this page Mar 4, 2015 · 1 revision

Top Level Map Config (Proposed)

{
    mapconfig: {
        version: number,
        map: {
            center: ol.Coordinate,
            resolution: number,
            projection: string,
            layers: [
                // see Layer below
            ]
        },
        boxes: [
            // see Box below
        ],
        // if provided, see below Annotation otherwise use annotationsURL
        annotations: array
        // url of annotations (assumed response format), see Annotation below
        annotationsURL: string,
        layout: {
            templateName: string,
            // layout specific additional properties
        },
        // css class name
        theme: string
    }
}

Layer

{
    // internal/opaque id
    id: string,
    // external id
    name: string,
    // human title
    title: string,
    // human description
    description: string?,
    // link to more info
    link: string?,
    // internal type name
    type: ['WMS', 'HOT', 'OSM'],
    // service endpoint
    url: string,
    // layer/service specific parameters
    params: {
        // ...
    }
}

Box

{
    // overall start/end
    range: range,
    // storted array of instants or extents (for tick playback)
    ticks: array,
    // if ticks not provided, use for ranged playback (ticks are computed)
    interval: string
    // layer config
    layers: {
        // for each visible layer
        layerId: {
            mode: 'cumulative', 'tick', 'offset',
            // when mode is offset (start and/or end applied to current tick)
            offset: {
                // iso durations
                start: string,
                end: string
            }
        },
    },
    // initial story box center (map pans here when story box active)
    center: number,
    // initial story box zoom (map zooms here when story box active)
    resolution: number,
    // allow user panning
    allowPan: boolean,
    // allow user zooming
    allowZoom: boolean,
    // playback rate per tick
    speed: number,
    title: string,
    // markup
    description: string
}

Annotation

{
    // geojson geometry
    geometry: object,
    // internal id
    id: number,
    properties: {
        // should this appear in the map or just link to a location
        in_map: boolean,
        // should this appear in the 'timeline' display UI
        in_timeline: boolean,
        // in seconds
        start_time: number,
        // in seconds
        end_time: number,
        // rich content
        content: string,
        // display options
        appearance: string,
        title: string
    }
}
Clone this wiki locally