%@ page import="org.ossim.omar.BaseQuery; org.ossim.omar.VideoDataSetQuery; org.ossim.omar.VideoDataSetSearchTag" contentType="text/html;charset=UTF-8" %>
OMAR: Video Search
var mapWidget = new MapWidget();
function init()
{
var Dom = YAHOO.util.Dom;
var Event = YAHOO.util.Event;
var tabView = new YAHOO.widget.TabView('demo');
var oElement = Dom.get("startDate_hour");
var oElement1 = Dom.get("startDate_minute");
var oElement2 = Dom.get("endDate_hour");
var oElement3 = Dom.get("endDate_minute");
Event.addListener(oElement, "change", updateOmarFilters);
Event.addListener(oElement1, "change", updateOmarFilters);
Event.addListener(oElement2, "change", updateOmarFilters);
Event.addListener(oElement3, "change", updateOmarFilters);
var setupBaseLayers = function()
{
var baseLayer = null;
baseLayer = new OpenLayers.Layer.WMS("${foo.title}", "${foo.url}",
{layers: "${foo.layers}", format: "${foo.format}"},
{isBaseLayer: true, buffer: 0,transitionEffect: "resize"});
mapWidget.setupBaseLayers(baseLayer);
};
mapWidget.setupMapWidget();
setupBaseLayers();
mapWidget.setupDataLayer("${dataWMS.title}", "${dataWMS.url}", "${dataWMS.layers}", "${dataWMS.styles}", "${dataWMS.format}");
mapWidget.changeMapSize();
mapWidget.setupAoiLayer();
mapWidget.setupToolBar();
mapWidget.setupMapView("${queryParams?.viewMinLon ?: -180}", "${queryParams?.viewMinLat ?: -90}", "${queryParams?.viewMaxLon ?: 180}", "${queryParams?.viewMaxLat ?: 90}");
// SCOTTIE - Will have to revisit this...
// mapWidget.setupQueryFields("${queryParams.searchMethod}");
var minLon = ${queryParams?.aoiMinLon ?: 'null'};
var minLat = ${queryParams?.aoiMinLat ?: 'null'};
var maxLon = ${queryParams?.aoiMaxLon ?: 'null'};
var maxLat = ${queryParams?.aoiMaxLat ?: 'null'};
if ( minLon && minLat && maxLon && maxLat)
{
mapWidget.initAOI(minLon, minLat, maxLon, maxLat);
}
if("${queryParams.searchMethod}" == "BBOX")
{
mapWidget.toggleBboxCheckBox()
}
else if("${queryParams.searchMethod}" == "RADIUS")
{
mapWidget.togglePointRadiusCheckBox()
}
else
{
mapWidget.toggleBboxCheckBox()
}
updateOmarFilters();
}
function updateOmarFilters()
{
var numberOfNames = parseInt("${queryParams?.searchTagNames.size()}");
var numberOfValues = parseInt(${queryParams?.searchTagValues.size()});
mapWidget.updateOmarFilters(
$("startDate_day").value, $("startDate_month").value, $("startDate_year").value, $("startDate_hour").value, $("startDate_minute").value,
$("endDate_day").value, $("endDate_month").value, $("endDate_year").value, $("endDate_hour").value, $("endDate_minute").value,
numberOfNames, numberOfValues
);
}