]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dev/files/default/ooc/openlayers/OOC.js
Convert various URLs to https
[chef.git] / cookbooks / dev / files / default / ooc / openlayers / OOC.js
1 /**
2  * Namespace: Util.OOC
3  */
4 OpenLayers.Util.OOC = {};
5
6 /**
7  * @requires OpenLayers/Layer/XYZ.js
8  *
9  * Class: OpenLayers.Layer.NPE
10  *
11  * Inherits from:
12  *  - <OpenLayers.Layer.XYZ>
13  */
14 OpenLayers.Layer.NPE = OpenLayers.Class(OpenLayers.Layer.XYZ, {
15     /**
16      * Constructor: OpenLayers.Layer.NPE
17      *
18      * Parameters:
19      * name - {String}
20      * url - {String}
21      * options - {Object} Hashtable of extra options to tag onto the layer
22      */
23     initialize: function(name, options) {
24         var url = [
25             "https://a.ooc.openstreetmap.org/npe/${z}/${x}/${y}.png",
26             "https://b.ooc.openstreetmap.org/npe/${z}/${x}/${y}.png",
27             "https://c.ooc.openstreetmap.org/npe/${z}/${x}/${y}.png"
28         ];
29         options = OpenLayers.Util.extend({
30             numZoomLevels: 16,
31             transitionEffect: "resize",
32             sphericalMercator: true
33         }, options);
34         var newArguments = [name, url, options];
35         OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
36     },
37
38     CLASS_NAME: "OpenLayers.Layer.NPE"
39 });
40
41 /**
42  * @requires OpenLayers/Layer/XYZ.js
43  *
44  * Class: OpenLayers.Layer.OS7
45  *
46  * Inherits from:
47  *  - <OpenLayers.Layer.XYZ>
48  */
49 OpenLayers.Layer.OS7 = OpenLayers.Class(OpenLayers.Layer.XYZ, {
50     /**
51      * Constructor: OpenLayers.Layer.OS7
52      *
53      * Parameters:
54      * name - {String}
55      * url - {String}
56      * options - {Object} Hashtable of extra options to tag onto the layer
57      */
58     initialize: function(name, options) {
59         var url = [
60             "https://a.ooc.openstreetmap.org/os7/${z}/${x}/${y}.jpg",
61             "https://b.ooc.openstreetmap.org/os7/${z}/${x}/${y}.jpg",
62             "https://c.ooc.openstreetmap.org/os7/${z}/${x}/${y}.jpg"
63         ];
64         options = OpenLayers.Util.extend({
65             numZoomLevels: 15,
66             transitionEffect: "resize",
67             sphericalMercator: true
68         }, options);
69         var newArguments = [name, url, options];
70         OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
71     },
72
73     CLASS_NAME: "OpenLayers.Layer.OS7"
74 });
75
76 /**
77  * @requires OpenLayers/Layer/XYZ.js
78  *
79  * Class: OpenLayers.Layer.OS1
80  *
81  * Inherits from:
82  *  - <OpenLayers.Layer.XYZ>
83  */
84 OpenLayers.Layer.OS1 = OpenLayers.Class(OpenLayers.Layer.XYZ, {
85     /**
86      * Constructor: OpenLayers.Layer.OS1
87      *
88      * Parameters:
89      * name - {String}
90      * url - {String}
91      * options - {Object} Hashtable of extra options to tag onto the layer
92      */
93     initialize: function(name, options) {
94         var url = [
95             "https://a.ooc.openstreetmap.org/os1/${z}/${x}/${y}.jpg",
96             "https://b.ooc.openstreetmap.org/os1/${z}/${x}/${y}.jpg",
97             "https://c.ooc.openstreetmap.org/os1/${z}/${x}/${y}.jpg"
98         ];
99         options = OpenLayers.Util.extend({
100             numZoomLevels: 18,
101             transitionEffect: "resize",
102             sphericalMercator: true
103         }, options);
104         var newArguments = [name, url, options];
105         OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
106     },
107
108     CLASS_NAME: "OpenLayers.Layer.OS1"
109 });
110
111 /**
112  * @requires OpenLayers/Layer/XYZ.js
113  *
114  * Class: OpenLayers.Layer.NPEScotland
115  *
116  * Inherits from:
117  *  - <OpenLayers.Layer.XYZ>
118  */
119 OpenLayers.Layer.NPEScotland = OpenLayers.Class(OpenLayers.Layer.XYZ, {
120     /**
121      * Constructor: OpenLayers.Layer.NPEScotland
122      *
123      * Parameters:
124      * name - {String}
125      * url - {String}
126      * options - {Object} Hashtable of extra options to tag onto the layer
127      */
128     initialize: function(name, options) {
129         var url = [
130             "https://a.ooc.openstreetmap.org/npescotland/${z}/${x}/${y}.jpg",
131             "https://b.ooc.openstreetmap.org/npescotland/${z}/${x}/${y}.jpg",
132             "https://c.ooc.openstreetmap.org/npescotland/${z}/${x}/${y}.jpg"
133         ];
134         options = OpenLayers.Util.extend({
135             numZoomLevels: 16,
136             transitionEffect: "resize",
137             sphericalMercator: true
138         }, options);
139         var newArguments = [name, url, options];
140         OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
141     },
142
143     CLASS_NAME: "OpenLayers.Layer.NPEScotland"
144 });
145