Legend as a domNode on Map
srinipalavalli opened this issue · 2 comments
srinipalavalli commented
Hi, Can I use legend as a domNode on the map instead of loading in the left pane?
tmcgee commented
Yes, you can use the legend widget as a type: 'domNode'
. As I simple demonstration, I did this:
legend: {
include: true,
id: 'legend',
type: 'domNode',
srcNodeRef: 'growlerDijit',
path: 'gis/dijit/Legend',
title: i18n.viewer.widgets.legend,
iconClass: 'fa-picture-o',
open: false,
position: 1,
options: {
map: true,
style: 'background-color:#FFF;padding:10px;border:1px solid #333;',
legendLayerInfos: true
}
},
This uses the growlerDijit
dom node intended for the growler
widget so not something I would do in an application. Hopefully it gives you some direction for how you might want to do this in your own application..
srinipalavalli commented
That's cool. Thanks Tim.