aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands/bathnes/staff.js
blob: c6a8a9560ed1835563b02316128c783040ef3b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
(function(){

if (!fixmystreet.maps || !fixmystreet.maps.banes_defaults) {
    return;
}

var llpg_stylemap = new OpenLayers.StyleMap({
    'default': new OpenLayers.Style({
        fillOpacity: 0,
        strokeColor: "#000000",
        strokeOpacity: 0.25,
        strokeWidth: 2,
        pointRadius: 10,

        label: '${label_text}',
        labelOutlineColor: "white",
        labelOutlineWidth: 2,
        fontSize: '11px',
        fontWeight: 'bold'
    })
});


fixmystreet.assets.add($.extend(true, {}, fixmystreet.maps.banes_defaults, {
    http_options: {
        params: {
            TYPENAME: "LLPG"
        }
    },
    // LLPG is only to be shown when fully zoomed in
    max_resolution: 0.5971642833948135,
    stylemap: llpg_stylemap,
    non_interactive: true,
    always_visible: true
}));


// Some normally-invisible layers are visible to staff, so replace their
// stylemaps accordingly.
var replacement_stylemaps = {
    "Adopted Highways": new OpenLayers.StyleMap({
        'default': new OpenLayers.Style({
            fill: true,
            fillOpacity: 0,
            // strokeColor: "#55BB00",
            strokeColor: "#FFFF00",
            strokeOpacity: 0.5,
            strokeWidth: 2,
            title: '${description}\n${notes}'
        })
    }),
    "Parks and Grounds": new OpenLayers.StyleMap({
        'default': new OpenLayers.Style({
            fill: false,
            strokeColor: "#008800",
            strokeOpacity: 0.5,
            strokeWidth: 2,
            title: '${site_name}'
        })
    })
};

$.each(fixmystreet.assets.layers, function() {
    if (typeof replacement_stylemaps[this.name] !== 'undefined') {
        this.styleMap = replacement_stylemaps[this.name];
    }
});

})();