Estoy tratando de desarrollar un widget personalizado en CMV Viewer. Estoy utilizando la línea de guía de CMV Viewer, pero tengo algún problema para hacer que el contenido html establecido en la carpeta templete. Este es mi código: Inicializar widget:`
define([
"dojo/_base/declare",
"dijit/_WidgetBase",
"dijit/_TemplatedMixin",
"dijit/_WidgetsInTemplateMixin",
"esri/SpatialReference",
"esri/dijit/PopupTemplate",
"WeatherResources/ClusterLayer",
"dojo/_base/array",
"dojo/on",
// templates & widget css
'dojo/text!./Storico/templates/Storico.html',
'dojo/i18n!./Weather/nls/resource',
'xstyle/css!./Storico/css/Storico.css',
'dijit/layout/LayoutContainer',
'dijit/layout/ContentPane',
'dijit/layout/TabContainer',
'dijit/form/Select',
'dijit/form/TextBox',
'dijit/form/NumberTextBox',
'dijit/form/Button',
'dijit/form/CheckBox',
"dojo/query",
"esri/graphic",
"esri/geometry/Extent",
"esri/Color",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/PictureMarkerSymbol",
"esri/renderers/ClassBreaksRenderer",
"esri/renderers/UniqueValueRenderer",
"esri/renderers/SimpleRenderer",
"dojo/_base/connect",
'esri/dijit/InfoWindow',
'esri/InfoTemplate',
"dojo/Deferred",
"dijit/layout/TabContainer",
"dijit/layout/ContentPane",
"dijit/Toolbar",
"dijit/form/Button",
"dojo/dom-style",
"esri/request",
"esri/geometry/Point",
"esri/geometry/webMercatorUtils",
'xstyle/css!./LayerControl/css/LayerControl.css'
], function(declare, _WidgetBase, _TemplatedMixin, template) {
return declare([_WidgetBase, _TemplatedMixin], {
templateString: template
});
});
y este es mi cotente html para el widget de estructura:
<div>
<div data-dojo-type="dijit/layout/TabContainer" data-dojo-props="region:'center'" tabStrip="true" data-dojo-attach-point="tabContainer" class="tabContainer">
<div data-dojo-attach-point="tabByAttribute" data-dojo-type="dijit/layout/ContentPane" title="${i18n.Labels.tabTitleByAttribute}" class="searchTab" selected="true">
<div >
<label>${i18n.Labels.selectTipologia}:</label><br>
<select style="width:100%;" data-dojo-attach-point="selectLayerByAttribute" data-dojo-type="dijit/form/Select"></select>
<!--<select style="width:100%;" data-dojo-attach-point="selectLayerByAttribute" data-dojo-type="dijit/form/Select" data-dojo-attach-event="onChange:onAttributeLayerChange">
</select>-->
</div>
<br>
<div>
<label>${i18n.Labels.selectLivello}:</label><br>
<!--<input type="text" style="width:100%;" data-dojo-type="dijit/form/TextBox"/>-->
<select style="width:100%;" data-dojo-type="dijit/form/Select">
<option value="Uno">Livello 1</option>
<option value="Due" selected="selected">Livello 2</option>
<option value="Tre">Livello 3</option>
</select>
</div>
</div>
</div>
</div>
Ahora he puesto en el viwer mi widget:
storico: {
include: true,
id: 'storico',
type: 'titlePane',
canFloat: true,
path: 'gis/dijit/Storico',
title: 'Storico',
open: false,
position: 0
}
pero ahora cuando intento abrir el widget en el visor no muestra el contenido html que escribo.