Search Map
Pages 202
- Home
- 2009 Esri Federal UC
- 2009 Esri International UC
- 2010 Esri Federal UC
- 2010 Esri International UC
- 2011 Esri Federal UC
- 2012 Esri Federal UC
- 2013 Esri Federal GIS Conference
- 2013 Esri International User Conference
- 2015 SDI Special Interest Group
- Add a Custom Profile
- Add an OpenSearch endpoint for Federated Search
- Add Another Tab to the Geoportal Interface
- Add Custom Link to a Search Result
- Add Custom Search Criteria
- Add the Geoportal Search to a List of Search Providers
- Add v1.1.1 FGDC editor to a previous Geoportal release
- AGP TO AGP Harvesting with the Geoportal
- AGS TO AGP Harvesting with the Geoportal
- All gpt.xml file settings
- An Introduction to vi
- Apache Tomcat geoportal logging
- Being a Good Robot
- Best Practice for Edits to JSP files
- Biological or Remote Sensing FGDC xsds
- Browse Tree
- Cart Processor
- Catalog Service
- Clear the Tomcat Work Folder
- Collections
- Common problems and solutions
- Communities and live examples
- Components
- Configure a Directory Server for the Geoportal
- Configure geoportal User and Schema in the PostgreSQL Database
- Configure Previewable Filetypes
- Configure Searching of YouTube
- Configure the gpt.xml File
- Configure Widgets
- Connecting to a User Directory
- Create a user account
- Create Relationships between Resources
- Customizations
- Customize DCAT output
- Customize Metadata Validation
- Database problems
- Database Tables
- DataDownload Tab
- Deploy and Configure the Geoportal Web Application in Tomcat
- Deploy and Configure the Servlet Web Application
- Deploy the Geoportal Web Application
- Details of Lucene Indexing in the Geoportal
- Development topics
- Discovering Resources
- Eclipse Project from Compiled WAR
- Eclipse Project from Source Code
- Enable Search Using an Ontology Service
- Error Messages in the Geoportal Web Application
- Esri Geoportal Server LiveDVD
- Extending the Web Harvester
- Federated Search in Portal for ArcGIS
- Feedback
- FGDC Biological Profile and Remote Sensing Extension
- FGDC Service Checker Integration
- Geoportal Clients for ArcGIS
- Geoportal CSW Clients
- Geoportal Facets using Apache Solr
- Geoportal genie
- Geoportal Project from Compiled WAR
- Geoportal Publish Client
- Geoportal Server 1.2.5 What's New
- Geoportal Server 1.2.6 What's New
- Geoportal Server 1.2.7 What's New
- Geoportal server as a broker
- Geoportal Server Downloads
- Geoportal Server v 1.0 What's New
- Geoportal Server v 1.1 What's New
- Geoportal Server v 1.1.1 What's New
- Geoportal Server v 1.2 What's New
- Geoportal Server v 1.2.2 What's New
- Geoportal Server v 1.2.4 What's New
- Geoportal SPARQL Sample
- Geoportal User Interface Components
- Geoportal Web Application File Organization
- Geoportal XML Editor
- Get Assistance with an Implementation
- GXE Concepts
- GXE Crash Course
- GXE Structure
- GXE Workflow
- High Availability and Large Number of Records
- How to Browse for Resources
- How to Create and Manage My Profile
- How to find all documents of a particular metadata standard
- How to Leave a Resource Review
- How to Login and Manage my Password
- How to Manage and Edit Resources
- How to Publish Resources
- How to Restrict Access to Resources
- How to Search for Resources
- How to Search with an Ontology Service
- How to Set Up an Esri Geoportal Server on Linux
- How to Use Search Page Results
- How to Use the Data Download Feature
- How to View Resource Relationships
- IDE Topics
- Identity Components LDAP and Single Sign On
- Index All Metadata Content
- Indexing and Searching the Time Period of the Content
- Install Apache Tomcat 6
- Install Desktop Tools
- Install Esri Geoportal Server
- Install PostgreSQL 9.1.2
- Install the JDBC .jar Files
- Installation
- Installation Version 1.0
- Installation Version 1.1
- Installation Version 1.2
- Installation Version 1.2.2
- Installation Version 1.2.4
- Installation Version 1.2.5
- Installation Version 1.2.6
- Installation Version 1.2.7
- Installation Version 1.2.8
- Integrate with a Content Management System
- Integrate with the con terra Security Solution
- Localization
- Log In to the Geoportal
- Logging
- Look and Feel of the User Interface
- Main Page
- Map LDAP Attributes on the Registration Page
- Map Viewer
- Online form editing for all publication methods
- Open source acknowledgements
- Oracle WebLogic geoportal logging
- Orientation to the Create Metadata Page
- Perform Preinstallation Computer Setup
- Portal for ArcGIS Integration
- Post Deployment Actions
- Preinstallation
- Preinstallation 0.9
- Preinstallation 1.0 and 1.1.x
- Preinstallation 1.2
- Preinstallation 1.2.2
- Preinstallation 1.2.4
- Preinstallation 1.2.5
- Preinstallation 1.2.6
- Preinstallation 1.2.7
- Preinstallation 1.2.8
- Preview Function
- Publication Components
- Ratings and Comments for Search Results
- Register ArcGIS for Server with the Geoportal
- Release notes
- REST API Syntax
- Sample FGDC metadata.xml
- Scheduled tasks
- Search Components
- Search Map
- Search Widget for Flex
- Search Widget for HTML
- Search Widget for Silverlight
- Security Concepts
- Set Up Systemwide Environment Variables
- Set up the Geoportal Database
- Share Link
- Single Sign On
- Smoketest the Geoportal
- Standards Support
- Supported CSW Profiles for Synchronization
- Theme Library
- Troubleshooting
- Troubleshooting Tips
- Two geoportals on the same server
- Upgrade 1.x to 1.2 database
- Upgrading file system approach
- Upgrading Read This Overview
- Upgrading SVN approach
- Url filter customization
- Use an XSLT to Render the Details Page
- Use Ant to build Geoportal
- User Functions and Roles
- User Management Interface
- Using a geoportal
- Using Lucene Search Text Queries
- Version 0.9
- Version 1.0
- Version 1.1
- Version 1.1.1
- Version 1.2
- Version 1.2.2
- Version 1.2.4
- Version 1.2.5
- Version 1.2.6
- Version 1.2.7
- Version 1.2.8
- What is a geoportal and the geoportal server
- What is the esri geoportal server
- What's New
- wiki template
- WMC Client
- Show 187 more pages…
Clone this wiki locally
Customize the Search Map
The search map is referenced in the \\geoportal\WEB-INF\classes\gpt\config\gpt.xml file. This same service will also be used for the Preview page, the Details page, the metadata editor forms, but not a custom download page. The map is called on the interface by the ArcGIS Server JavaScript API. This topic covers changing the type of search map service used, changing the map's initial extent, considerations to keep in mind when configuring the search map, and how to change the dimensions of the search map on the search page.
Changing the Search Map Service
To change the search map service itself, open the \\geoportal\WEB-INF\classes\gpt\config\gpt.xml file and update the mapServiceUrl to reference a different service.
Important Notes
- In Geoportal Server versions 0.9 to 1.1.1, only ArcGIS Server Map Server services are supported. Starting at Geoportal version 1.2, there are four types of services supported; additional parameters in the gpt.xml file should be configured for the WMS or OpenStreetMap services, and the WMS service has to support geographic coordinate system.
- The ability to preview image services: The service used for your Search map uses a certain projection. When an attempt is made to preview a service on that map, the geoportal checks if valid data can be obtained for placing on the map in its given projection. In the case of feature-like services (GEORSS, KML, etc.) it is always possible because the features themselves can be projected from their original projection to a base map projection using a geometry service. However, in the case of image services (ArcIMS, WMS), obtaining project-able data is limited jpg, png, TIF cannot be reprojected through a geometry service. So if a WMS or ArcIMS Image service registered in the geoportal catalog does not support the projection of your geoportal Search map in its GetCapabilities, you will likely not be able to preview that service in the Geoportal Preview window.
ArcGIS Server Map Server REST endpoint
Supported in all Geoportal Server versions. This must be a REST URL. It cannot be a SOAP URL. The mapServiceType should be set to "dynamic"; if you set it to "tiled", the zooming features of the Javascript map are not rendered correctly. Also, ArcGIS Online services are available for this parameter if your organization doesn't have an ArcGIS Server service it prefers to use.
interactiveMap element configuration example:
- mapServiceUrl="http://serverName/arcgis/rest/services/serviceName/MapServer"
- mapServiceType="dynamic"
WMS service URL
Supported for Geoportal Server version 1.2. For a WMS service URL, the OGC-specific '?request=GetCapabilities&service=WMS' string must not be included. An optional element called mapVisibleLayers is available; mapVisibleLayers is an array of visible WMS layer names. This parameter should be defined only when WMS is used as a map service. Layer names are found in the name element of the WMS GetCapabilities xml.
interactiveMap element configuration example:
- mapServiceUrl="http://serverName/arcgis/services/serviceName/WMSServer"
- mapServiceType="wms"
- mapVisibleLayers="['nameA','nameB','nameC']"
WMTS service URL
Supported for Geoportal Server version 1.2. For a WMTS service URL, the OGC-specific '?request=GetCapabilities&service=WMTS' string must not be included. Support for wmts is very generic; some more elaborated scenarios would require custom algorithms to deal with certain WMTS services. Implementation of such algorithms has been left to your organization's discretion. Refer to https://developers.arcgis.com/en/javascript/jssamples/#search/wmts for API reference and more ideas how to programmatically customize WMTS support.
interactiveMap element configuration example:
- mapServiceUrl="http://v2.suite.opengeo.org/geoserver/gwc/service/wmts"
- mapServiceType="wmts"
The OpenStreetMap service
Supported for Geoportal Server version 1.2. For OpenStreetMap, leave the mapServiceUrl empty.
interactiveMap element configuration example:
- mapServiceUrl=""
- mapServiceType="openstreet"
Important things to remember for the map service
Make sure that the search map service you use considers the following:
- Projected services are supported, but with consequences. As the metadata document envelopes and searches are based upon opposing geographic coordinate system coordinates, the opposing corners cannot be drawn in a projected rectangle. This will cause instances where the search results do not match the visible criteria. In order to use a projected service, the geometryServiceUrl attribute has to be set on the <interactivemap></interactivemap> tag.
- Do not use map services with spatial reference not defined using a well-known ID (WKID). Because the search map is based on the JavaScript API, limitations for the JavaScript API will apply to the search map. There is a known issue with the JavaScript API only supporting coordinate systems defined by a WKID. It is possible for the spatial reference of a map to also be defined as a definition string (WKT), but this will result in odd behaviors in the search map. For example, you may not see a footprint of the metadata records on the search page, you may not be able to define envelope for the metadata created/edited on the Create Metadata form, and Preview will fail for displaying 'graphical' services such as GeoRSS or KML/KMZ.
- For versions 1.0 and 1.1.x only: If you plan to use a map service for your search map that uses a coordinate system other than WGS 1984 - EPSG 4326, then you may have to set the jsapiUrl parameter in the gpt.xml file to reference the version 1.6 JavaScript API instead of the default version 2.0.
Change the Initial Extent of the Map
By default, the initial extent of the geoportal's map is the same as the initial extent of the service itself. At Geoportal Server version 1.2 and higher, it is possible to define the initial extent of the map and therefore override initial extent of the service. This functionality is available for any service type, regardless whether its 'dynamic', 'openstreet', 'wms', or 'wmts'. However, it only affects the map on search page and preview page; it is not enabled on the metadata details page (it already zooms to the envelope), or the metadata editor (which either zooms to the envelope if editing already existing metadata or utilizes a separate mechanism of defining the initial extent if creating new metadata).
How to Configure the Initial Extent
In the gpt.xml file's interactiveMap element, add a 'mapInitialExtent' attribute as shown below. Note, the x and y values must be in Decimal Degrees, regardless of spatial reference. The value of that attribute is a JSON-complaint definition of the Esri JavaScript API extent (http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/extent.htm#webprint).
Example:
<interactiveMap mapInitialExtent="xmin:0,ymin:0,xmax:90,ymax:45,spatialReference:{wkid:4326}" />
or like this, for Web Mercator (extent is state of Oregon):
<interactiveMap mapInitialExtent="xmin:-123.98,ymin:41.95,xmax:-116.94,ymax:46.25,spatialReference:{wkid:102100}" />
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. Below are steps to get you started.
- Open the \\geoportal\catalog\search\criteria.jsp file in a text editor.
- Navigate to the div that has an id of interactiveMap.
- The div has an associated width and height specified in its style attribute. Change the width and height values as needed.
- The div that holds the interactiveMap has a parent div that creates the border around the map. If you change the dimensions of the child div, you must also update the dimensions of this parent div. Locate the div declaration immediately above the interactiveMap div. Change the width and height values of the style attribute as needed.
- 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"
dojotype="dijit.layout.ContentPane"
style="width:537px; height:360px;
cursor:pointer;">
</div>
</div>
</f:verbatim>
- 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\[color] folder. In that file, increase the size of page by adjusting the width value. In the example below, the width is increased from 880px to 980px:
div#gptMainWrap {
width: 980px;
- Save the altered files, restart the geoportal web application, and open a new browser window for your geoportal to see the change in effect.
Customize the Locator Service
If you have enabled the geoportal to interact with a locator service, then there are two ways by default the locator service will work. The first is that it will accept a single field locator parameter as specified in the locatorSingleFieldParameter attribute in the gpt.xml file. The second is that if the entries in the locator field in the geoportal interface are integers with no letters in any of the string, the geoportal will not use the locator service but instead zoom to the geographic coordinates per the integers entered.
To override the behavior for zooming into those coordinates, you can make a change to the gpt.js file. Here's how:
- Make a back-up copy of your \\geoportal\catalog\js\v1.2\gpt.js file, and keep that backup in a different location than the \\geoportal\catalog\js\v1.2 directory.
- Open the gpt.js file, and find the "locate: function".
- In this function, find the line that reads: "if (pt != null) {"
- Comment out that line, and just below the commented portion, add this: "if (false == true && pt != null) {"
- Save the gpt.js file and restart your geoportal web application
- When you test, make sure you've cleared your browser cache as likely it will want to hold on to the cached version of the gpt.js file
Back to Customizations