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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
/**
* OpenWeatherMap layer (See http://openweathermap.org/tile_map#list)
*
* Copyright 2015-2016 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael J. Rubinsky <mrubinsk@horde.org>
*
*/
HordeMap.Owm = Class.create(
{
initialize: function(opts)
{
},
getLayers: function(layer)
{
return {
'clouds': new OpenLayers.Layer.XYZ(
'OpenWeatherMap Cloud Map',
['http://a.tile.openweathermap.org/map/clouds/${z}/${x}/${y}.png',
'http://b.tile.openweathermap.org/map/clouds/${z}/${x}/${y}.png',
'http://c.tile.openweathermap.org/map/clouds/${z}/${x}/${y}.png'],
{
'isBaseLayer': false,
'sphericalMercator': true,
'opacity': 0.5
}
),
'precipitation': new OpenLayers.Layer.XYZ(
'OpenWeatherMap Precipitation Map',
['http://a.tile.openweathermap.org/map/precipitation/${z}/${x}/${y}.png',
'http://b.tile.openweathermap.org/map/precipitation/${z}/${x}/${y}.png',
'http://c.tile.openweathermap.org/map/precipitation/${z}/${x}/${y}.png'],
{
'isBaseLayer': false,
'sphericalMercator': true,
'opacity': 0.5
}
),
'rain': new OpenLayers.Layer.XYZ(
'OpenWeatherMap Rain Map',
['http://a.tile.openweathermap.org/map/rain/${z}/${x}/${y}.png',
'http://b.tile.openweathermap.org/map/rain/${z}/${x}/${y}.png',
'http://c.tile.openweathermap.org/map/rain/${z}/${x}/${y}.png'],
{
'isBaseLayer': false,
'sphericalMercator': true,
'opacity': 0.5
}
),
'snow': new OpenLayers.Layer.XYZ(
'OpenWeatherMap Snow Map',
['http://a.tile.openweathermap.org/map/snow/${z}/${x}/${y}.png',
'http://b.tile.openweathermap.org/map/snow/${z}/${x}/${y}.png',
'http://c.tile.openweathermap.org/map/snow/${z}/${x}/${y}.png'],
{
'isBaseLayer': false,
'sphericalMercator': true,
'opacity': 0.5
}
),
'pressure_cntr': new OpenLayers.Layer.XYZ(
'OpenWeatherMap Sea-Level Pressure Map',
['http://a.tile.openweathermap.org/map/pressure_cntr/${z}/${x}/${y}.png',
'http://b.tile.openweathermap.org/map/pressure_cntr/${z}/${x}/${y}.png',
'http://c.tile.openweathermap.org/map/pressure_cntr/${z}/${x}/${y}.png'],
{
'isBaseLayer': false,
'sphericalMercator': true,
'opacity': 0.5
}
),
'wind': new OpenLayers.Layer.XYZ(
'OpenWeatherMap Wind Map',
['http://a.tile.openweathermap.org/map/wind/${z}/${x}/${y}.png',
'http://b.tile.openweathermap.org/map/wind/${z}/${x}/${y}.png',
'http://c.tile.openweathermap.org/map/wind/${z}/${x}/${y}.png'],
{
'isBaseLayer': false,
'sphericalMercator': true,
'opacity': 0.5
}
)
};
}
});
|