Customize the Search Map

Release 9.3.1 E-mail This Topic Printable Version Give Us Feedback

Customize the Search Map

The search map is referenced in the \\geoportal\WEB-INF\classes\gpt\config\gpt.xml file. It is called up on the interface by the ArcGIS Server JavaScript API. To change the search map itself, simply reference a new service URL in the mapServiceUrl attribute of the <interactiveMap> tag.



Some important notes about the characteristics of the search map service:



Change the Search Map Dimensions



If you change the default search map that appears on the search page, you may have to change the dimensions of the map container itself to better suit your geographic area. The code for the search page can be found in the \\geoportal\catalog\search\criteria.jsp file.
  1. Open the \\geoportal\catalog\search\criteria.jsp file in a text editor.
  2. Navigate to the div that has an id of "interactiveMap".
  3. The div has an associated width and height specified in its style attribute. Change the width and height values as needed.
  4. The div that holds the map has a parent div that creates the border around the map. This parent div also needs to have its dimensions change.
  5. Locate the div declaration immediately above the interactiveMap div.
  6. Change the width and height values of the style attribute as needed.
  7. An example where the height and width are changed to 537 pixels and 360 pixels respectively is shown below:



    <f:verbatim>

    <div id="locatorCandidates" class="locatorCandidates"></div>

    <div style="width: 537px; height: 360px; margin-top: 1px; border: 1px solid #000000;">

    <div id="interactiveMap"

    class="tundra" style="width:537px; height:360px; cursor:hand; cursor:pointer;"></div>

    </div>

    </f:verbatim>
  8. It is also important to change the width of the Geoportal page size to accomodate your larger map. To change the width, open the preview.css from the \\geoportal\catalog\skins\themes\blue (or red) folder. In that file, increase the size of page by adjusting the width value:



    div#gptMainWrap {

    width: 980px;

  9. Finally, you must adjust the body text so page text does not overflow over the margins of the interface. Open the main.css file in your \\geoportal\catalog\skins\themes\red (or other theme name) folder. Scroll down to the section where the #gptBody is defined, and change the width to accomodate the larger map. In the example above, change the width to 98%.
  10. Save the altered files, restart Tomcat, and open a new browser window for your Geoportal to see the change in effect.


Change the Search Result Footprint Highlight



By default, the search result footprints in the search map appear as red boxes that highlight yellow when you scroll over the search result in the list of results. If you want to change the color of the footprint and/or highlighting, navigate to the \\geoportal\catalog\search\searchBody.jsp file. The functions "drawFootPrints" and "highlightFootPrint" manage the metadata footprint envelopes. Within these functions, you are able to modify the colors.