Closed cmccullough2 closed 8 years ago
@cmccullough2 you need to use placeAt: 'right'
in the widget configuration to put a widget in the right-hand pane. sidebarID: 'sidebarRight'
is unnecessary in the widget configuration. You also do not need the style or content properties in configuration for the pane.
I did what you suggested, but I am still getting this error below: The rest of the error message is my local IP address. Thoughts ...
@cmccullough2 I have tested this in the wab demo configuration and it does work. The pane configuration looks like this:
panes: {
left: {
splitter: true,
style: 'width:340px;'
},
right: {
id: 'sidebarRight',
placeAt: 'outer',
region: 'right',
collapsible: true
}
},
and you only need add this to the BaseMapGallery widget's configuration:
placeAt: 'right'
@cmccullough2 For completeness, there is a new Basemap Gallery widget in CMV that works like a drop-down similar to the existing CMV Basemap widget. I prefer that to the WAB version which takes up so much screen real estate.
Thank you. I agree. I can test it for you, but I am sure you have done it many times already. Unfortunately, my 'idea fairy' wants to have a customized basemap with Google Terrain maps. I have successfully done this, but not in a gallery style. Hopefully, I can update my github site with the correct code, so I can share. I have been incredibly busy with things not developer related.
@tmcgee Is there a config for this widget?
For the new CMV BasemapGallery widget? There isn't a config documented explicitly, but you can extract it from the CMV code I added to include a BasemapGallery widget when a Webmap expects one: https://github.com/cmv/cmv-app/blob/develop/viewer/js/viewer/_WebMapMixin.js#L139
You can also include galleryOptions
like this which includes the parameters documented in the Esri Basemap widget.
You mentioned the Google Terrain map, the CMV BaseMapGallery widget should be able to include that mostly unchanged since the BaseMap widget has always used an Esri BaseMapGallery behind the scenes. Just include your array custom basemaps as the basemaps
parameter within the galleryOptions. You'll need a thumbnail image, of course.
I want to put the basemap gallery in the right side panel. The panel displays, but the widget does not. Any suggestions? right: { id: 'sidebarRight', placeAt: 'outer', region: 'right', open: true, splitter: true, style: 'height:200px;',
' }, basemapGallery: { include: true, id: 'basemapGallery', type: 'titlePane', title: 'Basemap Gallery', open: false, path: 'jimu/BaseWidgetPanel', sidebarID: 'sidebarRight', options: { widgetManager: true, config: { widgets: [ { id: 'WABBasemapGallery', uri: 'wabwidgets/BasemapGallery/Widget' } ] } } },collapsible: true, content: '