Skip to content
Permalink
Browse files

Fix crs list

  • Loading branch information...
uprel committed Sep 12, 2019
1 parent 527445a commit 8ecf80c60d634a355ee3de5b3ed6cf507c8cbd42
@@ -376,7 +376,7 @@ MyViewportUi = Ext.extend(Ext.Viewport, {
//value: projectData.crsComboStore()[0][1],
listeners: {
"select": function(combo, record, index) {
Eqwc.currentMapProjection = projectData.getProjectionsList(record.data.code);
Eqwc.currentMapProjection = projectData.getProjectionsList(record.data.code)[0];
}
//"render": function(c) {
// new Ext.ToolTip({
@@ -251,7 +251,7 @@ projectData.getProjectionsList = function(code) {
}
}

return ret.length == 1 ? ret[0] : ret;
return ret;
};

projectData.crsComboStore = function() {
@@ -652,14 +652,14 @@ function postLoading() {
//initial CRS to display coordinates. Take setting if exists or first item crsComboStore which is QGIS project CRS.
var value = this.data.itemAt(0).data.code;
if(projectData.defaultCoordinatesCrsCode) {
var test = projectData.getProjectionsList('EPSG:'+projectData.defaultCoordinatesCrsCode);
if(test.length>0) {
var test = projectData.getProjectionsList('EPSG:'+projectData.defaultCoordinatesCrsCode)[0];
if(test && test.length>0) {
value = test[0];
}
}

rightStatusText.setValue(value);
Eqwc.currentMapProjection = projectData.getProjectionsList(value);
Eqwc.currentMapProjection = projectData.getProjectionsList(value)[0];
});
rightStatusText.store.loadData(projectData.crsComboStore());

@@ -142,5 +142,12 @@
}
};

//put crs into crs_list if it doesn't exist
if(projectData.crs_list.indexOf(projectData.crs) == -1)
{
projectData.crs_list.unshift(projectData.crs);
}


//TODO use in css!
var userLogoImg = projectData.gis_projects.path + 'admin/resources/images/user_gray.png';

0 comments on commit 8ecf80c

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