The WeatherRadar layer allows you to display weather data overlayed on the current map. Using the display
parameter, you can choose to display
either "radar" or "satellite".
Setting the display parameter to "radar" will allow you to display radar weather data on your map.
var map = new ALKMaps.Map("map");
var map = new ALKMaps.Map("map");
var layer = new ALKMaps.Layer.BaseMap( "ALK Maps", {style:ALKMaps.STYLE.LIGHTNESS}, {displayInLayerSwitcher: false});
map.addLayer(layer);
var radarLayer = new ALKMaps.Layer.WeatherRadar(
"Radar",
{
display: "radar"
},
{
opacity: 1
}
);
map.addLayer(radarLayer);
var center = new ALKMaps.LonLat(-96, 38).transform(new ALKMaps.Projection("EPSG:4326"), map.getProjectionObject());
map.setCenter(center, 4);
Setting the display parameter to "satellite" will allow you to display satellite weather data on your map.
var map = new ALKMaps.Map("map");
var map = new ALKMaps.Map("map");
var layer = new ALKMaps.Layer.BaseMap( "ALK Maps", {style:ALKMaps.STYLE.LIGHTNESS}, {displayInLayerSwitcher: false});
map.addLayer(layer);
var cloudLayer = new ALKMaps.Layer.WeatherRadar(
"Satellite",
{
display: "satellite"
},
{
opacity: 0.5
}
);
map.addLayer(cloudLayer);
var center = new ALKMaps.LonLat(-96, 38).transform(new ALKMaps.Projection("EPSG:4326"), map.getProjectionObject());
map.setCenter(center, 4);