Integrate a Map Viewer
An external map viewing application is not necessary for full geoportal functionality, as live services can be readily viewed from the built-in Previewer that comes with the geoportal. However, if your organization would like to implement a map viewing application, the Geoportal can be configured to support your viewer. However, you may need to write a class in order to add your custom map viewer. Currently the Geoportal has the class to support Add to Map functionality for the Flex based map viewer. This allows users to see an Add to Map link for live services search results, and launch the service in the Flex based Map Viewer. The instructions to configure the link to launch the map viewer and the Add to Map functionality are described below. For instructions on how to add the Geoportal Search Widget to your existing Flex map viewer, see the instructions in Geoportal Search Widget for Flex.
By adding this map viewer link into the gpt.xml file it will expose an Add to Map link for a search result on the search page and a link labeled Launch Map Viewer on your Geoportal main menu. The Add to Map functionality depends on the implementation of the supporting class. For example out of the box, there is a class called com.esri.gpt.catalog.search.MapViewerFlex which supports adding ArcIMS, ArcGIS Server REST services, OGC WMS, and GeoRSS to a Flex based map viewer application. The steps below describe how to enable this functionality.
- Open the gpt.xml file.
- Find the instance URL attribute of the <mapviewer> element.
- Input the URL to your map viewer application in the instance URL element.
<mapviewer> <instance url="http://server/geoportal/Flexviewer/index.html" className="com.esri.gpt.catalog.search.MapViewerFlex"> <parameter key="width" value="1000"/> <parameter key="height" value="700"/> <parameter key="regexCanConsumeUrl" value=""/> </instance> </mapViewer>
- instance url = the URL of the map viewer application (mandatory)
- className = class name of the map viewer instance (mandatory)
- width = width of the map viewer application (particular to the FlexMapViewer class)
- height = height of the map viewer application (particular to the FlexMapViewer class)
- regexCanConsumeUrl = regular expression to enable the 'add to map' link for other file formats (particular to the FlexMapViewer class). Additional formats would require some customization. An example of how to complete the regular expression section is provided below.
<parameter key="regexCanConsumeUrl" value="*.zip|*.rar"/>
- Save the gpt.xml file.
- Restart the geoportal web application.