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