]> git.openstreetmap.org Git - rails.git/blob - vendor/assets/openlayers/OpenStreetMap.js
Localisation updates from http://translatewiki.net.
[rails.git] / vendor / assets / openlayers / OpenStreetMap.js
1 /**
2  * Class: OpenLayers.Layer.OSM.Mapnik
3  *
4  * Inherits from:
5  *  - <OpenLayers.Layer.OSM>
6  */
7 OpenLayers.Layer.OSM.Mapnik = OpenLayers.Class(OpenLayers.Layer.OSM, {
8     /**
9      * Constructor: OpenLayers.Layer.OSM.Mapnik
10      *
11      * Parameters:
12      * name - {String}
13      * options - {Object} Hashtable of extra options to tag onto the layer
14      */
15     initialize: function(name, options) {
16         var url = [
17             "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
18             "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
19             "http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
20         ];
21         options = OpenLayers.Util.extend({
22             numZoomLevels: 19,
23             buffer: 0,
24             transitionEffect: "resize"
25         }, options);
26         var newArguments = [name, url, options];
27         OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
28     },
29
30     CLASS_NAME: "OpenLayers.Layer.OSM.Mapnik"
31 });
32
33 /**
34  * Class: OpenLayers.Layer.OSM.CycleMap
35  *
36  * Inherits from:
37  *  - <OpenLayers.Layer.OSM>
38  */
39 OpenLayers.Layer.OSM.CycleMap = OpenLayers.Class(OpenLayers.Layer.OSM, {
40     /**
41      * Constructor: OpenLayers.Layer.OSM.CycleMap
42      *
43      * Parameters:
44      * name - {String}
45      * options - {Object} Hashtable of extra options to tag onto the layer
46      */
47     initialize: function(name, options) {
48         var url = [
49             "http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
50             "http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
51             "http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"
52         ];
53         options = OpenLayers.Util.extend({
54             numZoomLevels: 19,
55             buffer: 0,
56             transitionEffect: "resize"
57         }, options);
58         var newArguments = [name, url, options];
59         OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
60     },
61
62     CLASS_NAME: "OpenLayers.Layer.OSM.CycleMap"
63 });
64
65 /**
66  * Class: OpenLayers.Layer.OSM.TransportMap
67  *
68  * Inherits from:
69  *  - <OpenLayers.Layer.OSM>
70  */
71 OpenLayers.Layer.OSM.TransportMap = OpenLayers.Class(OpenLayers.Layer.OSM, {
72     /**
73      * Constructor: OpenLayers.Layer.OSM.TransportMap
74      *
75      * Parameters:
76      * name - {String}
77      * options - {Object} Hashtable of extra options to tag onto the layer
78      */
79     initialize: function(name, options) {
80         var url = [
81             "http://a.tile2.opencyclemap.org/transport/${z}/${x}/${y}.png",
82             "http://b.tile2.opencyclemap.org/transport/${z}/${x}/${y}.png",
83             "http://c.tile2.opencyclemap.org/transport/${z}/${x}/${y}.png"
84         ];
85         options = OpenLayers.Util.extend({
86             numZoomLevels: 19,
87             buffer: 0,
88             transitionEffect: "resize"
89         }, options);
90         var newArguments = [name, url, options];
91         OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
92     },
93
94     CLASS_NAME: "OpenLayers.Layer.OSM.TransportMap"
95 });