Skip to content
Permalink
Browse files

Rework map projection list on startup to prepare store first and load…

… data in webgisinit
  • Loading branch information...
uprel committed Feb 14, 2019
1 parent fb9973b commit ae1f9536faee7eaf3f7a1e10324fcb6df59651ac
Showing with 23 additions and 5 deletions.
  1. +19 −5 client/site/js/GUI.js
  2. +4 −0 client/site/js/WebgisInit.js
@@ -351,19 +351,33 @@ MyViewportUi = Ext.extend(Ext.Viewport, {
}, {
xtype: 'tbfill'
}, {
xtype: 'combo',
id: 'rightStatusText',
xtype: 'combo',
id: 'rightStatusText',
valueField: 'code',
displayField: 'description',
hideLabel: true,
editable: false,
mode: 'local',
triggerAction: 'all',
width: 160,
store: projectData.crsComboStore(),
value: projectData.crsComboStore()[0][1],
store: {
xtype: 'arraystore',
// store configs
autoDestroy: true,
storeId: 'crsStore',
// reader configs
idIndex: 0,
fields: [{
name: 'code', mapping: 0
}, {
name: 'description', mapping: 1
}]
},
//value: projectData.crsComboStore()[0][1],
listeners: {
"select": function(combo, record, index) {
Eqwc.currentMapProjection = projectData.getProjectionsList().filter(function (val) {
return val[0] === record.data.field1;
return val[0] === record.data.code;
})[0];
}
//"render": function(c) {
@@ -108,6 +108,10 @@ Ext.onReady(function () {
mainStatusText = Ext.getCmp('mainStatusText');
rightStatusText = Ext.getCmp('rightStatusText');

//set crs values
rightStatusText.store.loadData(projectData.crsComboStore());
rightStatusText.setValue(projectData.crsComboStore()[0][1]);

//set some status messsages
mainStatusText.setText(mapAppLoadingString[lang]);

0 comments on commit ae1f953

Please sign in to comment.
You can’t perform that action at this time.