Browse Source

Merge remote-tracking branch 'origin/final/11.0' into final/11.0

new-design
Coral.Chen 1 year ago
parent
commit
a5bd21e7c7
  1. 24
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java

24
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java

@ -248,19 +248,9 @@ public class GisLayerPane extends JPanel implements UIObserver {
}
public void resetGisLayer(VanChartMapPlot mapPlot) {
// if (ChartEditContext.supportTheme()) {
GisLayer defaultGisLayer = mapPlot.getDefaultGisLayer();
mapPlot.setGisLayer(defaultGisLayer);
populate(defaultGisLayer);
// } else {
// GaoDeGisType gaoDeGisType = mapPlot.getDefaultGisLayerType();
//
// mapPlot.getGisLayer().setGisLayerType(GISLayerType.GAO_DE_API);
// mapPlot.getGisLayer().setLayerName(gaoDeGisType.getTypeName());
// mapPlot.getGisLayer().setGaoDeGisType(gaoDeGisType);
// populate(mapPlot.getGisLayer());
// }
GisLayer defaultGisLayer = mapPlot.getDefaultGisLayer();
mapPlot.setGisLayer(defaultGisLayer);
populate(defaultGisLayer);
}
public void populate(GisLayer layer) {
@ -269,7 +259,6 @@ public class GisLayerPane extends JPanel implements UIObserver {
gisButton.setSelectedIndex(0);
layer.setGisLayerType(GISLayerType.AUTO);
layer.setLayerName(GISLayerType.getLocString(GISLayerType.AUTO));
//dealWithTemplateTheme(layer);
break;
case GAO_DE_API:
populateStandardGis(layer);
@ -291,7 +280,7 @@ public class GisLayerPane extends JPanel implements UIObserver {
if (layer.getGisLayerType() == GISLayerType.LAYER_NULL) {
standardLayers.setSelectedIndex(standardLayers.getItemCount() - 1);
} else {
if(Locale.CHINA.equals(GeneralContext.getLocale())) {
if (Locale.CHINA.equals(GeneralContext.getLocale())) {
standardLayers.setSelectedItem(layerName);
layer.setGaoDeGisType(GaoDeGisType.parseByLocaleName(layerName));
} else {
@ -358,8 +347,11 @@ public class GisLayerPane extends JPanel implements UIObserver {
* @param layer 图层
*/
private void adaptEditingTemplateTheme(GisLayer layer) {
if (Locale.CHINA.equals(GeneralContext.getLocale())) {
return;
}
JTemplate<?, ?> currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if(JTemplate.isValid(currentEditingTemplate)) {
if (JTemplate.isValid(currentEditingTemplate)) {
boolean dark = currentEditingTemplate.getTemplateTheme().isDark();
String name = dark ? Toolkit.i18nText("Fine-Design_Chart_Layer_Black") : Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox");
layer.setLayerName(name);

Loading…
Cancel
Save