[metacat-cvs] metacat/lib/style/skins/knp/spatial africa_frame_config.xml africa_frame_model.xml html.css map.css pma.html

Mathew Perry perry at ecoinformatics.org
Thu Aug 31 18:13:05 PDT 2006


perry       06/08/31 18:13:05

  Modified:    lib/style/skins/knp index.jsp
  Added:       lib/style/skins/knp/spatial africa_frame_config.xml
                        africa_frame_model.xml html.css map.css pma.html
  Log:
  Fixed up mapbuilder config for knp skin
  
  Revision  Changes    Path
  1.4       +2 -16     metacat/lib/style/skins/knp/index.jsp
  
  Index: index.jsp
  ===================================================================
  RCS file: /cvs/metacat/lib/style/skins/knp/index.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- index.jsp	31 Aug 2006 23:37:13 -0000	1.3
  +++ index.jsp	1 Sep 2006 01:13:05 -0000	1.4
  @@ -6,8 +6,8 @@
     *               National Center for Ecological Analysis and Synthesis
     *
     *   '$Author: perry $'
  -  *     '$Date: 2006/08/31 23:37:13 $'
  -  * '$Revision: 1.3 $'
  +  *     '$Date: 2006/09/01 01:13:05 $'
  +  * '$Revision: 1.4 $'
     * 
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
  @@ -25,21 +25,7 @@
     */
   %>
   <%@ include file="../../common/common-settings.jsp"%>
  -<%@ include file="../../common/map-settings.jsp"%>
   <% 
  -
  -//SPATIAL_MAP = "knp";
  -SPATIAL_TEMPLATE = "basic_layers";
  -
  -/* Construct Web Map URL
  -String mapUrl = SPATIAL_BASE_URL + 
  -                "?map=" + SPATIAL_MAP + 
  -                "&template=" + SPATIAL_TEMPLATE +
  -                "&client=" + SPATIAL_CLIENT;
  - */
  -
  -//String mapUrl = "@systemidserver@/@context@/spatial/mapbuilder/demo/metacat_knp/pma.html";
  -
   String mapUrl = "@systemidserver@/@context@/style/skins/knp/spatial/pma.html";
   %>
   <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  
  
  
  1.1                  metacat/lib/style/skins/knp/spatial/africa_frame_config.xml
  
  Index: africa_frame_config.xml
  ===================================================================
  <?xml version="1.0" encoding="utf-8" standalone="no"?>
  <MapbuilderConfig version="0.2.1" id="referenceTemplate" xmlns="http://mapbuilder.sourceforge.net/mapbuilder" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mapbuilder.sourceforge.net/mapbuilder ../../mapbuilder/lib/schemas/config.xsd">
    <!--
      Description: This configuration file determines what components from the
                   Mapbuilder library are to be included in a Main Mapbuilder web
                   page.
      Licence:     GPL as per: http://www.gnu.org/copyleft/gpl.html 
  
      $Id: africa_frame_config.xml,v 1.1 2006/09/01 01:13:05 perry Exp $
    -->
    <!--
      All static images should be relative to this URL.
      This dir is relative the dir of the main html file.
    -->
    <models>
      <Context id="mainMap">
        <defaultModelUrl>africa_frame_model.xml</defaultModelUrl>
        <widgets>
          <Loading id="loading"/>
          <Loading2 id="loading2">
              <mapContainerId>mainMapPane</mapContainerId>
          </Loading2>
  
          <MapPane id="mainMapWidget">
            <htmlTagId>mainMapPane</htmlTagId>
            <mapContainerId>mainMapContainer</mapContainerId>
          </MapPane>
          <AoiBoxWZ id="aoiBox2">
            <htmlTagId>mainMapPane</htmlTagId>
            <stylesheet>../../../../spatial/mapbuilder/lib/widget/GmlRenderer.xsl</stylesheet>
            <lineColor>#FF0000</lineColor>
            <lineWidth>1</lineWidth>
            <crossSize>15</crossSize>
            <mapContainerId>mainMapContainer</mapContainerId>
          </AoiBoxWZ>
          <!-- <CursorTrack id="cursorTrack">
            <mouseHandler>mainMap</mouseHandler>
          </CursorTrack> -->
          <Legend id="legend">
          </Legend>
          <MapScaleText id="mapScaleText">
          </MapScaleText>
        </widgets>
        <tools>
          <AoiMouseHandler id="mainAoi"/>
          <DragPanHandler id="mainDragPan">
            <enabled>false</enabled>
          </DragPanHandler>
          <MouseClickHandler id="mainMouseClick"/>
        </tools>
      </Context>
      
      <Context id="locator">
        <defaultModelUrl>africa_frame_model.xml</defaultModelUrl>
        <widgets>
          <MapPane id="locatorWidget">
            <htmlTagId>locatorMap</htmlTagId>
            <targetModel>mainMap</targetModel>
            <mapContainerId>locatorContainer</mapContainerId>
            <fixedWidth>180</fixedWidth>
          </MapPane>
          <AoiBoxWZ id="aoiBox2">
            <htmlTagId>locatorMap</htmlTagId>
            <stylesheet>../../../../spatial/mapbuilder/lib/widget/GmlRenderer.xsl</stylesheet>
            <lineColor>#FF0000</lineColor>
            <lineWidth>1</lineWidth>
            <crossSize>15</crossSize>
            <mapContainerId>locatorContainer</mapContainerId>
          </AoiBoxWZ>
        </widgets>
        <tools>
          <AoiMouseHandler id="locatorAoi"/>
          <ZoomToAoi id="locatorZoomToAoi">
            <targetModel>mainMap</targetModel>
          </ZoomToAoi>
        </tools>
      </Context>
  
      <Transaction id="transaction">
        <widgets>
          <TransactionResponse id="transactionResponse">
          </TransactionResponse>
        </widgets>
      </Transaction>
      <FeatureCollection id="featureCollection">
        <namespace>xmlns:gml='http://www.opengis.net/gml' xmlns:wfs='http://www.opengis.net/wfs' xmlns:topp='http://www.openplans.org/topp'</namespace>
        <widgets>
          <GmlRendererWZ id="testGmlRenderer">
            <htmlTagId>mainMapPane</htmlTagId>
            <targetModel>mainMap</targetModel>
            <mapContainerId>mainMapContainer</mapContainerId>
            <lineColor>#FF0000</lineColor>
            <lineWidth>1</lineWidth>
            <pointDiameter>10</pointDiameter>
          </GmlRendererWZ>
          <FeatureList id="featureList">
          </FeatureList>
        </widgets>
      </FeatureCollection>
    </models>
    <widgets>
      <ZoomIn id="zoomIn">
        <buttonBar>mainButtonBar</buttonBar>
        <targetModel>mainMap</targetModel>
        <mouseHandler>mainAoi</mouseHandler>
        <class>RadioButton</class>
        <selected>true</selected>
        <enabledSrc>/images/ZoomInEnable.png</enabledSrc>
        <disabledSrc>/images/ZoomInDisable.png</disabledSrc>
        <tooltip xml:lang="en">click map or drag to zoom in</tooltip>
        <!--tooltip xml:lang="fr">cliquer et faire glisser la souris pour agrandir</tooltip-->
      </ZoomIn>
      <ZoomOut id="zoomOut">
        <buttonBar>mainButtonBar</buttonBar>
        <targetModel>mainMap</targetModel>
        <mouseHandler>mainAoi</mouseHandler>
        <class>RadioButton</class>
        <enabledSrc>/images/ZoomOutEnable.png</enabledSrc>
        <disabledSrc>/images/ZoomOutDisable.png</disabledSrc>
        <tooltip xml:lang="en">click map to zoom out</tooltip>
        <!--tooltip xml:lang="fr">cliquer pour rée</tooltip-->
      </ZoomOut>
      <DragPan id="dragPan">
        <buttonBar>mainButtonBar</buttonBar>
        <targetModel>mainMap</targetModel>
        <mouseHandler>mainDragPan</mouseHandler>
        <class>RadioButton</class>
        <enabledSrc>/images/PanEnable.png</enabledSrc>
        <disabledSrc>/images/PanDisable.png</disabledSrc>
        <tooltip xml:lang="en">click and drag to pan</tooltip>
        <!--tooltip xml:lang="fr">cliquer et faire glisser la souris pour voir un autre parti de la carte</tooltip-->
      </DragPan>
      <Reset id="reset">
        <buttonBar>mainButtonBar</buttonBar>
        <targetModel>mainMap</targetModel>
        <class>Button</class>
        <disabledSrc>/images/ResetExtentDisable.png</disabledSrc>
        <tooltip xml:lang="en">reset the map to full extent</tooltip>
        <!--tooltip xml:lang="fr">redonner la carte ses dimensions complèts</tooltip-->
      </Reset>
  
  	<!--
      <EditPoint id="editPoint">
        <buttonBar>mainButtonBar</buttonBar>
        <mouseHandler>mainMouseClick</mouseHandler>
        <class>RadioButton</class>
        <enabledSrc>/images/EditPointEnable.png</enabledSrc>
        <disabledSrc>/images/EditPointDisable.png</disabledSrc>
        <tooltip xml:lang="en">click on map to create a point feature</tooltip>
        <tooltip xml:lang="fr">click on map to create a point feature</tooltip>
        <targetModel>featureCollection</targetModel>
        <transactionResponseModel>transaction</transactionResponseModel>
        <webServiceUrl>../../../../wfs</webServiceUrl>
        <featureXpath>/gml:featureMember/topp:metacat_testdata/topp:the_geom/gml:Point/gml:coordinates</featureXpath>
        <featureXpath>/gml:featureMember/topp:metacat_testdata/topp:ID</featureXpath>
        <defaultModelUrl>template_metacat.xml</defaultModelUrl>
        <targetContext>mainMap</targetContext>
      </EditPoint>
      -->
  
      <!-- <GetFeatureInfo id="getFeatureInfo">
        <buttonBar>mainButtonBar</buttonBar>
         <targetModel>mainMap</targetModel>
        <context>mainMap</context>
         <mouseHandler>mainAoi</mouseHandler>
        <class>RadioButton</class>
      <enabledSrc>/images/QueryEnable.png</enabledSrc>
      <disabledSrc>/images/QueryDisable.png</disabledSrc>
  	  <tooltip xml:lang="en">select single dataset</tooltip>
      </GetFeatureInfo> -->
  
    <!--SetAoi id="setAoi">
    <buttonBar>mainButtonBar</buttonBar>
    <targetModel>mainMap</targetModel>
    <mouseHandler>mainAoi</mouseHandler>
    <class>RadioButton</class>
    <enabledSrc>/images/SetAoiEnable.png</enabledSrc>
    <disabledSrc>/images/SetAoiDisable.png</disabledSrc>
    </SetAoi-->
  
    <AoiMetacatQuery id="aoiMetacatQuery">
  	  <buttonBar>mainButtonBar</buttonBar>
  	  <targetModel>mainMap</targetModel>
  	  <mouseHandler>mainAoi</mouseHandler>
  	  <class>RadioButton</class>
            <enabledSrc>/images/QueryEnable.png</enabledSrc>
            <disabledSrc>/images/QueryDisable.png</disabledSrc>
  	  <tooltip xml:lang="en">select multiple datasets</tooltip>
            <metacat>http://pmark.msi.ucsb.edu:8180/knb/metacat</metacat>
            <skin>knp</skin>
        <pixel_tolerance>5</pixel_tolerance>
    </AoiMetacatQuery>
    
    </widgets>
    <skinDir>../../../../spatial/mapbuilder/lib/skin/default</skinDir>
    <!-- Url of LOCAL redirection script, required to access external URLs -->
    <proxyUrl>../../proxy.jsp</proxyUrl>
    <!-- 
    <serializeUrl>../../../../spatial/mapbuilder/writeXml</serializeUrl>
     -->
  </MapbuilderConfig>
  
  
  
  
  1.1                  metacat/lib/style/skins/knp/spatial/africa_frame_model.xml
  
  Index: africa_frame_model.xml
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
  <ViewContext version="1.0.0" id="atlas_world"
  xmlns="http://www.opengis.net/context"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd">
    <General>
      <Window width="250" height="375" />
      <BoundingBox SRS="EPSG:4326" minx="30.5912" miny="-25.535" maxx="32.3037" maxy="-22.325" />
      <Title>Krueger National Park</Title>
      <KeywordList>
        <Keyword>metacat</Keyword>
        <Keyword>EML</Keyword>
      </KeywordList>
      <Abstract>Low resolution.</Abstract>
    </General>
    <LayerList>
      
      <Layer queryable="0" hidden="1">
      <Server service="wms" version="1.1.0" title="wms">
      <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"  xlink:type="simple" xlink:href="http://wms.jpl.nasa.gov/wms.cgi?"/>
      </Server>
      <Name>global_mosaic</Name> 
      <!-- <Name>BMNG</Name> -->
      <Title>satellite imagery</Title>
      <SRS>EPSG:4326</SRS>
      <FormatList>
      <Format current="1">image/jpeg</Format>
      </FormatList>
      </Layer>
     
      <Layer queryable="0" hidden="0">
        <Server service="OGC:WMS" version="1.1.1"
        title="kruger boundary">
          <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
        </Server>
        <Name>knp:SOILS_VENTER</Name>
        <Title>Kruger soils</Title>
        <SRS>EPSG:4326</SRS>
        <FormatList>
          <Format current="1">image/png</Format>
        </FormatList>
      </Layer>
  
      <Layer queryable="0" hidden="0">
        <Server service="OGC:WMS" version="1.1.1"
        title="kruger boundary">
          <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
        </Server>
        <Name>knp:INFRA_ROADSPUBLIC_VIEW</Name>
        <Title>Kruger Park roads</Title>
        <SRS>EPSG:4326</SRS>
        <FormatList>
          <Format current="1">image/png</Format>
        </FormatList>
      </Layer>
  	
      <Layer queryable="0" hidden="0">
        <Server service="OGC:WMS" version="1.1.1"
        title="kruger boundary">
          <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
        </Server>
        <Name>knp:BNDRY_BUSINESSUNITS</Name>
        <Title>Kruger Park business units</Title>
        <SRS>EPSG:4326</SRS>
        <FormatList>
          <Format current="1">image/png</Format>
        </FormatList>
      </Layer>
     
      
      <Layer queryable="0" hidden="0">
        <Server service="OGC:WMS" version="1.1.1"
        title="kruger boundary">
          <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
        </Server>
        <Name>knp:BNDRY_KRUGERNP</Name>
        <Title>Kruger Park boundaries</Title>
        <SRS>EPSG:4326</SRS>
        <FormatList>
          <Format current="1">image/png</Format>
        </FormatList>
      </Layer>
  
      <Layer queryable="0" hidden="0">
        <Server service="OGC:WMS" version="1.1.1"
        title="DatasetBounds">
          <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
        </Server>
        <Name>metacat:data_bounds</Name>
        <Title>Dataset Bounds</Title>
        <SRS>EPSG:4326</SRS>
        <FormatList>
          <Format current="1">image/gif</Format>
        </FormatList>
      </Layer>
  
  
      <Layer queryable="0" hidden="0">
        <Server service="OGC:WMS" version="1.1.1"
        title="DatasetPoints">
          <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
        </Server>
        <Name>metacat:data_points</Name>
        <Title>Dataset Points</Title>
        <SRS>EPSG:4326</SRS>
        <FormatList>
          <Format current="1">image/gif</Format>
        </FormatList>
      </Layer>
  
      <!-- <Layer queryable="1" hidden="0">
        <Server service="OGC:WMS" version="1.1.1"
        title="Datasets">
          <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
        </Server>
        <Name>metacat:metacat_testdata</Name>
        <Title>Datasets</Title>
        <SRS>EPSG:4326</SRS>
        <FormatList>
          <Format current="1">image/png</Format>
        </FormatList>
      </Layer> -->
      
    </LayerList>
  </ViewContext>
  
  
  
  1.1                  metacat/lib/style/skins/knp/spatial/html.css
  
  Index: html.css
  ===================================================================
  h2 {
    color: red;
    background-color: silver;
  }
  
  
  INPUT.bareinput {
    border: 0px blue none;
    font: 8pt Verdana, geneva, arial, sans-serif;
    color: #000000;
    background-color: transparent;
  }
  
  #mainMapContainer {
    border: 1px solid olive;
    cursor: crosshair;
    text-align: left;
    background-color: white;
  }
  
  #legend td {
  	/*
    font-size: 70%; 
    font-family: cursive;
    background-color: silver;
    */
    font: 11pt arial, sans-serif;
    color: #000;
  }
  
  
  img#query_topp\:metacat_testdata { display:none; }
  
  
  
  
  1.1                  metacat/lib/style/skins/knp/spatial/map.css
  
  Index: map.css
  ===================================================================
   /*
    *   '$RCSfile: map.css,v $'
    *     Purpose: Default style sheet for KNB project web pages 
    *              Using this stylesheet rather than placing styles directly in 
    *              the KNB web documents allows us to globally change the 
    *              formatting styles of the entire site in one easy place.
    *   Copyright: 2000 Regents of the University of California and the
    *               National Center for Ecological Analysis and Synthesis
    *     Authors: Matt Jones
    *
    *    '$Author: perry $'
    *      '$Date: 2006/09/01 01:13:05 $'
    *  '$Revision: 1.1 $'
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version.
    *
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
  #mapContainer {
      position: absolute;
      right: 0px;
      top: 0px;
  }
  
  #mapControl {
  	height: 48px;
  	width: 31px;
  }
  
  div#mapControlHide,
  div#mapControlShow {
  	width: 100%;
  	height: 100%;
  	vertical-align: center;
  }
  
  div#mapControl a {
  	display: block;
  	margin: 0; padding:0;
  	width:100%;
  	height:100%;
  	overflow:hidden;
  	text-decoration:none;
  }
  
  
  div#mapControlShow {
  	background: transparent url(../images/show_map.gif) no-repeat bottom left;
  }
  
  div#mapControlHide {
  	background: transparent url(../images/hide_map.gif) no-repeat bottom left;
  }
  
  div#mapControlShow a {
  	background: transparent url(../show_map.gif) no-repeat top left;
  	text-decoration:none;
  }
  div#mapControlHide a {
  	background: transparent url(../hide_map.gif) no-repeat top left;
  	text-decoration:none;
  }
  
  div#mapControlShow a:hover {
  	background:none;
  	text-decoration: none;
  }
  
  div#mapControlHide a:hover {
  	background:none;
  	text-decoration: none;
  }
  
  
  
  
  1.1                  metacat/lib/style/skins/knp/spatial/pma.html
  
  Index: pma.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  
  
  <html>
  <head>
  <title>Metacat Spatial Option Demo</title>
  
  <link rel="stylesheet" href="/style.css" type="text/css"/>
  <link rel="stylesheet" href="./html.css" type="text/css"/>
  
  <link href="../knp.css" type="text/css" rel="stylesheet"/>
  <script src="../knp.js" type="text/JavaScript" language="Javascript"></script>
  
  <link href="./map.css" type="text/css" rel="stylesheet"/>
  
  <script src="../../../common/prototype.js" type="text/JavaScript" language="Javascript"></script>
  <script src="../../../common/effects.js" type="text/JavaScript" language="Javascript"></script>
  
  <script language="JavaScript">
            function submitform(action,form_ref) {
              form_ref.action.value=action;
              form_ref.sessionid.value="";
              form_ref.qformat.value="knp";
              form_ref.submit();
            }
  </script>
  
  <script type="text/javascript">
    var mbConfigUrl="africa_frame_config.xml";
  </script>
  <script type="text/javascript" src="../../../../spatial/mapbuilder/lib/Mapbuilder.js"></script>
  
  
  <script language="JavaScript">
  function show_map() {
  	Element.show('mapControlHide')
  	Element.hide('mapControlShow')
  
  	// reset the map position in the iframe
  	$("mapContainer").setAttribute("style", "right:-212px;");
  
  	// expand the iframe
  	var frm = top.getMapFrame();
  	frm.setAttribute("style", "width:295px;right:0;");
  
  	var element = $('mapContainer')
  	new Effect.Move(element, { x: -212, y: 0, duration: 0.2})
  
  	//setTimeout('$("mapContainer").setAttribute("style", "position:absolute;left:0;")', 300);
  
  	//alert('moved');
  	//do_move_anim(-260);
  }
  
  /*
   * Don't animate.  Just shrink the outer frame and make left:0.
   */
  function hide_map() {
  	Element.show('mapControlShow')
  	Element.hide('mapControlHide')
  	var element = $('mapContainer')
  	//new Effect.Move(element, { x: 260, y: 0, duration: 0.1})
  	$("mapContainer").setAttribute("style", "left:0px;");
  
  
  
  	//alert('moved');
  	//setTimeout('getElementsByClassName(top.document, "iframe", "iframeMap")[0].setAttribute("style", "width:35px;right:0;")', 200);
  
  	// shrink the iframe
  	var frm = top.getMapFrame();
  	frm.setAttribute("style", "width:35px;right:-3px;");
  
  
  	//alert('closed');
  	//alert('now');
  	//setTimeout('$("mapContainer").setAttribute("style", "left:0;")', 400);
  	//$("mapContainer").setAttribute("style", "right:-212px;");
  	//alert($("mapContainer").getAttribute("style"));
  	//alert('adjusted');
  
  	//do_move_anim(260);
  }
  
  
  //
  // animate the drawer
  //
  function do_move_anim(xdelta) {
  
  	var element = $('mapContainer')
  	var old_right = Element.getStyle(element, 'right')
  	//alert("right:" + old_right);
  	old_right = old_right.substring(0,old_right.indexOf("px"));
  	var new_right = old_right + xdelta;
  	new_right = new_right + "px";
  	new_right = "0px";
  	var new_left;
  
  	if (xdelta > 0) {
  		// hide
  		new_left = "0px";
  		new_right = "0px";
  	} else {
  		// show
  		new_left = "0px";
  		new_right = "0px";
  	}
  
  	var newStyle = {
  		left: new_left,
  		right: new_right};
  	Element.setStyle(element, newStyle);
  		
  
  	//alert(xdelta + ": " + Element.getStyle(element, 'left') + "=l R=" + Element.getStyle(element, 'right'));
  /*
  */
  	//new Effect.Move(element, { x: xdelta, y: 0, duration: 0.3})
  
  	/*
  	new Effect.Move(element, { x: xdelta, y: 0, duration: 0.3, 
  		afterFinishInternal: function(effect) { with(Element) {
  			undoPositioned(effect.element); setStyle(effect.element, newStyle);	}}})
  	new Effect.Move(element, { x: xdelta, y: 0, duration: 0.3, 
  		afterFinishInternal: function(effect) { with(Element) {
  			setStyle(effect.element, newStyle);	}}})
  			*/
  
  	//Element.setStyle(element, newStyle);
  
  
  
  	//alert(Element.getStyle(element, 'left') + "=l R=" + Element.getStyle(element, 'right'));
  }
  
  function getElementsByClassName(oElm, strTagName, strClassName){
      var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
      var arrReturnElements = new Array();
      strClassName = strClassName.replace(/\-/g, "\\-");
      var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
      var oElement;
      for(var i=0; i<arrElements.length; i++){
          oElement = arrElements[i];      
          if(oRegExp.test(oElement.className)){
              arrReturnElements.push(oElement);
          }   
      }
      return (arrReturnElements)
  }
  
  
  
  </script>
  </head>
  <!--
   <body onload="document.location='/wms/GetCapabilities'">
   -->
  <body onload="mbDoLoad()">
  
  <div id="mapContainer">
  
  <table border="0" cellpadding="0" cellspacing="0">
  	<tr>
      <td style="border-width:0;">
  		<div id="mapControl">
  			<div id="mapControlShow" style="display:none"><a href="#" onclick="show_map();return false;">&nbsp;</a></div>
  			<div id="mapControlHide"><a href="#" onclick="hide_map();return false;">&nbsp;</a></div>
  		</div>
      </td>
      <td valign="top">
  		<table border="0" style="border: 1px solid #525d76;">
  			<tr>
                          <!-- <td colspan="2" id="mainMapPane" style="background-color: white;" /> -->
                          <td colspan="2">
                            <div id="mainMapPane" style="background-color:white;" />
                            <div id="loading">
                             <p> Loading Map
                              <img src="../../../../spatial/mapbuilder/lib/skin/default/images/Loading.gif"/>
                             </p>
                           </div>
                          </td>
  
  			</tr>
  			<tr align="left">
  				<td>
  
  				<table border="0">
  				  <tr>
  					<!--<td align="center" id="mapScaleText"/>
  							<td colspan="1"></td>
  					<td align="center" id="cursorTrack" />-->
  				  </tr>
  						<tr> <td id="locatorMap" style="display:none"/> </tr>
  						<tr> <td id="mainButtonBar" />  </tr>
  						<tr> <td id="legend" valign="top"/> </tr> 
  						<tr> <td colspan="3" id="featureList" /> </tr>
  				</table>
  
  				</td>
  			</tr>
        
  		</table>
  		</td>
  	</tr>
  </table>
  </div>
  
  <div id="debug"></div>
  
  </body>
  </html>
  
  
  


More information about the Metacat-cvs mailing list