Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
245 stars 149 forks source link

launch WAB viewer with GeoportalSearch widget fails #177

Closed mhogeweg closed 9 years ago

mhogeweg commented 9 years ago

I notice the following URL is launched from Geoportal Server: http://hogeweg.esri.com:8080/geoviewer/index.html?&url=http%3A%2F%2Fservices.nconemap.gov%2FArcGIS%2Frest%2Fservices%2FNC1Map_Census%2FMapServer

while it appears the viewer is expecting something like this: http://hogeweg:8080/geoviewer/index.html?&resource=ags:http%3A%2F%2Fservices.nconemap.gov%2FArcGIS%2Frest%2Fservices%2FNC1Map_Census%2FMapServer

is this configuration in gpt.xml? or does it require java code change?

My viewer config in gpt.xml:

url="/geoviewer/index.html" className="com.esri.gpt.catalog.search.MapViewerAgsPortal"

mhogeweg commented 9 years ago

use the connector class developed for the flex viewer instead of the Portal for ArcGIS map viewer connector.

className="com.esri.gpt.catalog.search.MapViewerFlex_2_4"

mhogeweg commented 9 years ago

more complete configuration, assuming the WAB viewer is deployed as app geoviewer in the same domain as the Geoportal Server.

<mapViewer>
    <instance 
        url="/geoviewer/index.html" 
        className="com.esri.gpt.catalog.search.MapViewerFlex_2_4">
        <parameter key="wmsBaseMapUrl" value="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
        <parameter key="width" value="1000"/>
        <parameter key="height" value="700"/>
        <parameter key="regexCanConsumeUrl" value=""/>
    </instance>
</mapViewer>