Select to view content in your preferred language

JS CMV source code - How to load a widget to Bottom Panel

4338
7
Jump to solution
07-23-2015 07:26 AM
ShaningYu
Honored Contributor

I reviewed the wonderful JS CMV project's source code also by referring to its document about panes: Panes - CMV .  Added the piece of code

panes: {

   left: { id: 'sidebarLeft', placeAt: 'outer', collapsible: true, region: 'left' },

   bottom: { id: 'sidebarBottom', placeAt: 'outer', splitter: true, collapsible: true, region: 'bottom' }

},

then the bottom pane displays below the map pane.  Then, I create an empty widget \digit\DataGrid, which contains \css\, \templates.

\DataGrid.htm.  Now, how should I specify it on its widget part?  Specifically, how to fill the content for the '...'.  Thanks.

widget: {

  ...

  type: 'contentPane', placeAt: 'bottom' }

0 Kudos
1 Solution

Accepted Solutions
thejuskambi
Frequent Contributor

you should probably would like to use the domNode type and also provide srcNodeRef. check out the AttributeTable widget, provide in one of the contributed widgets.

tmcgee/cmv-widgets · GitHub

View solution in original post

0 Kudos
7 Replies
thejuskambi
Frequent Contributor

you should probably would like to use the domNode type and also provide srcNodeRef. check out the AttributeTable widget, provide in one of the contributed widgets.

tmcgee/cmv-widgets · GitHub

0 Kudos
ShaningYu
Honored Contributor

Wonderful.  Will go through the sample code.  Thanks a lot.

0 Kudos
ShaningYu
Honored Contributor

Got the source code V1.3.4, but could not find the config/attributesTable file.  Could you provide it?  Thanks.

0 Kudos
thejuskambi
Frequent Contributor

I think the AttributeTable is not part of the standard widgets provided by CMV. so you would need to get it directly from the github and just take apart of them into you new version of cmv.

0 Kudos
TimMcGee1
Frequent Contributor

Hi Shaning,

Please post your questions related to CMV in the this GeoNet group: CMV - Configurable Map Viewer That will make them easier to find for folks such as myself providing CMVsupport and for other users with similar questions.

Thanks,

Tim McGee

0 Kudos
RyanSwitzer1
New Contributor

Hi Tim,

I am having trouble figuring out how to implement these source codes into my web app. From https://web-appbuilder-widget-search.surge.sh/ is is very easy to download the zipped folder and add in custom widgets in web app builder Developers edition. I don' t understand however how to utilize codes on https://github.com/tmcgee/cmv-widgets/tree/master/widgets/OpenExternalMap

I am trying to have the user click the map and have a secondary window (Google earth, Bing, or mapillary) open up the street view/ street side location.

Thanks,

Ryan 

0 Kudos
TimMcGee1
Frequent Contributor

Ryan,

Here is a simple. working example of how to include the OpenExternalMap widget in an application. https://github.com/tmcgee/cmv-widgets/blob/master/config/openexternalmap.js. Similar to what I show in that repository, I typically put contributed or custom widgets in a separate folder from the core CMV widgets. That makes it much easier to upgrade an application (WAB applications are not as easy to upgrade ). The only other thing to do is include the widgets folder as a dojo "package" as shown here: https://github.com/tmcgee/cmv-widgets/blob/master/config/app.js#L15-L17

0 Kudos