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
244 stars 149 forks source link

Behaviour of Add to Map function and widget with ArcGIS Web AppBuilder #291

Closed gavincollins closed 6 years ago

gavincollins commented 6 years ago

I have created a standalone ArcGIS Web AppBuilder (WAB) app using the Developer edition version 2.6 and implemented it as the Map Viewer within my 1.2.9 Geoportal. The WAB app contains the widgets Geoportal Search and Add to Map. I have updated the config.json file of WAB and the gpt.xml of Geoportal as per https://github.com/Esri/geoportal-server/wiki/Configure-Widgets.

The documentation suggests that when the add to map button is clicked within Geoportal, the WAB Viewer should open in a new tab and automatically display the service. My experience is slightly different, I have to manually also click the Add to Map widget within WAB to display the service. Is this correct?

@zguo @rlucchi

zguo commented 6 years ago

haven't try this recently with 1.2.9, seems remember it add to the viewer directly, are you following the steps as in https://github.com/Esri/geoportal-server/wiki/Configure-Widgets?

gavincollins commented 6 years ago

Yes followed steps at https://github.com/Esri/geoportal-server/wiki/Configure-Widgets, updated config.json of WAB and gpt.xml of Geoportal.

I built my WAB using Developer version 2.6.

Thanks, Gavin

gavincollins commented 6 years ago

Ensuring the following parameter is set true within the config.json solved my issue. Now when the add to map button is clicked within Geoportal, the WAB Viewer opens in a new tab and automatically displays the service.

"openAtStart": true

e.g.

{ "position": {
"relativeTo": "browser" }, "placeholderIndex": 1, "id": "_5", "name": "AddToMap", "label": "Add To Map", "version": "2.0.1", "uri": "widgets/AddToMap/Widget", "openAtStart": true

},

Thanks