aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands/bexley/js.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-07-04 21:11:19 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-07-10 09:53:33 +0100
commit229d072b0a4fe438c028e9526f39bee1c8db9c40 (patch)
tree6f0d4023cc56108f9f36fc8b3f6742425ea57115 /web/cobrands/bexley/js.js
parent9787e2ffe0edec7a477d4dfdd1ff04719d7b7a96 (diff)
Factor some asset layer styles together.
Diffstat (limited to 'web/cobrands/bexley/js.js')
-rw-r--r--web/cobrands/bexley/js.js38
1 files changed, 4 insertions, 34 deletions
diff --git a/web/cobrands/bexley/js.js b/web/cobrands/bexley/js.js
index 27694f772..907185aea 100644
--- a/web/cobrands/bexley/js.js
+++ b/web/cobrands/bexley/js.js
@@ -23,42 +23,17 @@ var defaults = {
strategy_class: OpenLayers.Strategy.FixMyStreet
};
-var streetlight_default = {
- fillColor: "#FFFF00",
- fillOpacity: 0.6,
- strokeColor: "#000000",
- strokeOpacity: 0.8,
- strokeWidth: 2,
- pointRadius: 6
-};
-
-var pin_prefix = fixmystreet.pin_prefix || document.getElementById('js-map-data').getAttribute('data-pin_prefix');
-
-var streetlight_select = {
- externalGraphic: pin_prefix + "pin-spot.png",
- fillColor: "#55BB00",
- graphicWidth: 48,
- graphicHeight: 64,
- graphicXOffset: -24,
- graphicYOffset: -56,
- backgroundGraphic: pin_prefix + "pin-shadow.png",
- backgroundWidth: 60,
- backgroundHeight: 30,
- backgroundXOffset: -7,
- backgroundYOffset: -22,
- popupYOffset: -40,
- graphicOpacity: 1.0,
-
+var streetlight_select = $.extend({
label: "${Unit_No}",
labelOutlineColor: "white",
labelOutlineWidth: 3,
labelYOffset: 65,
fontSize: '15px',
fontWeight: 'bold'
-};
+}, fixmystreet.assets.style_default_select.defaultStyle);
var streetlight_stylemap = new OpenLayers.StyleMap({
- 'default': new OpenLayers.Style(streetlight_default),
+ 'default': fixmystreet.assets.style_default,
'select': new OpenLayers.Style(streetlight_select)
});
@@ -100,12 +75,7 @@ fixmystreet.assets.add(defaults, {
attribute: 'NSG_REF',
field: 'NSGRef'
},
- stylemap: new OpenLayers.StyleMap({
- 'default': new OpenLayers.Style({
- fill: false,
- stroke: false
- })
- })
+ stylemap: fixmystreet.assets.stylemap_invisible
});
fixmystreet.assets.add(labeled_defaults, {