Modifying the KARS GeoNetwork metadata catalog

We recently had an inquiry at the Kansas Applied Remote Sensing Program (KARS) about modifications we made to our GeoNetwork instance. Specifically, the question was about setting the Intermap window to open in the large format on load, and setting the map extent.

We run the Windows version of GeoNetwork and have used these modifications for Versions 2.2, 2.4.2, and 2.4.3.

First, to call the Intermap function we modified the following files:
\geonetwork\web\geonetwork\xsl\main.xsl
\geonetwork\web\geonetwork\xsl\main-page.xsl
\geonetwork\web\geonetwork\geonetwork.css

1) main.xsl – @ line 18 added ‘openIntermap’ function call to the onLoad event


<body onload="init(), openIntermap()">

2) main-page.xsl – @ line 281, “fillMeWithIntermap”, add ‘width: 700px;’

<tr id="intermaprow"  width="100%" height="0">
  <xsl:comment>COLLAPSABLE MAP</xsl:comment>
    <td>
      <strong><div id="fillMeWithIntermap" style="display: none; width: 700px;"></strong>
      <!--  This DIV will be filled dynamically with intermap contents -->
      </div>
    </td>
</tr>

Note that this modification did require some additional CSS modifications, specifically the Z-Index of the map elements had to be re-ordered so they would be drawn last.

Second, modifying the properties that Intermap used at load were modified in the file:
\geonetwork\web\intermap\scripts\im_bigmap.js

3) In row 19 and 20, change the initial width and height of window from w=368 h=276 to w=450 h=300.

 // these are the values of initial width and height. 
var im_bm_wsize0 = 450;
var im_bm_hsize0 = 300;

4) Inserted a line (line 19) to define the map extent (zoom) of the Intermap big map window to North America.

 Line 19: im_bm.setBBox(51.56155, -66.07543, 21.629387, -125.93976)
Line 20 for comments: // view of the United States (minx="-125.93976" miny="21.629387" maxx="-66.07543" maxy="51.56155") 

5) Modified the default scale zoom parameters for the intermap window on load to include 1:24,000.
File: \geonetwork\web\intermap\xsl\index-embedded.xsl

At line 141, an option for the value “24000” was added


<select name="im_setscale" id="im_setscale" onchange="javascript:im_bm_setScale();">
<option id="im_currentscale" value=""><xsl:value-of select="/root/gui/strings/setScale</option>                    
    <option value="50000000">1:50.000.000</option>
    <option value="10000000">1:10.000.000</option>
    <option value="5000000">1:5.000.000</option>
    <option value="1000000">1:1.000.000</option>
    <option value="500000">1:500.000</option>
    <option value="100000">1:100.000</option>
    <option value="50000">1:50.000</option>
    <option value="24000">1:24.000</option>
    <option value="10000">1:10.000</option>
    <option value="5000">1:5.000</option>
    <option value="1000">1:1.000</option>                    
</select>

Additional modifications can be found in the following document KBS_GeoNetwork_Modifications. Any comments or additional suggestions for modifications are welcome.