commit 22cb435960e1d209ec8f463c5a4be304e7f5e477 Author: pioneer Date: Tue Nov 8 14:45:11 2022 +0800 open diff --git a/README.md b/README.md new file mode 100644 index 0000000..71fefdd --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ + +# open-JSD-8935 + +JSD-8935 新增一种图表,支持在点地图上面显示热力块\ +免责说明:该源码为第三方爱好者提供,不保证源码和方案的可靠性,也不提供任何形式的源码教学指导和协助!\ +仅作为开发者学习参考使用!禁止用于任何商业用途!\ +为保护开发者隐私,开发者信息已隐去!若原开发者希望公开自己的信息,可联系【pioneer】处理。 \ No newline at end of file diff --git a/plugin.xml b/plugin.xml new file mode 100644 index 0000000..c58d001 --- /dev/null +++ b/plugin.xml @@ -0,0 +1,28 @@ + + + com.fr.plugin.lzljgdmap + com.fr.plugin.lzljgdmap.v10 + + yes + 1.0.2 + 10.0~11.0 + 2021-04-24 + fr.open + 热力点组合图_

]]>
+ [2022-08-25]开发1.0版本

]]>
+ + + + + + + + + + + + + +
\ No newline at end of file diff --git a/src/com/fr/plugin/lzljgdmap/LzljMapChart.java b/src/com/fr/plugin/lzljgdmap/LzljMapChart.java new file mode 100644 index 0000000..8df1f42 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/LzljMapChart.java @@ -0,0 +1,614 @@ +package com.fr.plugin.lzljgdmap; + +import com.fr.base.Base64; +import com.fr.extended.chart.AbstractChart; +import com.fr.extended.chart.HyperLinkPara; +import com.fr.extended.chart.StringFormula; +import com.fr.extended.chart.ToHyperlinkJSONHelper; +import com.fr.general.ComparatorUtils; +import com.fr.js.NameJavaScript; +import com.fr.js.NameJavaScriptGroup; +import com.fr.json.*; +import com.fr.log.FineLoggerFactory; +import com.fr.plugin.lzljgdmap.data.LzljMapDataConfig; +import com.fr.plugin.transform.ExecuteFunctionRecord; +import com.fr.plugin.transform.FunctionRecorder; +import com.fr.stable.AssistUtils; +import com.fr.stable.StringUtils; +import com.fr.stable.web.Repository; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLableReader; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @author fr.open + * @date 2022/8/19 + */ +@FunctionRecorder +public class LzljMapChart extends AbstractChart { + + private static final String ID = "LzljMapChart"; + private static final String NAME = "热力点组合图__EK"; + + private JSONObject titleConf; + private JSONObject mapConf; + private JSONObject pointConf; + private JSONObject heatConf; + private JSONObject toolConf; + private JSONObject labelConf; + private JSONObject tipsConf; + + private JSONArray pointStyleCond; + private NameJavaScriptGroup linkNameGroup; + + @Override + protected String getChartID() { + return ID; + } + + @Override + public String getChartName() { + return NAME; + } + + @ExecuteFunctionRecord + @Override + protected void addJSON(LzljMapDataConfig dataConfig, JSONObject jsonObject, Repository repository, JSONPara jsonPara) throws JSONException { + + jsonObject.put("titleConf", getTitleConf()); + jsonObject.put("mapConf", getMapConf()); + jsonObject.put("pointConf", getPointConf()); + jsonObject.put("heatConf", getHeatConf()); + jsonObject.put("toolConf", getToolConf()); + jsonObject.put("labelConf", getLabelConf()); + jsonObject.put("tipsConf", getTipsConf()); + jsonObject.put("pointStyleCond", getPointStyleCond()); + + addAutoLinkJSON(jsonObject, jsonPara); + + jsonObject.put("data", makeChartData(dataConfig, repository)); + } + + private JSONArray makeChartData(LzljMapDataConfig dataConfig, Repository repository) { + + JSONArray dataArr = JSONFactory.createJSON(JSON.ARRAY); + if (null == dataConfig || null == dataConfig.getDatatype()) { + return dataArr; + } + + List region = dataConfig.getRegion().getValues(); + List area = dataConfig.getArea().getValues(); + List county = dataConfig.getCounty().getValues(); + List layertype = dataConfig.getLayertype().getValues(); + List datatype = dataConfig.getDatatype().getValues(); + List lng = dataConfig.getLng().getValues(); + List lat = dataConfig.getLat().getValues(); + List name = dataConfig.getName().getValues(); + List val = dataConfig.getVal().getValues(); + List desc = dataConfig.getDesc().getValues(); + + for (int i = 0; i < datatype.size(); i++) { + try { + JSONObject dataObj = JSONFactory.createJSON(JSON.OBJECT); + + if(null == layertype || layertype.isEmpty()) { + continue; + } + if(null == datatype || datatype.isEmpty()) { + continue; + } + if(null == lng || lng.isEmpty() || null == lat || lat.isEmpty()) { + continue; + } + + if(null != region && !region.isEmpty()) { + dataObj.put("region", region.get(i)); + } else { + dataObj.put("region", ""); + } + if(null != area && !area.isEmpty()) { + dataObj.put("area", area.get(i)); + } else { + dataObj.put("area", ""); + } + if(null != county && !county.isEmpty()) { + dataObj.put("county", county.get(i)); + } else { + dataObj.put("county", ""); + } + if(null != layertype && !layertype.isEmpty()) { + dataObj.put("layertype", layertype.get(i)); + } else { + dataObj.put("layertype", ""); + } + if(null != datatype && !datatype.isEmpty()) { + dataObj.put("datatype", datatype.get(i)); + } else { + dataObj.put("datatype", ""); + } + if(null != lng && !lng.isEmpty()) { + dataObj.put("lng", lng.get(i)); + } else { + dataObj.put("lng", ""); + } + if(null != lat && !lat.isEmpty()) { + dataObj.put("lat", lat.get(i)); + } else { + dataObj.put("lat", ""); + } + if(null != name && !name.isEmpty()) { + dataObj.put("name", name.get(i)); + } else { + dataObj.put("name", ""); + } + if(null != val && !val.isEmpty()) { + dataObj.put("val", val.get(i)); + } else { + dataObj.put("val", ""); + } + if(null != desc && !desc.isEmpty()) { + dataObj.put("desc", desc.get(i)); + } else { + dataObj.put("desc", ""); + } + + dataArr.put(dataObj); + } catch (Exception e) { + FineLoggerFactory.getLogger().error("热力点组合图__EK,数据处理有错误," + e.getMessage(), e); + } + } + return dataArr; + } + + @Override + protected String[] requiredJS() { + return new String[]{ + "com/fr/plugin/lzljgdmap/web/jstree.js", + "com/fr/plugin/lzljgdmap/web/LzljMapChartWrapper.js" + }; + } + + @Override + protected String[] requiredCSS() { + return new String[]{ + "com/fr/plugin/lzljgdmap/web/LzljMapChart.css" + }; + } + + @Override + protected String wrapperName() { + return "LzljMapChartWrapper"; + } + + private void addAutoLinkJSON(JSONObject paramJSONObject, JSONPara paramAbstractChart) + throws JSONException { + ToHyperlinkJSONHelper.addECNameToLinkGroup(paramAbstractChart.ecName, paramAbstractChart.sheetIndex, this.getLinkNameGroup()); + paramJSONObject.put("pointLink", ToHyperlinkJSONHelper.addAutoLinkJSON(this.getLinkNameGroup(), hyperLinkParas())); + } + + @Override + public NameJavaScriptGroup getHotHyperlink(String s) { + NameJavaScriptGroup retLinkGroup = new NameJavaScriptGroup(); + for (int i = 0; i < linkNameGroup.size(); i++) { + NameJavaScript hyperlink = linkNameGroup.getNameHyperlink(i); + if ("pointLink".equals(s)) { + try { + retLinkGroup.addNameHyperlink((NameJavaScript)hyperlink.clone()); + } catch (CloneNotSupportedException e) { + e.printStackTrace(); + } + } + } + return retLinkGroup; + } + + @Override + protected HyperLinkPara[] hyperLinkParas() { + return new HyperLinkPara[]{ + new HyperLinkPara() { + @Override + public String getName() { + return "分类"; + } + + @Override + public String getFormulaContent() { + return "LAYERTYPE"; + } + + @Override + public String[] getProps() { + return new String[]{"layertype"}; + } + }, + new HyperLinkPara() { + @Override + public String getName() { + return "类型"; + } + + @Override + public String getFormulaContent() { + return "DATATYPE"; + } + + @Override + public String[] getProps() { + return new String[]{"datatype"}; + } + }, + new HyperLinkPara() { + @Override + public String getName() { + return "名称"; + } + + @Override + public String getFormulaContent() { + return "POINTNAME"; + } + + @Override + public String[] getProps() { + return new String[]{"name"}; + } + }, + new HyperLinkPara() { + @Override + public String getName() { + return "经度"; + } + + @Override + public String getFormulaContent() { + return "POINTLNG"; + } + + @Override + public String[] getProps() { + return new String[]{"lng"}; + } + }, + new HyperLinkPara() { + @Override + public String getName() { + return "纬度"; + } + + @Override + public String getFormulaContent() { + return "POINTLAT"; + } + + @Override + public String[] getProps() { + return new String[]{"lat"}; + } + }, + new HyperLinkPara() { + @Override + public String getName() { + return "描述"; + } + + @Override + public String getFormulaContent() { + return "POINTDESC"; + } + + @Override + public String[] getProps() { + return new String[]{"desc"}; + } + } + }; + } + + @Override + protected void readAttr(XMLableReader xmLableReader) { + super.readAttr(xmLableReader); + String jsonStr = xmLableReader.getAttrAsString("titleConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setTitleConf(new JSONObject(jsonStr)); + } + jsonStr = xmLableReader.getAttrAsString("mapConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setMapConf(new JSONObject(jsonStr)); + } + jsonStr = xmLableReader.getAttrAsString("pointConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setPointConf(new JSONObject(jsonStr)); + } + jsonStr = xmLableReader.getAttrAsString("heatConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setHeatConf(new JSONObject(jsonStr)); + } + jsonStr = xmLableReader.getAttrAsString("toolConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setToolConf(new JSONObject(jsonStr)); + } + jsonStr = xmLableReader.getAttrAsString("labelConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setLabelConf(new JSONObject(jsonStr)); + } + jsonStr = xmLableReader.getAttrAsString("tipsConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setTipsConf(new JSONObject(jsonStr)); + } + + jsonStr = xmLableReader.getAttrAsString("pointStyleCond", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setPointStyleCond(new JSONArray(new String(Base64.decode(jsonStr)))); + } + + if (null == linkNameGroup) { + linkNameGroup = (NameJavaScriptGroup)xmLableReader.readXMLObject(new NameJavaScriptGroup()); + } + } + + @Override + protected void writeAttr(XMLPrintWriter xmlPrintWriter) { + super.writeAttr(xmlPrintWriter); + if (null != titleConf) { + xmlPrintWriter.attr("titleConf", titleConf.toString()); + } + if (null != mapConf) { + xmlPrintWriter.attr("mapConf", mapConf.toString()); + } + if (null != pointConf) { + xmlPrintWriter.attr("pointConf", pointConf.toString()); + } + if (null != heatConf) { + xmlPrintWriter.attr("heatConf", heatConf.toString()); + } + if (null != toolConf) { + xmlPrintWriter.attr("toolConf", toolConf.toString()); + } + if (null != labelConf) { + xmlPrintWriter.attr("labelConf", labelConf.toString()); + } + if (null != tipsConf) { + xmlPrintWriter.attr("tipsConf", tipsConf.toString()); + } + if (null != pointStyleCond) { + xmlPrintWriter.attr("pointStyleCond", Base64.encode(pointStyleCond.toString().getBytes())); + } + + if (null != linkNameGroup) { + linkNameGroup.writeXML(xmlPrintWriter); + } + } + + @Override + public boolean equals(Object o) { + boolean isEq = super.equals(o) + && o instanceof LzljMapChart + && ComparatorUtils.equals(((LzljMapChart) o).getTitleConf(), this.titleConf) + && ComparatorUtils.equals(((LzljMapChart) o).getMapConf(), this.mapConf) + && ComparatorUtils.equals(((LzljMapChart) o).getPointConf(), this.pointConf) + && ComparatorUtils.equals(((LzljMapChart) o).getHeatConf(), this.heatConf) + && ComparatorUtils.equals(((LzljMapChart) o).getToolConf(), this.toolConf) + && ComparatorUtils.equals(((LzljMapChart) o).getLabelConf(), this.labelConf) + && ComparatorUtils.equals(((LzljMapChart) o).getTipsConf(), this.tipsConf) + && ComparatorUtils.equals(((LzljMapChart) o).getPointStyleCond(), this.pointStyleCond) + && ComparatorUtils.equals(((LzljMapChart) o).getLinkNameGroup(), this.linkNameGroup) + ; + return isEq; + } + + @Override + public int hashCode() { + return super.hashCode() + AssistUtils.hashCode(new Object[]{this.titleConf, this.mapConf,this.pointConf,this.heatConf,this.toolConf,this.labelConf, this.tipsConf, this.pointStyleCond}); + } + + @Override + public LzljMapChart clone() throws CloneNotSupportedException { + LzljMapChart chart = (LzljMapChart)super.clone(); + if (this.linkNameGroup != null) { + chart.setLinkNameGroup((NameJavaScriptGroup) this.getLinkNameGroup().clone()); + } + return chart; + } + + @Override + protected List formulas() { + List formulaList = new ArrayList(); + return formulaList; + } + + @Override + protected String demoImagePath() { + return "com/fr/plugin/lzljgdmap/images/demo.png"; + } + + + public JSONObject getTitleConf() { + if (null == titleConf) { + titleConf = new JSONObject(); + titleConf.put("titlevisiable", false); + titleConf.put("titlename", "热力点组合图"); + titleConf.put("titleposition", 0); + titleConf.put("titlesize", 13); + titleConf.put("titlestyle", 1); + titleConf.put("titlefamily", "微软雅黑"); + titleConf.put("titlecolor", "#ffffff"); + titleConf.put("titlebgcolor", "#000000"); + titleConf.put("titleBgOpacity", 55); + } + return titleConf; + } + + public void setTitleConf(JSONObject titleConf) { + this.titleConf = titleConf; + } + + public JSONObject getTipsConf() { + if (null == tipsConf) { + tipsConf = new JSONObject(); + tipsConf.put("showPointTips", true); + tipsConf.put("tipBgColor", "#c0c0c0"); + tipsConf.put("tipBgOpacity", 70.0); + tipsConf.put("showLayerType", true); + tipsConf.put("showDataType", true); + tipsConf.put("showDesc", true); + tipsConf.put("showLat", true); + tipsConf.put("showLng", true); + tipsConf.put("showName", true); + tipsConf.put("tipfamily", "微软雅黑"); + tipsConf.put("tipstyle", 0); + tipsConf.put("tipsize", 12); + tipsConf.put("tipcolor", "#ffcc00"); + } + return tipsConf; + } + + public void setTipsConf(JSONObject tipsConf) { + this.tipsConf = tipsConf; + } + + + public JSONArray getPointStyleCond() { + if (null == pointStyleCond || pointStyleCond.size() == 0) { + pointStyleCond = JSONArray.create(); + } + return pointStyleCond; + } + + public void setPointStyleCond(JSONArray pointStyleCond) { + this.pointStyleCond = pointStyleCond; + } + + public JSONObject getMapConf() { + if (null == mapConf) { + mapConf = new JSONObject(); + mapConf.put("areaBorderColor", "#808080"); + mapConf.put("centerx", "118.796452"); + mapConf.put("centery", "32.058908"); + mapConf.put("circleBorderColor", "#ff0000"); + mapConf.put("circleBorderWidth", 2); + mapConf.put("circleFillColor", "#ff0000"); + mapConf.put("circleOpacity", "#575656"); + mapConf.put("countryBorderColor", 64); + mapConf.put("mapKey", "grey"); + mapConf.put("mapzoom", 10); + mapConf.put("regionBorderColor", "#c0c0c0"); + mapConf.put("regionBorderWidth", 3); + mapConf.put("showCircleDetail", true); + } + return mapConf; + } + + public void setMapConf(JSONObject mapConf) { + this.mapConf = mapConf; + } + + public JSONObject getPointConf() { + if (null == pointConf) { + pointConf = new JSONObject(); + pointConf.put("clusterBgOpacity", 100); + pointConf.put("clusterBorderColor", "#3366ff"); + pointConf.put("clusterFillColor", "#1fade5"); + pointConf.put("clusterMaxZoom", 12); + pointConf.put("clusterPointSize", 32); + pointConf.put("clusterTextColor", "#ffffff"); + pointConf.put("pointSize", 32); + pointConf.put("pointimg", "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAD60lEQVR4nO1YMWgUQRTd4mb2orYiJpnZw84gaGEhImIhCJJC0gixEQVJmiAowcJCECSdSRrRoGIhGAVNYWEhpEiCAdOI3u1tjhAbG1OoIMTu/D+5O3f3Ljszyc3MBefBh2V3/p/3/v75M7ue5+Dg4ODg4GAKqwUvX+G0b5n7/WAjNevHe/jMNj8tiHjuVMTprTL358ucVrPNn8ex6GOb946xHNABELUgFr2lLWAM2zqUEfWQoyGjz3cgPGEYC2Pa1iWFckAvlRn53i7xDcOYENu2vkxEgX+j7cJThnPY1tkSEaMXdYtvJAHmsq03AezYpsQ3ktApu0SJ0SOwba2YTwBdwblt6/e22e3XoYw/wJ7/AG3zmq6rxsG5rYqv7fMKpMn7MMidbHXiw3v4DMeoxLR6TigrHXLIhHxcMqGQhAWdGrfEMs+flSW5cijPVeOjj3QVABcdGjMBE4/JkCux3Om0b8jJNXi2BPYLmtmXkNO3rbY29JVMwpgZ1THUBIjKfjzuA+v1MNx/l+HzEb8Kk/OQcYkELBkVjw1LgtTvz91drO4DJ7jzcO+nyA8rIp4EjIGxRH5GP6WRoFBIQBfjPiDsqUJje5HwhVgin3TlaAX+wBCKYPRxfXxYyBcUxKP9KfZ5tO6PsUQ+yMlkAkbECSDDjQT05s4oJqCKPv8SQIYlEjBiLAFAaEgoIPZGdpqAUKriyJCxBGye2ASEAnq7Pl6mZ2RWAMQSjgdOxhJQ3O/tkxDxKu6D3V0hAd/ivhhL5IOcjCVggxQjs1mEQHAlKYLcl377nN6J+2IsQfnPGhWPKHH/ungZkCtxH7j3UmLpPEn4QAyRD3Ixqx5QLJBjqqWMiLj/cIuxP+DN30uPxxjC8gcuZlQ3k5sRkcMDUNrva7DnIJZ53UqMXvh0wNubHid5eJoxo7YFQuafk1nTpYBcVY2NPlL9Ajjo0CYNIDEt1dygUclsVRtbrKDBxmzahMZswqqHnIC+gaPt3TCgA1FvVw8aXuO9jWcKseJnBauAtfpMKQltMJzTtu4GKgVywnQCcE7buhOA8/ojU+JxLtt6m1D75F01kIBVnMu23pYIGbms/e3DHLZ1ZkLxz49q42s6VHUcNC6Fzi39NHQshY4v/TTauRR2RemngeUq/I6XE1/ZNaWfhtS/PFHpm/zbqwNh4N/ctnjwtc2/LYi4P6Ve+v6Ubd5tw+ZPVH9OPgH+nPGfnLoB3/jHQdiahPg1HGubrxbAd/+geN3TQds8tQJEjmYkYNQ2PyOIOJlsbnpk0jYvo4gYfd0QD9e2+RhH1fNyIaOLaHhtm48VFLvzHM02DwcHBwcHh/8UfwE/2Xk+00CsAAAAAABJRU5ErkJggg=="); + pointConf.put("pointimgh", 64); + pointConf.put("pointimgw", 64); + pointConf.put("pointimgtype", "png"); + } + return pointConf; + } + + public void setPointConf(JSONObject pointConf) { + this.pointConf = pointConf; + } + + public JSONObject getHeatConf() { + if (null == heatConf) { + heatConf = new JSONObject(); + heatConf.put("bgOpacity", 100); + heatConf.put("interval", 4); + heatConf.put("intervalColors", "#0000ff|#0000ff|#00ff00|#ffea00|#ff0000"); + heatConf.put("intervalPos", "0.0|0.1849315|0.47945204|0.760274|1.0"); + heatConf.put("maxValue", 1); + heatConf.put("radius", 100); + } + return heatConf; + } + + public void setHeatConf(JSONObject heatConf) { + this.heatConf = heatConf; + } + + public JSONObject getToolConf() { + if (null == toolConf) { + toolConf = new JSONObject(); + toolConf.put("toolBgColor", "#808080"); + toolConf.put("toolBgOpacity", 80); + toolConf.put("toolBtnColor", "#fc8d51"); + toolConf.put("toolcolor", "#ffffff"); + toolConf.put("toolfamily", "微软雅黑"); + toolConf.put("toolsize", 13); + toolConf.put("toolstyle", 0); + + toolConf.put("detailBgColor", "#ffffff"); + toolConf.put("detailTitleBgColor", "#ecb562"); + toolConf.put("detailBgOpacity", 100); + toolConf.put("showRegion", true); + toolConf.put("showArea", true); + toolConf.put("showName", true); + toolConf.put("showLayerType", true); + toolConf.put("showDataType", true); + toolConf.put("showLng", true); + toolConf.put("showLat", true); + toolConf.put("showVal", true); + toolConf.put("showDesc", true); + toolConf.put("detailsize", 14); + toolConf.put("detailstyle", 0); + toolConf.put("detailfamily", "微软雅黑"); + toolConf.put("detailcolor", "#333333"); + } + return toolConf; + } + + public void setToolConf(JSONObject toolConf) { + this.toolConf = toolConf; + } + + public JSONObject getLabelConf() { + if (null == labelConf) { + labelConf = new JSONObject(); + labelConf.put("labelBgColor", "transparent"); + labelConf.put("labelJsPane", ""); + labelConf.put("labelType", 1); + labelConf.put("labelcolor", "#ff0000"); + labelConf.put("labelfamily", "微软雅黑"); + labelConf.put("labelsize", 10); + labelConf.put("labelstyle", 0); + labelConf.put("showDataType", true); + labelConf.put("showDesc", true); + labelConf.put("showLat", true); + labelConf.put("showLng", true); + labelConf.put("showLayerType", true); + labelConf.put("showName", true); + labelConf.put("showPointLabel", true); + } + return labelConf; + } + + public void setLabelConf(JSONObject labelConf) { + this.labelConf = labelConf; + } + + public NameJavaScriptGroup getLinkNameGroup() { + return linkNameGroup; + } + + public void setLinkNameGroup(NameJavaScriptGroup linkNameGroup) { + this.linkNameGroup = linkNameGroup; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/LzljMapChartLocaleFinder.java b/src/com/fr/plugin/lzljgdmap/LzljMapChartLocaleFinder.java new file mode 100644 index 0000000..4f3037f --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/LzljMapChartLocaleFinder.java @@ -0,0 +1,10 @@ +package com.fr.plugin.lzljgdmap; + +import com.fr.stable.fun.impl.AbstractLocaleFinder; + +public class LzljMapChartLocaleFinder extends AbstractLocaleFinder { + @Override + public String find() { + return "com/fr/plugin/lzljgdmap/locale/lzljgdmap"; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/LzljMapChartProvider.java b/src/com/fr/plugin/lzljgdmap/LzljMapChartProvider.java new file mode 100644 index 0000000..4b40279 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/LzljMapChartProvider.java @@ -0,0 +1,11 @@ +package com.fr.plugin.lzljgdmap; + +import com.fr.extended.chart.AbstractChart; +import com.fr.extended.chart.AbstractExtentChartProvider; + +public class LzljMapChartProvider extends AbstractExtentChartProvider { + @Override + protected AbstractChart createChart() { + return new LzljMapChart(); + } +} diff --git a/src/com/fr/plugin/lzljgdmap/LzljMapChartUI.java b/src/com/fr/plugin/lzljgdmap/LzljMapChartUI.java new file mode 100644 index 0000000..02f4580 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/LzljMapChartUI.java @@ -0,0 +1,44 @@ +package com.fr.plugin.lzljgdmap; + +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.extended.chart.AbstractExtendedChartTableDataPane; +import com.fr.extended.chart.AbstractExtendedChartUIProvider; +import com.fr.plugin.lzljgdmap.data.LzljMapDataPane; +import com.fr.plugin.lzljgdmap.data.LzljMapReportDataPane; +import com.fr.plugin.lzljgdmap.ui.LzljMapStylePane; + +/** + * @author fr.open + * @date 2022/8/19 + */ +public class LzljMapChartUI extends AbstractExtendedChartUIProvider { + + @Override + protected AbstractExtendedChartTableDataPane getTableDataSourcePane() { + return new LzljMapDataPane(); + } + + @Override + protected AbstractReportDataContentPane getReportDataSourcePane() { + return new LzljMapReportDataPane(); + } + + @Override + public String getIconPath() { + return "com/fr/plugin/lzljgdmap/images/icon.png"; + } + + @Override + public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener attributeChangeListener) { + return new AbstractChartAttrPane[]{ + new LzljMapStylePane(attributeChangeListener) + }; + } + + @Override + public String[] getDemoImagePath() { + return new String[]{"com/fr/plugin/lzljgdmap/images/demo.png"}; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/data/LzljMapDataConfig.java b/src/com/fr/plugin/lzljgdmap/data/LzljMapDataConfig.java new file mode 100644 index 0000000..66b020d --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/data/LzljMapDataConfig.java @@ -0,0 +1,187 @@ +package com.fr.plugin.lzljgdmap.data; + +import com.fr.extended.chart.AbstractDataConfig; +import com.fr.extended.chart.ExtendedField; +import com.fr.stable.AssistUtils; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLableReader; + +/** + * @author fr.open + * @date 2022/8/25 + */ +public class LzljMapDataConfig extends AbstractDataConfig { + + private ExtendedField region = new ExtendedField(); + private ExtendedField area = new ExtendedField(); + private ExtendedField county = new ExtendedField(); + private ExtendedField layertype = new ExtendedField(); + private ExtendedField datatype = new ExtendedField(); + private ExtendedField lng = new ExtendedField(); + private ExtendedField lat = new ExtendedField(); + private ExtendedField name = new ExtendedField(); + private ExtendedField val = new ExtendedField(); + private ExtendedField desc = new ExtendedField(); + + @Override + protected void readAttr(XMLableReader xmLableReader) { + readExtendedField(region, "region", xmLableReader); + readExtendedField(area, "area", xmLableReader); + readExtendedField(county, "county", xmLableReader); + readExtendedField(layertype, "layertype", xmLableReader); + readExtendedField(datatype, "datatype", xmLableReader); + readExtendedField(lng, "lng", xmLableReader); + readExtendedField(lat, "lat", xmLableReader); + readExtendedField(name, "name", xmLableReader); + readExtendedField(val, "val", xmLableReader); + readExtendedField(desc, "desc", xmLableReader); + } + + @Override + protected void writeAttr(XMLPrintWriter xmlPrintWriter) { + writeExtendedField(region, "region", xmlPrintWriter); + writeExtendedField(area, "area", xmlPrintWriter); + writeExtendedField(county, "county", xmlPrintWriter); + writeExtendedField(layertype, "layertype", xmlPrintWriter); + writeExtendedField(datatype, "datatype", xmlPrintWriter); + writeExtendedField(lng, "lng", xmlPrintWriter); + writeExtendedField(lat, "lat", xmlPrintWriter); + writeExtendedField(name, "name", xmlPrintWriter); + writeExtendedField(val, "val", xmlPrintWriter); + writeExtendedField(desc, "desc", xmlPrintWriter); + } + + @Override + public ExtendedField[] dataSetFields() { + return new ExtendedField[]{ + region, + area, + county, + layertype, + datatype, + lng, + lat, + name, + val, + desc + }; + } + + @Override + public LzljMapDataConfig clone() throws CloneNotSupportedException { + LzljMapDataConfig result = new LzljMapDataConfig(); + result.setRegion(this.getRegion().clone()); + result.setArea(this.getArea().clone()); + result.setCounty(this.getCounty().clone()); + result.setLayertype(this.getLayertype().clone()); + result.setDatatype(this.getDatatype().clone()); + result.setLng(this.getLng().clone()); + result.setLat(this.getLat().clone()); + result.setName(this.getName().clone()); + result.setVal(this.getVal().clone()); + result.setDesc(this.getDesc().clone()); + return result; + } + + @Override + public int hashCode() { + return super.hashCode() + AssistUtils.hashCode(this.getRegion(), this.getArea(), this.getCounty(), this.getLayertype(), this.getDatatype(), this.getLng(), this.getLat(), this.getName(),this.getVal(),this.getDesc()); + } + + @Override + public boolean equals(Object obj) { + return super.equals(obj) + && obj instanceof LzljMapDataConfig + && AssistUtils.equals(this.getRegion(), ((LzljMapDataConfig) obj).getRegion()) + && AssistUtils.equals(this.getArea(), ((LzljMapDataConfig) obj).getArea()) + && AssistUtils.equals(this.getCounty(), ((LzljMapDataConfig) obj).getCounty()) + && AssistUtils.equals(this.getLayertype(), ((LzljMapDataConfig) obj).getLayertype()) + && AssistUtils.equals(this.getDatatype(), ((LzljMapDataConfig) obj).getDatatype()) + && AssistUtils.equals(this.getLng(), ((LzljMapDataConfig) obj).getLng()) + && AssistUtils.equals(this.getLat(), ((LzljMapDataConfig) obj).getLat()) + && AssistUtils.equals(this.getName(), ((LzljMapDataConfig) obj).getName()) + && AssistUtils.equals(this.getVal(), ((LzljMapDataConfig) obj).getVal()) + && AssistUtils.equals(this.getDesc(), ((LzljMapDataConfig) obj).getDesc()) + ; + } + + public ExtendedField getDatatype() { + return datatype; + } + + public void setDatatype(ExtendedField datatype) { + this.datatype = datatype; + } + + public ExtendedField getLayertype() { + return layertype; + } + + public void setLayertype(ExtendedField layertype) { + this.layertype = layertype; + } + + public ExtendedField getLng() { + return lng; + } + + public void setLng(ExtendedField lng) { + this.lng = lng; + } + + public ExtendedField getLat() { + return lat; + } + + public void setLat(ExtendedField lat) { + this.lat = lat; + } + + public ExtendedField getName() { + return name; + } + + public void setName(ExtendedField name) { + this.name = name; + } + + public ExtendedField getVal() { + return val; + } + + public void setVal(ExtendedField val) { + this.val = val; + } + + public ExtendedField getDesc() { + return desc; + } + + public void setDesc(ExtendedField desc) { + this.desc = desc; + } + + public ExtendedField getRegion() { + return region; + } + + public void setRegion(ExtendedField region) { + this.region = region; + } + + public ExtendedField getArea() { + return area; + } + + public void setArea(ExtendedField area) { + this.area = area; + } + + public ExtendedField getCounty() { + return county; + } + + public void setCounty(ExtendedField county) { + this.county = county; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/data/LzljMapDataPane.java b/src/com/fr/plugin/lzljgdmap/data/LzljMapDataPane.java new file mode 100644 index 0000000..78a0beb --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/data/LzljMapDataPane.java @@ -0,0 +1,89 @@ +package com.fr.plugin.lzljgdmap.data; + +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.i18n.Toolkit; +import com.fr.extended.chart.AbstractExtendedChartTableDataPane; + +/** + * @author fr.open + * @date 2022/8/25 + */ +public class LzljMapDataPane extends AbstractExtendedChartTableDataPane { + + private UIComboBox layertype; + private UIComboBox datatype; + private UIComboBox lng; + private UIComboBox lat; + private UIComboBox name; + private UIComboBox val; + private UIComboBox desc; + private UIComboBox region; + private UIComboBox area; + private UIComboBox county; + + + @Override + protected String[] fieldLabels() { + return new String[]{ + Toolkit.i18nText("Plugin_LzljMap_region"), + Toolkit.i18nText("Plugin_LzljMap_area"), + Toolkit.i18nText("Plugin_LzljMap_county"), + Toolkit.i18nText("Plugin_LzljMap_layertype"), + Toolkit.i18nText("Plugin_LzljMap_datatype"), + Toolkit.i18nText("Plugin_LzljMap_lng"), + Toolkit.i18nText("Plugin_LzljMap_lat"), + Toolkit.i18nText("Plugin_LzljMap_name"), + Toolkit.i18nText("Plugin_LzljMap_val"), + Toolkit.i18nText("Plugin_LzljMap_desc") + }; + } + + @Override + protected UIComboBox[] filedComboBoxes() { + if (null == datatype) { + region = new UIComboBox(); + area = new UIComboBox(); + county = new UIComboBox(); + layertype = new UIComboBox(); + datatype = new UIComboBox(); + lng = new UIComboBox(); + lat = new UIComboBox(); + name = new UIComboBox(); + val = new UIComboBox(); + desc = new UIComboBox(); + } + return new UIComboBox[]{ + region, area, county, layertype, datatype, lng, lat, name, val, desc + }; + } + + @Override + protected void populate(LzljMapDataConfig dataConfig) { + populateField(region, dataConfig.getRegion()); + populateField(area, dataConfig.getArea()); + populateField(county, dataConfig.getCounty()); + populateField(layertype, dataConfig.getLayertype()); + populateField(datatype, dataConfig.getDatatype()); + populateField(lng, dataConfig.getLng()); + populateField(lat, dataConfig.getLat()); + populateField(name, dataConfig.getName()); + populateField(val, dataConfig.getVal()); + populateField(desc, dataConfig.getDesc()); + } + + @Override + protected LzljMapDataConfig update() { + LzljMapDataConfig dataConfig = new LzljMapDataConfig(); + updateField(region, dataConfig.getRegion()); + updateField(area, dataConfig.getArea()); + updateField(county, dataConfig.getCounty()); + updateField(layertype, dataConfig.getLayertype()); + updateField(datatype, dataConfig.getDatatype()); + updateField(lng, dataConfig.getLng()); + updateField(lat, dataConfig.getLat()); + updateField(name, dataConfig.getName()); + updateField(val, dataConfig.getVal()); + updateField(desc, dataConfig.getDesc()); + return dataConfig; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/data/LzljMapReportDataPane.java b/src/com/fr/plugin/lzljgdmap/data/LzljMapReportDataPane.java new file mode 100644 index 0000000..dcee39c --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/data/LzljMapReportDataPane.java @@ -0,0 +1,89 @@ +package com.fr.plugin.lzljgdmap.data; + +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.i18n.Toolkit; +import com.fr.extended.chart.AbstractExtendedChartReportDataPane; + +/** + * @author fr.open + * @date 2022/8/25 + */ +public class LzljMapReportDataPane extends AbstractExtendedChartReportDataPane { + + private TinyFormulaPane layertype; + private TinyFormulaPane datatype; + private TinyFormulaPane lng; + private TinyFormulaPane lat; + private TinyFormulaPane name; + private TinyFormulaPane val; + private TinyFormulaPane desc; + private TinyFormulaPane region; + private TinyFormulaPane area; + private TinyFormulaPane county; + + + @Override + protected String[] fieldLabel() { + return new String[]{ + Toolkit.i18nText("Plugin_LzljMap_region"), + Toolkit.i18nText("Plugin_LzljMap_area"), + Toolkit.i18nText("Plugin_LzljMap_county"), + Toolkit.i18nText("Plugin_LzljMap_layertype"), + Toolkit.i18nText("Plugin_LzljMap_datatype"), + Toolkit.i18nText("Plugin_LzljMap_lng"), + Toolkit.i18nText("Plugin_LzljMap_lat"), + Toolkit.i18nText("Plugin_LzljMap_name"), + Toolkit.i18nText("Plugin_LzljMap_val"), + Toolkit.i18nText("Plugin_LzljMap_desc") + }; + } + + @Override + protected TinyFormulaPane[] formulaPanes() { + if (null == datatype) { + region = new TinyFormulaPane(); + area = new TinyFormulaPane(); + county = new TinyFormulaPane(); + layertype = new TinyFormulaPane(); + datatype = new TinyFormulaPane(); + lng = new TinyFormulaPane(); + lat = new TinyFormulaPane(); + name = new TinyFormulaPane(); + val = new TinyFormulaPane(); + desc = new TinyFormulaPane(); + } + return new TinyFormulaPane[]{ + region, area, county, layertype, datatype, lng, lat, name, val, desc + }; + } + + @Override + protected void populate(LzljMapDataConfig dataConfig) { + populateField(region, dataConfig.getRegion()); + populateField(area, dataConfig.getArea()); + populateField(county, dataConfig.getCounty()); + populateField(layertype, dataConfig.getLayertype()); + populateField(datatype, dataConfig.getDatatype()); + populateField(lng, dataConfig.getLng()); + populateField(lat, dataConfig.getLat()); + populateField(name, dataConfig.getName()); + populateField(val, dataConfig.getVal()); + populateField(desc, dataConfig.getDesc()); + } + + @Override + protected LzljMapDataConfig update() { + LzljMapDataConfig dataConfig = new LzljMapDataConfig(); + updateField(region, dataConfig.getRegion()); + updateField(area, dataConfig.getArea()); + updateField(county, dataConfig.getCounty()); + updateField(layertype, dataConfig.getLayertype()); + updateField(datatype, dataConfig.getDatatype()); + updateField(lng, dataConfig.getLng()); + updateField(lat, dataConfig.getLat()); + updateField(name, dataConfig.getName()); + updateField(val, dataConfig.getVal()); + updateField(desc, dataConfig.getDesc()); + return dataConfig; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/images/demo.png b/src/com/fr/plugin/lzljgdmap/images/demo.png new file mode 100644 index 0000000..c1c8b4e Binary files /dev/null and b/src/com/fr/plugin/lzljgdmap/images/demo.png differ diff --git a/src/com/fr/plugin/lzljgdmap/images/icon.png b/src/com/fr/plugin/lzljgdmap/images/icon.png new file mode 100644 index 0000000..2f75bee Binary files /dev/null and b/src/com/fr/plugin/lzljgdmap/images/icon.png differ diff --git a/src/com/fr/plugin/lzljgdmap/locale/lzljgdmap.properties b/src/com/fr/plugin/lzljgdmap/locale/lzljgdmap.properties new file mode 100644 index 0000000..c667f74 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/locale/lzljgdmap.properties @@ -0,0 +1,106 @@ +Plugin_LzljMap_region=\u7701\u4EFD +Plugin_LzljMap_area=\u5730\u5E02 +Plugin_LzljMap_county=\u533A\u53BF +Plugin_LzljMap_layertype=\u6570\u636E\u5206\u7C7B +Plugin_LzljMap_datatype=\u6570\u636E\u7C7B\u578B +Plugin_LzljMap_lng=\u7ECF\u5EA6 +Plugin_LzljMap_lat=\u7EAC\u5EA6 +Plugin_LzljMap_name=\u540D\u79F0 +Plugin_LzljMap_val=\u6570\u503C +Plugin_LzljMap_desc=\u63CF\u8FF0 + +Plugin-LzljMap-isVisiableTitle=\u663E\u793A\u6807\u9898 +Plugin-LzljMap-titleBgColor=\u80CC\u666F\u989C\u8272 +Plugin-LzljMap-titleBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-TitleText=\u540D\u79F0 +Plugin-LzljMap-TitlePosition=\u4F4D\u7F6E +Plugin-LzljMap-TitleExpand=\u6807\u9898\u8BBE\u7F6E +Plugin-LzljMap-TitleStyle=\u6807\u9898\u6837\u5F0F + +Plugin-LzljMap-maptitle=\u5730\u56FE +Plugin-LzljMap-mapzoom=\u5730\u56FE\u7EA7\u522B +Plugin-LzljMap-centerx=\u4E2D\u5FC3\u70B9\u7ECF\u5EA6 +Plugin-LzljMap-centery=\u4E2D\u5FC3\u70B9\u7EAC\u5EA6 +Plugin-LzljMap-mapStyle=\u5730\u56FE\u6837\u5F0F +Plugin-LzljMap-mapKey=\u5730\u56FELicense +Plugin-LzljMap-regionBorderWidth=\u533A\u57DF\u8FB9\u754C\u5BBD +Plugin-LzljMap-regionBorderColor=\u7701\u4EFD\u8FB9\u754C\u989C\u8272 +Plugin-LzljMap-areaBorderColor=\u5730\u5E02\u8FB9\u754C\u989C\u8272 +Plugin-LzljMap-countryBorderColor=\u533A\u53BF\u8FB9\u754C\u989C\u8272 +Plugin-LzljMap-RegionExpand=\u884C\u653F\u533A\u57DF\u6837\u5F0F +Plugin-LzljMap-BaseMapExpand=\u5730\u56FE\u53C2\u6570\u8BBE\u7F6E +Plugin-LzljMap-CircleExpand=\u5708\u9009\u533A\u57DF\u6837\u5F0F +Plugin-LzljMap-circleBorderWidth=\u8FB9\u6846\u5BBD\u5EA6 +Plugin-LzljMap-circleBorderColor=\u8FB9\u6846\u989C\u8272 +Plugin-LzljMap-circleFillColor=\u586B\u5145\u989C\u8272 +Plugin-LzljMap-circleOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-showCircleDetail=\u663E\u793A\u5708\u9009\u6570\u636E\u8BE6\u60C5 + +Plugin-LzljMap-pointtitle=\u70B9\u5730\u56FE +Plugin-LzljMap-showCluster=\u663E\u793A\u805A\u5408\u6548\u679C +Plugin-LzljMap-clusterMaxZoom=\u6700\u5927\u805A\u5408\u7EA7\u522B +Plugin-LzljMap-pointSize=\u70B9\u5927\u5C0F +Plugin-LzljMap-clusterBorderColor=\u8FB9\u6846\u989C\u8272 +Plugin-LzljMap-clusterFillColor=\u586B\u5145\u989C\u8272 +Plugin-LzljMap-clusterTextColor=\u5B57\u4F53\u989C\u8272 +Plugin-LzljMap-clusterBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-pointMapExpand=\u70B9\u6837\u5F0F\u914D\u7F6E +Plugin-LzljMap-clusterPointMapExpand=\u805A\u5408\u70B9\u6837\u5F0F\u914D\u7F6E + +Plugin-LzljMap-heattitle=\u70ED\u529B\u56FE +Plugin-LzljMap-heatradius=\u534A\u5F84 +Plugin-LzljMap-heatmaxValue=\u6700\u5927\u503C +Plugin-LzljMap-heatbgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-heatinterval=\u5212\u5206\u9636\u6BB5 +Plugin-LzljMap-heatMapExpand=\u70ED\u529B\u6837\u5F0F\u914D\u7F6E + +Plugin-LzljMap-toolstitle=\u5DE5\u5177 +Plugin-LzljMap-toolAlignment=\u4F4D\u7F6E +Plugin-LzljMap-toolBgColor=\u80CC\u666F\u989C\u8272 +Plugin-LzljMap-toolBtnColor=\u6309\u94AE\u989C\u8272 +Plugin-LzljMap-toolBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-toolAlignExpand=\u7B5B\u9009\u6837\u5F0F\u914D\u7F6E +Plugin-LzljMap-ToolsTextStyle=\u7B5B\u9009\u6587\u672C\u6837\u5F0F +Plugin-LzljMap-detailTitleBgColor=\u6807\u9898\u80CC\u666F\u8272 +Plugin-LzljMap-detailAlignExpand=\u8BE6\u60C5\u6837\u5F0F\u914D\u7F6E +Plugin-LzljMap-detailColumnsExpand=\u8BE6\u60C5\u8868\u5B57\u6BB5\u914D\u7F6E + +Plugin-LzljMap-showPointLabel=\u663E\u793A\u70B9\u6807\u7B7E +Plugin-LzljMap-labelBgColor=\u80CC\u666F\u989C\u8272 +Plugin-LzljMap-labelstitle=\u6807\u7B7E +Plugin-LzljMap-labelTypeCheck=\u9009\u9879 +Plugin-LzljMap-labelTypeJS=JS\u811A\u672C +Plugin-LzljMap-showName=\u540D\u79F0 +Plugin-LzljMap-showLng=\u7ECF\u5EA6 +Plugin-LzljMap-showLat=\u7EAC\u5EA6 +Plugin-LzljMap-showDesc=\u63CF\u8FF0 +Plugin-LzljMap-labelType=\u53D6\u503C\u65B9\u5F0F +Plugin-LzljMap-labelAlignExpand=\u6807\u7B7E\u65B9\u5F0F +Plugin-LzljMap-LabelsTextStyle=\u6587\u672C\u6837\u5F0F + +Plugin-LzljMap-showPointTips=\u663E\u793A\u60AC\u6D6E\u63D0\u793A\u6846 +Plugin-LzljMap-tipstitle=\u63D0\u793A +Plugin-LzljMap-showLayerType=\u6570\u636E\u5206\u7C7B +Plugin-LzljMap-showDataType=\u6570\u636E\u7C7B\u578B +Plugin-LzljMap-tipBgColor=\u80CC\u666F\u989C\u8272 +Plugin-LzljMap-tipBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-tipsAlignExpand=\u63D0\u793A\u80CC\u666F +Plugin-LzljMap-tipsTextStyle=\u63D0\u793A\u6587\u672C + +Plugin-LzljMap-otherstitle=\u7279\u6548 +Plugin-LzljMap-LinkExpand=\u8D85\u7EA7\u94FE\u63A5\u914D\u7F6E +Plugin-LzljMap-pointStyleCondExpand=\u6761\u4EF6\u5C5E\u6027\u914D\u7F6E +Plugin-LzljMap-Cond-pointStyle=\u70B9\u6837\u5F0F +Plugin-LzljMap-Cond-clusterPointStyle=\u805A\u5408\u70B9\u6837\u5F0F +Plugin-LzljMap-Cond-AddCondtion=\u6DFB\u52A0 +Plugin-LzljMap-Cond-pointMapTitle=\u5730\u56FE\u70B9\u6761\u4EF6\u5C5E\u6027 +Plugin-LzljMap-Cond-pointSize=\u70B9\u5927\u5C0F +Plugin-LzljMap-Cond-PointMapStyleExpand=\u6837\u5F0F\u914D\u7F6E +Plugin-LzljMap-Cond-typeNameLabel=\u6570\u636E\u5206\u7C7B +Plugin-LzljMap-Cond-dataTypeLabel=\u6570\u636E\u7C7B\u578B +Plugin-LzljMap-Cond-valueNameLabel=\u6570\u503C +Plugin-LzljMap-Cond-clusterCountNameLabel=\u805A\u5408\u70B9\u6570\u91CF +Plugin-LzljMap-Cond-addButton=\u6DFB\u52A0 +Plugin-LzljMap-Cond-clearButton=\u6E05\u7A7A\u6761\u4EF6 +Plugin-LzljMap-Cond-condTaskStyleTitle=\u6761\u4EF6\u914D\u7F6E +Plugin-LzljMap-Cond-legendName=\u56FE\u4F8B\u540D\u79F0 \ No newline at end of file diff --git a/src/com/fr/plugin/lzljgdmap/locale/lzljgdmap_zh_CN.properties b/src/com/fr/plugin/lzljgdmap/locale/lzljgdmap_zh_CN.properties new file mode 100644 index 0000000..c667f74 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/locale/lzljgdmap_zh_CN.properties @@ -0,0 +1,106 @@ +Plugin_LzljMap_region=\u7701\u4EFD +Plugin_LzljMap_area=\u5730\u5E02 +Plugin_LzljMap_county=\u533A\u53BF +Plugin_LzljMap_layertype=\u6570\u636E\u5206\u7C7B +Plugin_LzljMap_datatype=\u6570\u636E\u7C7B\u578B +Plugin_LzljMap_lng=\u7ECF\u5EA6 +Plugin_LzljMap_lat=\u7EAC\u5EA6 +Plugin_LzljMap_name=\u540D\u79F0 +Plugin_LzljMap_val=\u6570\u503C +Plugin_LzljMap_desc=\u63CF\u8FF0 + +Plugin-LzljMap-isVisiableTitle=\u663E\u793A\u6807\u9898 +Plugin-LzljMap-titleBgColor=\u80CC\u666F\u989C\u8272 +Plugin-LzljMap-titleBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-TitleText=\u540D\u79F0 +Plugin-LzljMap-TitlePosition=\u4F4D\u7F6E +Plugin-LzljMap-TitleExpand=\u6807\u9898\u8BBE\u7F6E +Plugin-LzljMap-TitleStyle=\u6807\u9898\u6837\u5F0F + +Plugin-LzljMap-maptitle=\u5730\u56FE +Plugin-LzljMap-mapzoom=\u5730\u56FE\u7EA7\u522B +Plugin-LzljMap-centerx=\u4E2D\u5FC3\u70B9\u7ECF\u5EA6 +Plugin-LzljMap-centery=\u4E2D\u5FC3\u70B9\u7EAC\u5EA6 +Plugin-LzljMap-mapStyle=\u5730\u56FE\u6837\u5F0F +Plugin-LzljMap-mapKey=\u5730\u56FELicense +Plugin-LzljMap-regionBorderWidth=\u533A\u57DF\u8FB9\u754C\u5BBD +Plugin-LzljMap-regionBorderColor=\u7701\u4EFD\u8FB9\u754C\u989C\u8272 +Plugin-LzljMap-areaBorderColor=\u5730\u5E02\u8FB9\u754C\u989C\u8272 +Plugin-LzljMap-countryBorderColor=\u533A\u53BF\u8FB9\u754C\u989C\u8272 +Plugin-LzljMap-RegionExpand=\u884C\u653F\u533A\u57DF\u6837\u5F0F +Plugin-LzljMap-BaseMapExpand=\u5730\u56FE\u53C2\u6570\u8BBE\u7F6E +Plugin-LzljMap-CircleExpand=\u5708\u9009\u533A\u57DF\u6837\u5F0F +Plugin-LzljMap-circleBorderWidth=\u8FB9\u6846\u5BBD\u5EA6 +Plugin-LzljMap-circleBorderColor=\u8FB9\u6846\u989C\u8272 +Plugin-LzljMap-circleFillColor=\u586B\u5145\u989C\u8272 +Plugin-LzljMap-circleOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-showCircleDetail=\u663E\u793A\u5708\u9009\u6570\u636E\u8BE6\u60C5 + +Plugin-LzljMap-pointtitle=\u70B9\u5730\u56FE +Plugin-LzljMap-showCluster=\u663E\u793A\u805A\u5408\u6548\u679C +Plugin-LzljMap-clusterMaxZoom=\u6700\u5927\u805A\u5408\u7EA7\u522B +Plugin-LzljMap-pointSize=\u70B9\u5927\u5C0F +Plugin-LzljMap-clusterBorderColor=\u8FB9\u6846\u989C\u8272 +Plugin-LzljMap-clusterFillColor=\u586B\u5145\u989C\u8272 +Plugin-LzljMap-clusterTextColor=\u5B57\u4F53\u989C\u8272 +Plugin-LzljMap-clusterBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-pointMapExpand=\u70B9\u6837\u5F0F\u914D\u7F6E +Plugin-LzljMap-clusterPointMapExpand=\u805A\u5408\u70B9\u6837\u5F0F\u914D\u7F6E + +Plugin-LzljMap-heattitle=\u70ED\u529B\u56FE +Plugin-LzljMap-heatradius=\u534A\u5F84 +Plugin-LzljMap-heatmaxValue=\u6700\u5927\u503C +Plugin-LzljMap-heatbgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-heatinterval=\u5212\u5206\u9636\u6BB5 +Plugin-LzljMap-heatMapExpand=\u70ED\u529B\u6837\u5F0F\u914D\u7F6E + +Plugin-LzljMap-toolstitle=\u5DE5\u5177 +Plugin-LzljMap-toolAlignment=\u4F4D\u7F6E +Plugin-LzljMap-toolBgColor=\u80CC\u666F\u989C\u8272 +Plugin-LzljMap-toolBtnColor=\u6309\u94AE\u989C\u8272 +Plugin-LzljMap-toolBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-toolAlignExpand=\u7B5B\u9009\u6837\u5F0F\u914D\u7F6E +Plugin-LzljMap-ToolsTextStyle=\u7B5B\u9009\u6587\u672C\u6837\u5F0F +Plugin-LzljMap-detailTitleBgColor=\u6807\u9898\u80CC\u666F\u8272 +Plugin-LzljMap-detailAlignExpand=\u8BE6\u60C5\u6837\u5F0F\u914D\u7F6E +Plugin-LzljMap-detailColumnsExpand=\u8BE6\u60C5\u8868\u5B57\u6BB5\u914D\u7F6E + +Plugin-LzljMap-showPointLabel=\u663E\u793A\u70B9\u6807\u7B7E +Plugin-LzljMap-labelBgColor=\u80CC\u666F\u989C\u8272 +Plugin-LzljMap-labelstitle=\u6807\u7B7E +Plugin-LzljMap-labelTypeCheck=\u9009\u9879 +Plugin-LzljMap-labelTypeJS=JS\u811A\u672C +Plugin-LzljMap-showName=\u540D\u79F0 +Plugin-LzljMap-showLng=\u7ECF\u5EA6 +Plugin-LzljMap-showLat=\u7EAC\u5EA6 +Plugin-LzljMap-showDesc=\u63CF\u8FF0 +Plugin-LzljMap-labelType=\u53D6\u503C\u65B9\u5F0F +Plugin-LzljMap-labelAlignExpand=\u6807\u7B7E\u65B9\u5F0F +Plugin-LzljMap-LabelsTextStyle=\u6587\u672C\u6837\u5F0F + +Plugin-LzljMap-showPointTips=\u663E\u793A\u60AC\u6D6E\u63D0\u793A\u6846 +Plugin-LzljMap-tipstitle=\u63D0\u793A +Plugin-LzljMap-showLayerType=\u6570\u636E\u5206\u7C7B +Plugin-LzljMap-showDataType=\u6570\u636E\u7C7B\u578B +Plugin-LzljMap-tipBgColor=\u80CC\u666F\u989C\u8272 +Plugin-LzljMap-tipBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-LzljMap-tipsAlignExpand=\u63D0\u793A\u80CC\u666F +Plugin-LzljMap-tipsTextStyle=\u63D0\u793A\u6587\u672C + +Plugin-LzljMap-otherstitle=\u7279\u6548 +Plugin-LzljMap-LinkExpand=\u8D85\u7EA7\u94FE\u63A5\u914D\u7F6E +Plugin-LzljMap-pointStyleCondExpand=\u6761\u4EF6\u5C5E\u6027\u914D\u7F6E +Plugin-LzljMap-Cond-pointStyle=\u70B9\u6837\u5F0F +Plugin-LzljMap-Cond-clusterPointStyle=\u805A\u5408\u70B9\u6837\u5F0F +Plugin-LzljMap-Cond-AddCondtion=\u6DFB\u52A0 +Plugin-LzljMap-Cond-pointMapTitle=\u5730\u56FE\u70B9\u6761\u4EF6\u5C5E\u6027 +Plugin-LzljMap-Cond-pointSize=\u70B9\u5927\u5C0F +Plugin-LzljMap-Cond-PointMapStyleExpand=\u6837\u5F0F\u914D\u7F6E +Plugin-LzljMap-Cond-typeNameLabel=\u6570\u636E\u5206\u7C7B +Plugin-LzljMap-Cond-dataTypeLabel=\u6570\u636E\u7C7B\u578B +Plugin-LzljMap-Cond-valueNameLabel=\u6570\u503C +Plugin-LzljMap-Cond-clusterCountNameLabel=\u805A\u5408\u70B9\u6570\u91CF +Plugin-LzljMap-Cond-addButton=\u6DFB\u52A0 +Plugin-LzljMap-Cond-clearButton=\u6E05\u7A7A\u6761\u4EF6 +Plugin-LzljMap-Cond-condTaskStyleTitle=\u6761\u4EF6\u914D\u7F6E +Plugin-LzljMap-Cond-legendName=\u56FE\u4F8B\u540D\u79F0 \ No newline at end of file diff --git a/src/com/fr/plugin/lzljgdmap/ui/ImageChooserPane.java b/src/com/fr/plugin/lzljgdmap/ui/ImageChooserPane.java new file mode 100644 index 0000000..3be9e00 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/ImageChooserPane.java @@ -0,0 +1,136 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.bulenkov.iconloader.util.Base64Converter; +import com.fr.base.BaseUtils; +import com.fr.base.Style; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.background.image.ImageFileChooser; +import com.fr.design.style.background.image.ImagePreviewPane; +import com.fr.design.utils.ImageUtils; +import com.fr.general.ImageWithSuffix; +import com.fr.general.xml.GeneralXMLTools; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.image.BufferedImage; +import java.io.File; + +public class ImageChooserPane extends BasicBeanPane { + private ImageFileChooser imageChooser; + private ImagePreviewPane imagePreview; + + private UIButton imagebtn; + + private ImageEntity imageEntity; + + public ImageChooserPane() { + this.setLayout(new BorderLayout()); + + imagePreview = new ImagePreviewPane(); + imageEntity = new ImageEntity(); + imagebtn = new UIButton("选择图标"); + UILabel imageLab = new UILabel("点图标"); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{imageLab, imagebtn}, + new Component[]{null, imagePreview} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + + this.add(panel, BorderLayout.CENTER); + + this.setVisible(true); + + imageChooser = new ImageFileChooser(); + imageChooser.setMultiSelectionEnabled(false); + initLiseners(); + } + + private void initLiseners() { + this.imagebtn.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + int returnVal = imageChooser.showOpenDialog(ImageChooserPane.this); + if (returnVal != JFileChooser.CANCEL_OPTION) { + dealWithImageFile(); + } + } + }); + } + + private void dealWithImageFile() { + final File selectedFile = imageChooser.getSelectedFile(); + if (selectedFile != null && selectedFile.isFile()) { + BufferedImage image = BaseUtils.readImage(selectedFile.getPath()); + if (null == image) { + return; + } + if (image.getWidth() > 300 || image.getHeight() > 300) { + JOptionPane.showMessageDialog(null, + "图片太大,请重新选择!大小不超过300*300,当前尺寸:" + image.getWidth() + "*" + image.getHeight(), + "信息提示", + JOptionPane.ERROR_MESSAGE); + return; + } + + String type = ImageUtils.getImageType(selectedFile); + String iconBase64 = Base64Converter.encode(GeneralXMLTools.imageEncode(image, type)); + + if (null == this.imageEntity) { + this.imageEntity = new ImageEntity(); + } + this.imageEntity.setImagestr(iconBase64); + this.imageEntity.setImagetype(type); + this.imageEntity.setWidth(image.getWidth()); + this.imageEntity.setHeight(image.getHeight()); + + if (imagePreview != null) { + ImageWithSuffix imageWithSuffix = new ImageWithSuffix(image, type); + imagePreview.setImageStyle(Style.getInstance()); + imagePreview.setImageWithSuffix(imageWithSuffix); + imagePreview.repaint(); + } + } + } + + @Override + public void populateBean(ImageEntity ob) { + if (null == ob || null == ob.getImagestr() || "".equals(ob.getImagestr())) { + this.imageEntity = new ImageEntity(); + this.imagePreview.setImage(null); + this.imagePreview.repaint(); + new ImagePreviewPane(); + return; + } + this.imageEntity = ob; + BufferedImage image = (BufferedImage) GeneralXMLTools.imageDecode(Base64Converter.decode(ob.getImagestr().getBytes())); + if (imagePreview != null && null != image) { + ImageWithSuffix imageWithSuffix = new ImageWithSuffix(image, ob.getImagetype()); + imagePreview.setImageStyle(Style.getInstance()); + imagePreview.setImageWithSuffix(imageWithSuffix); + imagePreview.repaint(); + } + } + + @Override + public ImageEntity updateBean() { + return this.imageEntity; + } + + @Override + protected String title4PopupWindow() { + return "点图标设置"; + } + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/ImageEntity.java b/src/com/fr/plugin/lzljgdmap/ui/ImageEntity.java new file mode 100644 index 0000000..1957d76 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/ImageEntity.java @@ -0,0 +1,42 @@ +package com.fr.plugin.lzljgdmap.ui; + +import java.io.Serializable; + +public class ImageEntity implements Serializable { + private String imagestr; + private String imagetype; + private int width; + private int height; + + public String getImagestr() { + return imagestr; + } + + public void setImagestr(String imagestr) { + this.imagestr = imagestr; + } + + public String getImagetype() { + return imagetype; + } + + public void setImagetype(String imagetype) { + this.imagetype = imagetype; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapClusterPointStyleCreator.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapClusterPointStyleCreator.java new file mode 100644 index 0000000..684f12f --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapClusterPointStyleCreator.java @@ -0,0 +1,188 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.json.JSONObject; +import com.fr.plugin.lzljgdmap.vo.ClusterPointMapStyleJson; +import com.fr.plugin.lzljgdmap.vo.CustomJsonObject; +import com.fr.van.chart.designer.AbstractVanChartScrollPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author fr.open + */ +public class LzljMapClusterPointStyleCreator extends AbstractVanChartScrollPane { + + private UITextArea condition; + + private UISpinner clusterPointSize; + private ColorSelectBox clusterBorderColor; + private ColorSelectBox clusterFillColor; + private ColorSelectBox clusterTextColor; + private UINumberDragPane clusterBgOpacity; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(CustomJsonObject json) { + JSONObject chartConf = null; + if (null != json) { + chartConf = json.get(); + } + if (null != chartConf) { + this.clusterPointSize.setValue(chartConf.getDouble("clusterPointSize")); + this.clusterBorderColor.setSelectObject(MapUtil.toColor(chartConf.getString("clusterBorderColor"))); + this.clusterFillColor.setSelectObject(MapUtil.toColor(chartConf.getString("clusterFillColor"))); + this.clusterTextColor.setSelectObject(MapUtil.toColor(chartConf.getString("clusterTextColor"))); + this.clusterBgOpacity.populateBean(chartConf.getDouble("clusterBgOpacity")); + this.condition.setText(chartConf.getString("condition")); + } + } + + @Override + public CustomJsonObject updateBean() { + JSONObject chartConf = JSONObject.create(); + + chartConf.put("clusterPointSize", this.clusterPointSize.getValue()); + chartConf.put("clusterBorderColor", MapUtil.toHex(this.clusterBorderColor.getSelectObject())); + chartConf.put("clusterFillColor", MapUtil.toHex(this.clusterFillColor.getSelectObject())); + chartConf.put("clusterTextColor", MapUtil.toHex(this.clusterTextColor.getSelectObject())); + chartConf.put("clusterBgOpacity", this.clusterBgOpacity.updateBean()); + chartConf.put("condition", this.condition.getText()); + + ClusterPointMapStyleJson json = new ClusterPointMapStyleJson(); + chartConf.put("title", json.getTilte()); + json.put(chartConf); + return json; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-Cond-pointMapTitle"); + } + + protected class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel condPane = createConditionPane(); + JPanel stylePane = createStylePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{condPane}, + new Component[]{stylePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createStylePane() { + + this.clusterPointSize = new UISpinner(0, 1000, 1, 32); + this.clusterBorderColor = new ColorSelectBox(100); + this.clusterFillColor = new ColorSelectBox(100); + this.clusterTextColor = new ColorSelectBox(100); + this.clusterBgOpacity = new UINumberDragPane(0, 100); + + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-pointSize")), this.clusterPointSize}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-clusterBorderColor")), this.clusterBorderColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-clusterFillColor")), this.clusterFillColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-clusterTextColor")), this.clusterTextColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-clusterBgOpacity")), this.clusterBgOpacity} + }; + + double p = TableLayout.PREFERRED; + double[] columnSize = {TableLayout.PREFERRED, TableLayout.FILL}; + double[] rowSize = {p, p, p, p, p, p, p}; + JPanel sizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + + Component[][] comp1 = new Component[][]{ + new Component[]{sizePane} + }; + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p, p, p}, new double[]{TableLayout.FILL}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-Cond-PointMapStyleExpand"), panel); + } + + private JPanel createConditionPane() { + condition = new UITextArea(3, 6); + + final UITextField value = new UITextField(); + final UIComboBox cond = new UIComboBox(new String[]{"==", ">", "<"}); + UILabel name = new UILabel(Toolkit.i18nText("Plugin-LzljMap-Cond-clusterCountNameLabel")); + UIButton add = new UIButton(Toolkit.i18nText("Plugin-LzljMap-Cond-addButton")); + + UIButton clear = new UIButton(Toolkit.i18nText("Plugin-LzljMap-Cond-clearButton")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + new Component[]{name, cond, value, add, clear} + }; + JPanel condPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p, p, p}, new double[]{p, p, f, p, p}); + + Component[][] comp1 = new Component[][]{ + new Component[]{condition} + }; + JPanel areaPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p}, new double[]{f}); + + Component[][] comp = new Component[][]{ + new Component[]{condPane}, + new Component[]{areaPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + condition.setEnabled(false); + add.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "{聚合数量} " + cond.getSelectedItem() + " " + value.getText(); + condition.setText(srcStr + condstr); + } + }); + + clear.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + condition.setText(""); + } + }); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-Cond-condTaskStyleTitle"), sumPane); + } + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapHyperLink.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapHyperLink.java new file mode 100644 index 0000000..23feba4 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapHyperLink.java @@ -0,0 +1,55 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.base.BaseFormula; +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.js.NameJavaScriptGroup; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.van.chart.custom.component.VanChartHyperLinkPane; + +import java.util.Map; + +public class LzljMapHyperLink extends VanChartHyperLinkPane { + + private LzljMapChart chart; + + public void populateBean(LzljMapChart paramAbstractECharts) { + this.chart = paramAbstractECharts; + populate(paramAbstractECharts.getPlot()); + } + + public void updateBean(LzljMapChart paramAbstractECharts) { + update(paramAbstractECharts.getPlot()); + } + + @Override + public NameableCreator[] createNameableCreators() { + return super.createNameableCreators(); + } + + @Override + public BasicBeanPane createPaneByCreators(NameableCreator nameableCreator) { + return super.createPaneByCreators(nameableCreator); + } + + @Override + protected Map getHyperLinkEditorMap() { + return this.chart.getHyperLinkEditorMap(); + } + + @Override + public void refreshNameableCreator(NameableCreator[] nameableCreators) { + super.refreshNameableCreator(nameableCreators); + } + + @Override + protected NameJavaScriptGroup populateHotHyperLink(Plot paramPlot) { + return this.chart.getLinkNameGroup(); + } + + @Override + protected void updateHotHyperLink(Plot paramPlot, NameJavaScriptGroup paramNameJavaScriptGroup) { + this.chart.setLinkNameGroup(paramNameJavaScriptGroup); + } +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapPointCondListPane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapPointCondListPane.java new file mode 100644 index 0000000..0c319cf --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapPointCondListPane.java @@ -0,0 +1,146 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.design.gui.imenutable.UIMenuNameableCreator; +import com.fr.design.i18n.Toolkit; +import com.fr.general.NameObject; +import com.fr.json.JSONArray; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.plugin.lzljgdmap.vo.ClusterPointMapStyleJson; +import com.fr.plugin.lzljgdmap.vo.CustomJsonObject; +import com.fr.plugin.lzljgdmap.vo.PointMapStyleJson; +import com.fr.stable.ListMap; +import com.fr.stable.Nameable; +import com.fr.van.chart.designer.component.VanChartUIListControlPane; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.HashMap; + +/** + * @author fr.open + */ +public class LzljMapPointCondListPane extends VanChartUIListControlPane { + + private LzljMapChart chart; + + private HashMap paneMap; + private HashMap jsonMap; + + public LzljMapPointCondListPane() { + paneMap = new HashMap(6); + paneMap.put(CustomJsonObject.POINT_MAP_TITLE, LzljMapPointStyleCreator.class); + paneMap.put(CustomJsonObject.CLUSTER_POINT_MAP_TITLE, LzljMapClusterPointStyleCreator.class); + + jsonMap = new HashMap(6); + jsonMap.put(CustomJsonObject.POINT_MAP_TITLE, PointMapStyleJson.class); + jsonMap.put(CustomJsonObject.CLUSTER_POINT_MAP_TITLE, ClusterPointMapStyleJson.class); + } + + @Override + protected void update(Plot plot) { + } + + public void populateStyle(LzljMapChart chart) { + this.chart = chart; + + JSONArray pointStyleCond = chart.getPointStyleCond(); + ArrayList noList = new ArrayList(); + for (int i = 0; null != pointStyleCond && i < pointStyleCond.size(); i++) { + JSONObject line = pointStyleCond.getJSONObject(i); + if (null != line) { + try { + CustomJsonObject json = (CustomJsonObject)this.getJsonByTitle(line.getString("title")).newInstance(); + json.put(line); + UIMenuNameableCreator var11 = new UIMenuNameableCreator(line.getString("titleName"), json, this.getEditPaneByTitle(line.getString("title"))); + noList.add(new NameObject(var11.getName(), var11.getObj())); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + this.populate((Nameable[])noList.toArray(new NameObject[noList.size()])); + this.doLayout(); + + } + + public void updateStyle(LzljMapChart chart) { + Nameable[] nameables = this.update(); + + JSONArray objConf = JSONArray.create(); + for (int i = 0; i < nameables.length; i++) { + CustomJsonObject noObj = (CustomJsonObject)((NameObject)nameables[i]).getObject(); + if (null == noObj) { + noObj = new CustomJsonObject(); + noObj.put(JSONObject.create()); + } + if (null == noObj.get()) { + noObj.put(JSONObject.create()); + } + + noObj.get().put("titleName", ((NameObject)nameables[i]).getName()); + objConf.add(noObj.get()); + } + + chart.setPointStyleCond(objConf); + + } + + @Override + public NameableCreator[] createNameableCreators() { + ListMap creatorMap = new ListMap(); + + NameableCreator mon = new NameObjectCreator(Toolkit.i18nText("Plugin-LzljMap-Cond-pointStyle"), PointMapStyleJson.class, LzljMapPointStyleCreator.class); + creatorMap.put(mon.menuName(), mon); + NameableCreator cluster = new NameObjectCreator(Toolkit.i18nText("Plugin-LzljMap-Cond-clusterPointStyle"), ClusterPointMapStyleJson.class, LzljMapClusterPointStyleCreator.class); + creatorMap.put(cluster.menuName(), cluster); + + return (NameableCreator[])creatorMap.values().toArray(new NameableCreator[creatorMap.size()]); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-Cond-AddCondtion"); + } + + @Override + protected String getAddItemText() { + return Toolkit.i18nText("Plugin-LzljMap-Cond-AddCondtion"); + } + + @Override + public BasicBeanPane createPaneByCreators(NameableCreator nameableCreator) { + Constructor var2 = null; + try { + var2 = nameableCreator.getUpdatePane().getConstructor(); + return (BasicBeanPane)var2.newInstance(); + } catch (InstantiationException var4) { + FineLoggerFactory.getLogger().error(var4.getMessage(), var4); + } catch (IllegalAccessException var5) { + FineLoggerFactory.getLogger().error(var5.getMessage(), var5); + } catch (NoSuchMethodException var6) { + return super.createPaneByCreators(nameableCreator); + } catch (InvocationTargetException var7) { + FineLoggerFactory.getLogger().error(var7.getMessage(), var7); + } + return null; + } + + private Class getEditPaneByTitle(String title) { + return (Class)paneMap.get(title); + } + + private Class getJsonByTitle(String title) { + return (Class)jsonMap.get(title); + } + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapPointStyleCreator.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapPointStyleCreator.java new file mode 100644 index 0000000..8bab255 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapPointStyleCreator.java @@ -0,0 +1,223 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.json.JSONObject; +import com.fr.plugin.lzljgdmap.vo.CustomJsonObject; +import com.fr.plugin.lzljgdmap.vo.PointMapStyleJson; +import com.fr.van.chart.designer.AbstractVanChartScrollPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author fr.open + */ +public class LzljMapPointStyleCreator extends AbstractVanChartScrollPane { + + private UITextArea condition; + + private UITextField legendName; + private UISpinner pointSize; + private ImageChooserPane pointPane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(CustomJsonObject json) { + JSONObject chartConf = null; + if (null != json) { + chartConf = json.get(); + } + if (null != chartConf) { + this.legendName.setText(chartConf.getString("legendName")); + this.pointSize.setValue(chartConf.getDouble("pointSize")); + this.condition.setText(chartConf.getString("condition")); + + ImageEntity imgEnt = new ImageEntity(); + imgEnt.setImagestr(chartConf.getString("pointimg")); + imgEnt.setImagetype(chartConf.getString("pointimgtype")); + imgEnt.setWidth(chartConf.getInt("pointimgw")); + imgEnt.setHeight(chartConf.getInt("pointimgh")); + this.pointPane.populateBean(imgEnt); + } + } + + @Override + public CustomJsonObject updateBean() { + JSONObject chartConf = JSONObject.create(); + + chartConf.put("legendName", this.legendName.getText()); + chartConf.put("pointSize", this.pointSize.getValue()); + chartConf.put("condition", this.condition.getText()); + + ImageEntity imgEnt = this.pointPane.updateBean(); + if (null != imgEnt) { + chartConf.put("pointimg", imgEnt.getImagestr()); + chartConf.put("pointimgtype", imgEnt.getImagetype()); + chartConf.put("pointimgw", imgEnt.getWidth()); + chartConf.put("pointimgh", imgEnt.getHeight()); + } + + PointMapStyleJson json = new PointMapStyleJson(); + chartConf.put("title", json.getTilte()); + json.put(chartConf); + return json; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-Cond-pointMapTitle"); + } + + protected class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel condPane = createConditionPane(); + JPanel stylePane = createStylePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{condPane}, + new Component[]{stylePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createStylePane() { + + this.legendName = new UITextField(); + this.pointSize = new UISpinner(0, 1000, 1, 32); + this.pointPane = new ImageChooserPane(); + + Component[][] components = new Component[][]{ + {null, null}, + //new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-Cond-legendName")), this.legendName}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-Cond-pointSize")), this.pointSize} + }; + + double p = TableLayout.PREFERRED; + double[] columnSize = {TableLayout.PREFERRED, TableLayout.FILL}; + double[] rowSize = {p, p, p}; + JPanel sizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + + Component[][] comp1 = new Component[][]{ + new Component[]{sizePane}, + new Component[]{pointPane} + }; + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p, p, p}, new double[]{TableLayout.FILL}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-Cond-PointMapStyleExpand"), panel); + } + + private JPanel createConditionPane() { + condition = new UITextArea(3, 6); + + final UITextField typevalue = new UITextField(); + final UIComboBox typecond = new UIComboBox(new String[]{"=="}); + UILabel type = new UILabel(Toolkit.i18nText("Plugin-LzljMap-Cond-typeNameLabel")); + UIButton addType = new UIButton(Toolkit.i18nText("Plugin-LzljMap-Cond-addButton")); + + final UITextField datavalue = new UITextField(); + final UIComboBox datacond = new UIComboBox(new String[]{"=="}); + UILabel data = new UILabel(Toolkit.i18nText("Plugin-LzljMap-Cond-dataTypeLabel")); + UIButton addData = new UIButton(Toolkit.i18nText("Plugin-LzljMap-Cond-addButton")); + + final UITextField value = new UITextField(); + final UIComboBox cond = new UIComboBox(new String[]{"==", ">", "<"}); + UILabel name = new UILabel(Toolkit.i18nText("Plugin-LzljMap-Cond-valueNameLabel")); + UIButton add = new UIButton(Toolkit.i18nText("Plugin-LzljMap-Cond-addButton")); + + UIButton clear = new UIButton(Toolkit.i18nText("Plugin-LzljMap-Cond-clearButton")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + new Component[]{type, typecond, typevalue, addType, null}, + new Component[]{data, datacond, datavalue, addData, null}, + new Component[]{name, cond, value, add, clear} + }; + JPanel condPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p, p, p}, new double[]{p, p, f, p, p}); + + Component[][] comp1 = new Component[][]{ + new Component[]{condition} + }; + JPanel areaPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p}, new double[]{f}); + + Component[][] comp = new Component[][]{ + new Component[]{condPane}, + new Component[]{areaPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + condition.setEnabled(false); + add.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "{数值} " + cond.getSelectedItem() + " " + value.getText(); + condition.setText(srcStr + condstr); + } + }); + addData.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "'{数据类型}' " + datacond.getSelectedItem() + " '" + datavalue.getText() + "'"; + condition.setText(srcStr + condstr); + } + }); + addType.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "'{数据分类}' " + typecond.getSelectedItem() + " '" + typevalue.getText() + "'"; + condition.setText(srcStr + condstr); + } + }); + + clear.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + condition.setText(""); + } + }); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-Cond-condTaskStyleTitle"), sumPane); + } + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleBaseMapPane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleBaseMapPane.java new file mode 100644 index 0000000..7a1849a --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleBaseMapPane.java @@ -0,0 +1,192 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.json.JSONObject; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +/** + * @author fr.open + */ +public class LzljMapStyleBaseMapPane extends ExtendedScrollPane { + + private UISpinner mapzoom; + private UITextField centerx; + private UITextField centery; + + private UITextField mapStyle; + private UITextField mapKey; + + private UISpinner regionBorderWidth; + private ColorSelectBox regionBorderColor; + private ColorSelectBox areaBorderColor; + private ColorSelectBox countryBorderColor; + + private UISpinner circleBorderWidth; + private ColorSelectBox circleBorderColor; + private ColorSelectBox circleFillColor; + private UINumberDragPane circleOpacity; + private UICheckBox showCircleDetail; + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(LzljMapChart chart) { + JSONObject regionConf = chart.getMapConf(); + this.mapzoom.setValue(regionConf.getDouble("mapzoom")); + this.centerx.setText(regionConf.getString("centerx")); + this.centery.setText(regionConf.getString("centery")); + + this.mapStyle.setText(regionConf.getString("mapStyle")); + this.mapKey.setText(regionConf.getString("mapKey")); + + this.regionBorderWidth.setValue(regionConf.getDouble("regionBorderWidth")); + this.regionBorderColor.setSelectObject(MapUtil.toColor(regionConf.getString("regionBorderColor"))); + this.areaBorderColor.setSelectObject(MapUtil.toColor(regionConf.getString("areaBorderColor"))); + this.countryBorderColor.setSelectObject(MapUtil.toColor(regionConf.getString("countryBorderColor"))); + + this.circleBorderWidth.setValue(regionConf.getDouble("circleBorderWidth")); + this.circleBorderColor.setSelectObject(MapUtil.toColor(regionConf.getString("circleBorderColor"))); + this.circleFillColor.setSelectObject(MapUtil.toColor(regionConf.getString("circleFillColor"))); + this.circleOpacity.populateBean(regionConf.getDouble("circleOpacity")); + this.showCircleDetail.setSelected(regionConf.getBoolean("showCircleDetail")); + } + + @Override + public void updateBean(LzljMapChart chart) { + JSONObject regionConf = JSONObject.create(); + regionConf.put("mapzoom", this.mapzoom.getValue()); + regionConf.put("centerx", this.centerx.getText()); + regionConf.put("centery", this.centery.getText()); + + regionConf.put("mapStyle", this.mapStyle.getText()); + regionConf.put("mapKey", this.mapKey.getText()); + + regionConf.put("regionBorderWidth", this.regionBorderWidth.getValue()); + regionConf.put("regionBorderColor", MapUtil.toHex(this.regionBorderColor.getSelectObject())); + regionConf.put("areaBorderColor", MapUtil.toHex(this.areaBorderColor.getSelectObject())); + regionConf.put("countryBorderColor", MapUtil.toHex(this.countryBorderColor.getSelectObject())); + + regionConf.put("circleBorderWidth", this.circleBorderWidth.getValue()); + regionConf.put("circleBorderColor", MapUtil.toHex(this.circleBorderColor.getSelectObject())); + regionConf.put("circleFillColor", MapUtil.toHex(this.circleFillColor.getSelectObject())); + regionConf.put("circleOpacity", this.circleOpacity.updateBean()); + regionConf.put("showCircleDetail", this.showCircleDetail.isSelected()); + + chart.setMapConf(regionConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-maptitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel mapContentPane = createMapContentPane(); + JPanel regionContentPane = createRegionContentPane(); + JPanel circleContentPane = createCircleContentPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{mapContentPane}, + new Component[]{regionContentPane}, + new Component[]{circleContentPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents,rowSize,columnSize); + this.add(panel,BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createMapContentPane(){ + + mapzoom = new UISpinner(1, 18, 1, 1); + centerx = new UITextField(); + centery = new UITextField(); + + mapStyle = new UITextField(); + mapKey = new UITextField(); + + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-mapzoom")), this.mapzoom}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-centerx")), this.centerx}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-centery")), this.centery}, + + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-mapStyle")), this.mapStyle}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-mapKey")), this.mapKey} + } ; + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p, p, p, p, p}, new double[]{p, f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-BaseMapExpand"), pane); + } + + private JPanel createRegionContentPane(){ + regionBorderWidth = new UISpinner(0, 100, 1, 1); + regionBorderColor = new ColorSelectBox(100); + areaBorderColor = new ColorSelectBox(100); + countryBorderColor = new ColorSelectBox(100); + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-regionBorderWidth")), this.regionBorderWidth}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-regionBorderColor")), this.regionBorderColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-areaBorderColor")), this.areaBorderColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-countryBorderColor")), this.countryBorderColor}, + } ; + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p, p, p, p}, new double[]{p, f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-RegionExpand"), pane); + } + + private JPanel createCircleContentPane(){ + circleBorderWidth = new UISpinner(0, 100, 1, 1); + circleBorderColor = new ColorSelectBox(100); + circleFillColor = new ColorSelectBox(100); + circleOpacity = new UINumberDragPane(0, 100); + showCircleDetail = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showCircleDetail")); + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-circleBorderWidth")), this.circleBorderWidth}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-circleBorderColor")), this.circleBorderColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-circleFillColor")), this.circleFillColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-circleOpacity")), this.circleOpacity}, + new Component[]{null, this.showCircleDetail} + } ; + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p, p, p, p, p}, new double[]{p, f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-CircleExpand"), pane); + } +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleHeatMapPane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleHeatMapPane.java new file mode 100644 index 0000000..d573c9f --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleHeatMapPane.java @@ -0,0 +1,159 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.json.JSONObject; +import com.fr.plugin.chart.range.GradualIntervalConfig; +import com.fr.plugin.chart.range.glyph.GradualColorDist; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.stable.StringUtils; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; +import com.fr.van.chart.range.component.LegendGradientBar; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.util.ArrayList; + +/** + * @author fr.open + */ +public class LzljMapStyleHeatMapPane extends ExtendedScrollPane { + + private UISpinner radius; + private UISpinner maxValue; + private UINumberDragPane bgOpacity; + + private UINumberDragPane interval; + + private LegendGradientBar intervalLegend; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(LzljMapChart chart) { + JSONObject heatConf = chart.getHeatConf(); + this.radius.setValue(heatConf.getDouble("radius")); + this.maxValue.setValue(heatConf.getDouble("maxValue")); + this.bgOpacity.populateBean(heatConf.getDouble("bgOpacity")); + this.interval.populateBean(heatConf.getDouble("interval")); + + GradualIntervalConfig intervalConfig = new GradualIntervalConfig(); + String intervalColors = heatConf.getString("intervalColors"); + String intervalPos = heatConf.getString("intervalPos"); + if (StringUtils.isNotEmpty(intervalColors) + && StringUtils.isNotEmpty(intervalPos)) { + String[] intervalArr = intervalColors.split("\\|"); + String[] intervalPosArr = intervalPos.split("\\|"); + ArrayList colorsList = new ArrayList(); + for (int i = 0; i < intervalArr.length; i++) { + colorsList.add(new GradualColorDist(Float.parseFloat(intervalPosArr[i]), MapUtil.toColor(intervalArr[i]))); + } + intervalConfig.setDivStage(intervalArr.length - 1); + intervalConfig.setGradualColorDistList(colorsList); + } + intervalLegend.populate(intervalConfig); + } + + @Override + public void updateBean(LzljMapChart chart) { + JSONObject heatConf = JSONObject.create(); + heatConf.put("radius", this.radius.getValue()); + heatConf.put("maxValue", this.maxValue.getValue()); + heatConf.put("bgOpacity", this.bgOpacity.updateBean()); + heatConf.put("interval", this.interval.updateBean()); + + GradualIntervalConfig intervalConfig = new GradualIntervalConfig(); + intervalLegend.update(intervalConfig); + ArrayList colorsList = intervalConfig.getGradualColorDistList(); + String intervalColors = ""; + String intervalPos = ""; + if (null != colorsList && colorsList.size() > 0) { + for (int i = 0; i < colorsList.size(); i++) { + if (i > 0) { + intervalColors += "|"; + intervalPos += "|"; + } + intervalColors += MapUtil.toHex(colorsList.get(i).getColor()); + intervalPos += colorsList.get(i).getPosition(); + } + } + heatConf.put("intervalColors", intervalColors); + heatConf.put("intervalPos", intervalPos); + + chart.setHeatConf(heatConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-heattitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel regionContentPane = createHeatContentPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{regionContentPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createHeatContentPane() { + + radius = new UISpinner(1, 10000, 1, 30); + maxValue = new UISpinner(1, 10000000, 1, 1); + bgOpacity = new UINumberDragPane(0, 100); + interval = new UINumberDragPane(1, 6); + intervalLegend = new LegendGradientBar(); + + interval.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + Double num = interval.updateBean(); + intervalLegend.refreshColorSelectionBtnNum(num.intValue()); + } + }); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-heatradius")), this.radius}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-heatmaxValue")), this.maxValue}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-heatbgOpacity")), this.bgOpacity}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-heatinterval")), this.interval}, + new Component[]{null, this.intervalLegend} + }; + JPanel sizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p, p, p, p, p}, new double[]{p, f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-heatMapExpand"), sizePane); + + } + + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleLabelsPane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleLabelsPane.java new file mode 100644 index 0000000..f59bbbe --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleLabelsPane.java @@ -0,0 +1,198 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.chart.base.TextAttr; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +/** + * @author fr.open + */ +public class LzljMapStyleLabelsPane extends ExtendedScrollPane { + + private UICheckBox showPointLabel; + private ColorSelectBox labelBgColor; + private UIButtonGroup labelType; + private UICheckBox showLayerType; + private UICheckBox showDataType; + private UICheckBox showName; + private UICheckBox showLng; + private UICheckBox showLat; + private UICheckBox showDesc; + private UITextArea labelJsPane; + private CardLayout cardLayout; + + private ChartTextAttrPane textAttrPane; + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(LzljMapChart chart) { + JSONObject labelConf = chart.getLabelConf(); + this.showPointLabel.setSelected(labelConf.getBoolean("showPointLabel")); + this.labelBgColor.setSelectObject(MapUtil.toColor(labelConf.getString("labelBgColor"))); + this.labelType.setSelectedItem(labelConf.getInt("labelType")); + this.showLayerType.setSelected(labelConf.getBoolean("showLayerType")); + this.showDataType.setSelected(labelConf.getBoolean("showDataType")); + this.showName.setSelected(labelConf.getBoolean("showName")); + this.showLng.setSelected(labelConf.getBoolean("showLng")); + this.showLat.setSelected(labelConf.getBoolean("showLat")); + this.showDesc.setSelected(labelConf.getBoolean("showDesc")); + labelJsPane.setText(labelConf.getString("labelJsPane")); + FRFont labelFont = FRFont.getInstance(labelConf.getString("labelfamily"), + labelConf.getInt("labelstyle"), + labelConf.getInt("labelsize"), + MapUtil.toColor(labelConf.getString("labelcolor"))); + this.textAttrPane.populate(labelFont); + } + + @Override + public void updateBean(LzljMapChart chart) { + JSONObject labelConf = JSONObject.create(); + labelConf.put("showPointLabel", this.showPointLabel.isSelected()); + labelConf.put("labelBgColor", MapUtil.toHex(this.labelBgColor.getSelectObject())); + labelConf.put("labelType", this.labelType.getSelectedItem()); + labelConf.put("showLayerType", this.showLayerType.isSelected()); + labelConf.put("showDataType", this.showDataType.isSelected()); + labelConf.put("showName", this.showName.isSelected()); + labelConf.put("showLng", this.showLng.isSelected()); + labelConf.put("showLat", this.showLat.isSelected()); + labelConf.put("showDesc", this.showDesc.isSelected()); + labelConf.put("labelJsPane", this.labelJsPane.getText()); + + TextAttr labelAttr = this.textAttrPane.update(); + labelConf.put("labelsize", labelAttr.getFRFont().getSize()); + labelConf.put("labelstyle", labelAttr.getFRFont().getStyle()); + labelConf.put("labelfamily", labelAttr.getFRFont().getFamily()); + labelConf.put("labelcolor", MapUtil.toHex(labelAttr.getFRFont().getForeground())); + + chart.setLabelConf(labelConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-labelstitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel toolContentPane = createLabelContentPane(); + JPanel textStylePane = createLabelTextStylePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{showPointLabel}, + new Component[]{toolContentPane}, + new Component[]{textStylePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createLabelContentPane() { + + showPointLabel = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showPointLabel")); + labelBgColor = new ColorSelectBox(100); + labelType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-LzljMap-labelTypeCheck"), + Toolkit.i18nText("Plugin-LzljMap-labelTypeJS") + }, + new Integer[]{1, 2} + ); + labelType.setSelectedItem(1); + + showLayerType = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showLayerType")); + showDataType = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showDataType")); + showName = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showName")); + showLng = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showLng")); + showLat = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showLat")); + showDesc = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showDesc")); + + labelJsPane = new UITextArea(6, 6); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] compLabel = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-labelBgColor")), this.labelBgColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-labelType")), this.labelType} + }; + JPanel labelTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(compLabel, new double[]{p, p, p, p}, new double[]{p, f}); + + Component[][] compCheck = new Component[][]{ + new Component[]{showLayerType, showDataType}, + new Component[]{showName, showLng}, + new Component[]{showLat, showDesc} + }; + final JPanel checkPane = TableLayout4VanChartHelper.createGapTableLayoutPane(compCheck, new double[]{p, p, p, p}, new double[]{p, f}); + + final JPanel cardPane = new JPanel(this.cardLayout = new CardLayout()){ + @Override + public Dimension getPreferredSize() { + if (null != labelType.getSelectedItem() && labelType.getSelectedItem() == 2) { + return labelJsPane.getPreferredSize(); + } else { + return checkPane.getPreferredSize(); + } + } + }; + cardPane.add(checkPane, "check"); + cardPane.add(labelJsPane, "js"); + this.cardLayout.show(cardPane, "check"); + labelType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + if (labelType.getSelectedItem() == 1) { + cardLayout.show(cardPane, "check"); + } else { + cardLayout.show(cardPane, "js"); + } + } + }); + + Component[][] comp = new Component[][]{ + new Component[]{labelTypePane}, + new Component[]{cardPane} + }; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-labelAlignExpand"), pane); + } + + private JPanel createLabelTextStylePane() { + this.textAttrPane = new ChartTextAttrPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-LabelsTextStyle"), this.textAttrPane); + } + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleOtherPane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleOtherPane.java new file mode 100644 index 0000000..fc4883d --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleOtherPane.java @@ -0,0 +1,84 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +public class LzljMapStyleOtherPane extends ExtendedScrollPane { + + private LzljMapHyperLink hyperLink; + private LzljMapPointCondListPane pointCondListPane; + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(LzljMapChart chart) { + hyperLink.populateBean(chart); + pointCondListPane.populateStyle(chart); + } + + @Override + public void updateBean(LzljMapChart chart) { + hyperLink.updateBean(chart); + pointCondListPane.updateStyle(chart); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-otherstitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel linkPane = createLinkPane(); + JPanel pointCondPane = createPointStyleCondPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{linkPane}, + new Component[]{pointCondPane} + }; + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents,rowSize,columnSize); + + this.add(panel,BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createLinkPane() { + this.hyperLink = new LzljMapHyperLink(); + + Component[][] components = new Component[][]{ + new Component[]{hyperLink} + }; + double p = TableLayout.PREFERRED; + double[] columnSize = {TableLayout.FILL}; + double[] rowSize = {p, p}; + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-LinkExpand"), panel); + } + + private JPanel createPointStyleCondPane() { + this.pointCondListPane = new LzljMapPointCondListPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-pointStyleCondExpand"), this.pointCondListPane); + } + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapStylePane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStylePane.java new file mode 100644 index 0000000..0ecaf83 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStylePane.java @@ -0,0 +1,39 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.extended.chart.AbstractExtendedStylePane; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.plugin.lzljgdmap.LzljMapChart; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author fr.open + * @date 2022/8/19 + */ +public class LzljMapStylePane extends AbstractExtendedStylePane { + + private AttributeChangeListener attributeChangeListener; + + public LzljMapStylePane(){ + super(); + } + public LzljMapStylePane(AttributeChangeListener attributeChangeListener){ + super(attributeChangeListener); + } + + @Override + protected List> initPaneList() { + List> list = new ArrayList>(); + list.add(new LzljMapStyleTitlePane()); + list.add(new LzljMapStyleBaseMapPane()); + list.add(new LzljMapStylePointMapPane()); + list.add(new LzljMapStyleHeatMapPane()); + list.add(new LzljMapStyleToolsPane()); + list.add(new LzljMapStyleLabelsPane()); + list.add(new LzljMapStyleTipsPane()); + list.add(new LzljMapStyleOtherPane()); + return list; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapStylePointMapPane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStylePointMapPane.java new file mode 100644 index 0000000..a415a18 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStylePointMapPane.java @@ -0,0 +1,167 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.json.JSONObject; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +/** + * @author fr.open + */ +public class LzljMapStylePointMapPane extends ExtendedScrollPane { + + private UISpinner pointSize; + private ImageChooserPane pointPane; + + //private UICheckBox showCluster; + private UISpinner clusterMaxZoom; + private UISpinner clusterPointSize; + private ColorSelectBox clusterBorderColor; + private ColorSelectBox clusterFillColor; + private ColorSelectBox clusterTextColor; + private UINumberDragPane clusterBgOpacity; + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(LzljMapChart chart) { + JSONObject pointConf = chart.getPointConf(); + this.pointSize.setValue(pointConf.getDouble("pointSize")); + ImageEntity imgEnt = new ImageEntity(); + imgEnt.setImagestr(pointConf.getString("pointimg")); + imgEnt.setImagetype(pointConf.getString("pointimgtype")); + imgEnt.setWidth(pointConf.getInt("pointimgw")); + imgEnt.setHeight(pointConf.getInt("pointimgh")); + this.pointPane.populateBean(imgEnt); + + this.clusterMaxZoom.setValue(pointConf.getDouble("clusterMaxZoom")); + + this.clusterPointSize.setValue(pointConf.getDouble("clusterPointSize")); + this.clusterBorderColor.setSelectObject(MapUtil.toColor(pointConf.getString("clusterBorderColor"))); + this.clusterFillColor.setSelectObject(MapUtil.toColor(pointConf.getString("clusterFillColor"))); + this.clusterTextColor.setSelectObject(MapUtil.toColor(pointConf.getString("clusterTextColor"))); + this.clusterBgOpacity.populateBean(pointConf.getDouble("clusterBgOpacity")); + } + + @Override + public void updateBean(LzljMapChart chart) { + JSONObject pointConf = JSONObject.create(); + pointConf.put("pointSize", this.pointSize.getValue()); + ImageEntity imgEnt = this.pointPane.updateBean(); + if (null != imgEnt) { + pointConf.put("pointimg", imgEnt.getImagestr()); + pointConf.put("pointimgtype", imgEnt.getImagetype()); + pointConf.put("pointimgw", imgEnt.getWidth()); + pointConf.put("pointimgh", imgEnt.getHeight()); + } + + pointConf.put("clusterMaxZoom", this.clusterMaxZoom.getValue()); + pointConf.put("clusterPointSize", this.clusterPointSize.getValue()); + pointConf.put("clusterBorderColor", MapUtil.toHex(this.clusterBorderColor.getSelectObject())); + pointConf.put("clusterFillColor", MapUtil.toHex(this.clusterFillColor.getSelectObject())); + pointConf.put("clusterTextColor", MapUtil.toHex(this.clusterTextColor.getSelectObject())); + pointConf.put("clusterBgOpacity", this.clusterBgOpacity.updateBean()); + + chart.setPointConf(pointConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-pointtitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel pointContentPane = createPointContentPane(); + JPanel clusterPointPane = createClusterPointContentPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{pointContentPane}, + new Component[]{clusterPointPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createPointContentPane() { + + pointSize = new UISpinner(1, 200, 1, 32); + pointPane = new ImageChooserPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-pointSize")), this.pointSize} + }; + JPanel sizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p}, new double[]{p, f}); + + Component[][] comp1 = new Component[][]{ + new Component[]{sizePane}, + new Component[]{pointPane} + }; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-pointMapExpand"), pane); + + } + + private JPanel createClusterPointContentPane() { + + clusterMaxZoom = new UISpinner(1, 30, 1, 18); + clusterPointSize = new UISpinner(1, 200, 1, 64); + clusterBorderColor = new ColorSelectBox(100); + clusterFillColor = new ColorSelectBox(100); + clusterTextColor = new ColorSelectBox(100); + clusterBgOpacity = new UINumberDragPane(0, 100); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-clusterMaxZoom")), this.clusterMaxZoom}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-pointSize")), this.clusterPointSize}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-clusterBorderColor")), this.clusterBorderColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-clusterFillColor")), this.clusterFillColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-clusterTextColor")), this.clusterTextColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-clusterBgOpacity")), this.clusterBgOpacity} + }; + JPanel sizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p, p, p, p, p, p}, new double[]{p, f}); + + Component[][] comp1 = new Component[][]{ + new Component[]{sizePane} + }; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-clusterPointMapExpand"), pane); + + } + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleTipsPane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleTipsPane.java new file mode 100644 index 0000000..b98a130 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleTipsPane.java @@ -0,0 +1,163 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.chart.base.TextAttr; +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +/** + * @author fr.open + */ +public class LzljMapStyleTipsPane extends ExtendedScrollPane { + + private UICheckBox showPointTips; + + private ColorSelectBox tipBgColor; + private UINumberDragPane tipBgOpacity; + + private UICheckBox showLayerType; + private UICheckBox showDataType; + private UICheckBox showName; + private UICheckBox showLng; + private UICheckBox showLat; + private UICheckBox showDesc; + + private ChartTextAttrPane textAttrPane; + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(LzljMapChart chart) { + JSONObject tipsConf = chart.getTipsConf(); + this.showPointTips.setSelected(tipsConf.getBoolean("showPointTips")); + this.tipBgColor.setSelectObject(MapUtil.toColor(tipsConf.getString("tipBgColor"))); + this.tipBgOpacity.populateBean(tipsConf.getDouble("tipBgOpacity")); + + this.showLayerType.setSelected(tipsConf.getBoolean("showLayerType")); + this.showDataType.setSelected(tipsConf.getBoolean("showDataType")); + this.showName.setSelected(tipsConf.getBoolean("showName")); + this.showLng.setSelected(tipsConf.getBoolean("showLng")); + this.showLat.setSelected(tipsConf.getBoolean("showLat")); + this.showDesc.setSelected(tipsConf.getBoolean("showDesc")); + + FRFont tipFont = FRFont.getInstance(tipsConf.getString("tipfamily"), + tipsConf.getInt("tipstyle"), + tipsConf.getInt("tipsize"), + MapUtil.toColor(tipsConf.getString("tipcolor"))); + this.textAttrPane.populate(tipFont); + } + + @Override + public void updateBean(LzljMapChart chart) { + JSONObject tipsConf = JSONObject.create(); + tipsConf.put("showPointTips", this.showPointTips.isSelected()); + tipsConf.put("tipBgColor", MapUtil.toHex(this.tipBgColor.getSelectObject())); + tipsConf.put("tipBgOpacity", this.tipBgOpacity.updateBean()); + tipsConf.put("showLayerType", this.showLayerType.isSelected()); + tipsConf.put("showDataType", this.showDataType.isSelected()); + tipsConf.put("showName", this.showName.isSelected()); + tipsConf.put("showLng", this.showLng.isSelected()); + tipsConf.put("showLat", this.showLat.isSelected()); + tipsConf.put("showDesc", this.showDesc.isSelected()); + + TextAttr labelAttr = this.textAttrPane.update(); + tipsConf.put("tipsize", labelAttr.getFRFont().getSize()); + tipsConf.put("tipstyle", labelAttr.getFRFont().getStyle()); + tipsConf.put("tipfamily", labelAttr.getFRFont().getFamily()); + tipsConf.put("tipcolor", MapUtil.toHex(labelAttr.getFRFont().getForeground())); + + chart.setTipsConf(tipsConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-tipstitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel contentPane = createTipsContentPane(); + JPanel textStylePane = createTipsTextStylePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p, p}; + Component[][] comps = new Component[][]{ + new Component[]{showPointTips}, + new Component[]{contentPane}, + new Component[]{textStylePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(comps, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createTipsContentPane() { + + showPointTips = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showPointTips")); + tipBgColor = new ColorSelectBox(100); + tipBgOpacity = new UINumberDragPane(0, 100); + + showLayerType = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showLayerType")); + showDataType = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showDataType")); + showName = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showName")); + showLng = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showLng")); + showLat = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showLat")); + showDesc = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-showDesc")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] compLabel = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-tipBgColor")), this.tipBgColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-tipBgOpacity")), this.tipBgOpacity} + }; + JPanel bgPane = TableLayout4VanChartHelper.createGapTableLayoutPane(compLabel, new double[]{p, p, p}, new double[]{p, f}); + + Component[][] compCheck = new Component[][]{ + new Component[]{showLayerType, showDataType}, + new Component[]{showName, showLng}, + new Component[]{showLat, showDesc} + }; + JPanel checkPane = TableLayout4VanChartHelper.createGapTableLayoutPane(compCheck, new double[]{p, p, p, p}, new double[]{p, f}); + + Component[][] comp = new Component[][]{ + new Component[]{bgPane}, + new Component[]{checkPane} + }; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-tipsAlignExpand"), pane); + } + + private JPanel createTipsTextStylePane() { + this.textAttrPane = new ChartTextAttrPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-tipsTextStyle"), this.textAttrPane); + } + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleTitlePane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleTitlePane.java new file mode 100644 index 0000000..ec5776a --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleTitlePane.java @@ -0,0 +1,142 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.base.BaseUtils; +import com.fr.chart.base.TextAttr; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +public class LzljMapStyleTitlePane extends ExtendedScrollPane { + + private UICheckBox isTitleVisable; + private ColorSelectBox titleBgColor; + private UINumberDragPane titleBgOpacity; + private TinyFormulaPane titleName; + private UIButtonGroup titleAlignment; + private ChartTextAttrPane textAttrPane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(LzljMapChart chart) { + JSONObject titleConf = chart.getTitleConf(); + this.isTitleVisable.setSelected(titleConf.getBoolean("titlevisiable")); + this.titleBgColor.setSelectObject(MapUtil.toColor(titleConf.getString("titlebgcolor"))); + this.titleBgOpacity.populateBean(titleConf.getDouble("titleBgOpacity")); + this.titleName.populateBean(titleConf.getString("titlename")); + this.titleAlignment.setSelectedItem(titleConf.getInt("titleposition")); + + FRFont titleFont = FRFont.getInstance(titleConf.getString("titlefamily"), + titleConf.getInt("titlestyle"), + titleConf.getInt("titlesize"), + MapUtil.toColor(titleConf.getString("titlecolor"))); + this.textAttrPane.populate(titleFont); + + } + + @Override + public void updateBean(LzljMapChart chart) { + JSONObject titleConf = JSONObject.create(); + titleConf.put("titlevisiable", this.isTitleVisable.isSelected()); + titleConf.put("titlebgcolor", MapUtil.toHex(this.titleBgColor.getSelectObject())); + titleConf.put("titleBgOpacity", this.titleBgOpacity.updateBean()); + titleConf.put("titlename", this.titleName.updateBean()); + titleConf.put("titleposition", titleAlignment.getSelectedItem()); + + TextAttr titleAttr = this.textAttrPane.update(); + titleConf.put("titlesize", titleAttr.getFRFont().getSize()); + titleConf.put("titlestyle", titleAttr.getFRFont().getStyle()); + titleConf.put("titlefamily", titleAttr.getFRFont().getFamily()); + titleConf.put("titlecolor", MapUtil.toHex(titleAttr.getFRFont().getForeground())); + + + chart.setTitleConf(titleConf); + } + + @Override + protected String title4PopupWindow() { + return PaneTitleConstants.CHART_STYLE_TITLE_TITLE; + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + // 内容 + JPanel titleContentPane = createTitleContentPane(); + // 样式 + JPanel stylePane = createTitleStylePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{isTitleVisable}, + new Component[]{titleContentPane}, + new Component[]{stylePane} + } ; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents,rowSize,columnSize); + + this.add(panel,BorderLayout.CENTER); + + this.setVisible(true); + + } + + } + + private JPanel createTitleContentPane(){ + // 内容 + this.isTitleVisable = new UICheckBox(Toolkit.i18nText("Plugin-LzljMap-isVisiableTitle")); + this.titleBgColor = new ColorSelectBox(100); + this.titleBgOpacity = new UINumberDragPane(0, 100); + this.titleName = new TinyFormulaPane(); + + // 位置 + Icon[] titlePositonIcons = new Icon[]{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")}; + Integer[] titlePositionVal = new Integer[]{2, 0, 4}; + this.titleAlignment = new UIButtonGroup(titlePositonIcons, titlePositionVal); + + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-titleBgColor")), this.titleBgColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-titleBgOpacity")), this.titleBgOpacity}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-TitleText")), this.titleName}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-TitlePosition"), 2), this.titleAlignment} + } ; + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-TitleExpand"), components); + } + + private JPanel createTitleStylePane() { + this.textAttrPane = new ChartTextAttrPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-TitleStyle"), this.textAttrPane); + } + + +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleToolsPane.java b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleToolsPane.java new file mode 100644 index 0000000..a4ced4c --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/LzljMapStyleToolsPane.java @@ -0,0 +1,239 @@ +package com.fr.plugin.lzljgdmap.ui; + +import com.fr.base.BaseUtils; +import com.fr.chart.base.TextAttr; +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.plugin.lzljgdmap.LzljMapChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +/** + * @author fr.open + */ +public class LzljMapStyleToolsPane extends ExtendedScrollPane { + + private ColorSelectBox toolBgColor; + private ColorSelectBox toolBtnColor; + private UINumberDragPane toolBgOpacity; + private ChartTextAttrPane textAttrPane; + + private ColorSelectBox detailBgColor; + private ColorSelectBox detailTitleBgColor; + private UINumberDragPane detailBgOpacity; + private UICheckBox showRegion; + private UICheckBox showArea; + private UICheckBox showCounty; + private UICheckBox showName; + private UICheckBox showLayerType; + private UICheckBox showDataType; + private UICheckBox showLng; + private UICheckBox showLat; + private UICheckBox showVal; + private UICheckBox showDesc; + private ChartTextAttrPane detailTextAttrPane; + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(LzljMapChart chart) { + JSONObject toolConf = chart.getToolConf(); + this.toolBgColor.setSelectObject(MapUtil.toColor(toolConf.getString("toolBgColor"))); + this.toolBtnColor.setSelectObject(MapUtil.toColor(toolConf.getString("toolBtnColor"))); + this.toolBgOpacity.populateBean(toolConf.getDouble("toolBgOpacity")); + FRFont toolFont = FRFont.getInstance(toolConf.getString("toolfamily"), + toolConf.getInt("toolstyle"), + toolConf.getInt("toolsize"), + MapUtil.toColor(toolConf.getString("toolcolor"))); + this.textAttrPane.populate(toolFont); + + this.detailBgColor.setSelectObject(MapUtil.toColor(toolConf.getString("detailBgColor"))); + this.detailTitleBgColor.setSelectObject(MapUtil.toColor(toolConf.getString("detailTitleBgColor"))); + this.detailBgOpacity.populateBean(toolConf.getDouble("detailBgOpacity")); + this.showRegion.setSelected(toolConf.getBoolean("showRegion")); + this.showArea.setSelected(toolConf.getBoolean("showArea")); + this.showCounty.setSelected(toolConf.getBoolean("showCounty")); + this.showName.setSelected(toolConf.getBoolean("showName")); + this.showLayerType.setSelected(toolConf.getBoolean("showLayerType")); + this.showDataType.setSelected(toolConf.getBoolean("showDataType")); + this.showLng.setSelected(toolConf.getBoolean("showLng")); + this.showLat.setSelected(toolConf.getBoolean("showLat")); + this.showVal.setSelected(toolConf.getBoolean("showVal")); + this.showDesc.setSelected(toolConf.getBoolean("showDesc")); + FRFont detailFont = FRFont.getInstance(toolConf.getString("detailfamily"), + toolConf.getInt("detailstyle"), + toolConf.getInt("detailsize"), + MapUtil.toColor(toolConf.getString("detailcolor"))); + this.detailTextAttrPane.populate(detailFont); + } + + @Override + public void updateBean(LzljMapChart chart) { + JSONObject toolConf = JSONObject.create(); + toolConf.put("toolBgColor", MapUtil.toHex(this.toolBgColor.getSelectObject())); + toolConf.put("toolBtnColor", MapUtil.toHex(this.toolBtnColor.getSelectObject())); + toolConf.put("toolBgOpacity", this.toolBgOpacity.updateBean()); + + TextAttr toolAttr = this.textAttrPane.update(); + toolConf.put("toolsize", toolAttr.getFRFont().getSize()); + toolConf.put("toolstyle", toolAttr.getFRFont().getStyle()); + toolConf.put("toolfamily", toolAttr.getFRFont().getFamily()); + toolConf.put("toolcolor", MapUtil.toHex(toolAttr.getFRFont().getForeground())); + + toolConf.put("detailBgColor", MapUtil.toHex(this.detailBgColor.getSelectObject())); + toolConf.put("detailTitleBgColor", MapUtil.toHex(this.detailTitleBgColor.getSelectObject())); + toolConf.put("detailBgOpacity", this.detailBgOpacity.updateBean()); + toolConf.put("showRegion", this.showRegion.isSelected()); + toolConf.put("showArea", this.showArea.isSelected()); + toolConf.put("showCounty", this.showCounty.isSelected()); + toolConf.put("showName", this.showName.isSelected()); + toolConf.put("showLayerType", this.showLayerType.isSelected()); + toolConf.put("showDataType", this.showDataType.isSelected()); + toolConf.put("showLng", this.showLng.isSelected()); + toolConf.put("showLat", this.showLat.isSelected()); + toolConf.put("showVal", this.showVal.isSelected()); + toolConf.put("showDesc", this.showDesc.isSelected()); + + TextAttr detailAttr = this.detailTextAttrPane.update(); + toolConf.put("detailsize", detailAttr.getFRFont().getSize()); + toolConf.put("detailstyle", detailAttr.getFRFont().getStyle()); + toolConf.put("detailfamily", detailAttr.getFRFont().getFamily()); + toolConf.put("detailcolor", MapUtil.toHex(detailAttr.getFRFont().getForeground())); + + chart.setToolConf(toolConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-LzljMap-toolstitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel toolContentPane = createToolContentPane(); + JPanel detailContentPane = createDetailContentPane(); + JPanel columnsPane = createColumnsContentPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{toolContentPane}, + new Component[]{detailContentPane}, + new Component[]{columnsPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createToolContentPane() { + this.toolBgColor = new ColorSelectBox(100); + this.toolBgOpacity = new UINumberDragPaneWithPercent(0, 100); + this.toolBtnColor = new ColorSelectBox(100); + + this.textAttrPane = new ChartTextAttrPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p, p, p, p}; + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-toolBgColor")), this.toolBgColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-toolBgOpacity")), this.toolBgOpacity}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-toolBtnColor")), this.toolBtnColor} + }; + JPanel bgPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + + Component[][] comps = new Component[][]{ + new Component[]{bgPane}, + new Component[]{this.textAttrPane} + }; + + JPanel pane = TableLayoutHelper.createTableLayoutPane(comps, new double[]{p, p}, new double[]{p, f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-toolAlignExpand"), pane); + } + + private JPanel createDetailContentPane() { + + this.detailBgColor = new ColorSelectBox(100); + this.detailBgOpacity = new UINumberDragPaneWithPercent(0, 100); + this.detailTitleBgColor = new ColorSelectBox(100); + + this.detailTextAttrPane = new ChartTextAttrPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p, p, p, p}; + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-toolBgColor")), this.detailBgColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-toolBgOpacity")), this.detailBgOpacity}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-LzljMap-detailTitleBgColor")), this.detailTitleBgColor} + }; + JPanel bgPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + + Component[][] comps = new Component[][]{ + new Component[]{bgPane}, + new Component[]{this.detailTextAttrPane} + }; + JPanel pane = TableLayoutHelper.createTableLayoutPane(comps, new double[]{p, p}, new double[]{p, f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-detailAlignExpand"), pane); + } + + private JPanel createColumnsContentPane() { + showRegion = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_region")); + showArea = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_area")); + showCounty = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_county")); + showName = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_name")); + showLayerType = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_layertype")); + showDataType = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_datatype")); + showLng = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_lng")); + showLat = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_lat")); + showVal = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_val")); + showDesc = new UICheckBox(Toolkit.i18nText("Plugin_LzljMap_desc")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] compCheck = new Component[][]{ + new Component[]{showRegion, showArea}, + new Component[]{showLayerType, showDataType}, + new Component[]{showName, showVal}, + new Component[]{showLng, showLat}, + new Component[]{showDesc, showCounty} + }; + JPanel checkPane = TableLayoutHelper.createTableLayoutPane(compCheck, new double[]{p, p, p, p, p, p}, new double[]{f, f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-LzljMap-detailColumnsExpand"), checkPane); + + } +} diff --git a/src/com/fr/plugin/lzljgdmap/ui/MapUtil.java b/src/com/fr/plugin/lzljgdmap/ui/MapUtil.java new file mode 100644 index 0000000..a3ee5ef --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/ui/MapUtil.java @@ -0,0 +1,94 @@ +package com.fr.plugin.lzljgdmap.ui; + +import java.awt.*; +import java.util.Map; + +/** + * @author fr.open + */ +public class MapUtil { + public static String getString(Map map, String key) { + return getString(map, key, null); + } + + public static String getString(Map map, String key, String def) { + if (null == map) { + return def; + } + if (null != map.get(key)) { + return map.get(key).toString(); + } else { + return def; + } + } + + public static Integer getInteger(Map map, String key) { + return getInteger(map, key, null); + } + + public static Integer getInteger(Map map, String key, Integer def) { + if (null == map) { + return def; + } + if (null != map.get(key)) { + return Integer.parseInt(map.get(key).toString()); + } else { + return def; + } + } + + public static Double getDouble(Map map, String key) { + return getDouble(map, key, null); + } + + public static Double getDouble(Map map, String key, Double def) { + if (null == map) { + return def; + } + if (null != map.get(key)) { + return Double.parseDouble(map.get(key).toString()); + } else { + return def; + } + } + + public static Boolean getBoolean(Map map, String key) { + return getBoolean(map, key, null); + } + + public static Boolean getBoolean(Map map, String key, Boolean def) { + if (null == map) { + return def; + } + String s = getString(map, key); + if (null != s) { + if ("true".equals(s)) { + return true; + } else if ("false".equals(s)){ + return false; + } else { + return def; + } + } else { + return def; + } + } + + public static String toHex(Color c) { + if (null == c) { + return "transparent"; + } + String hex = Integer.toHexString(c.getRGB()); + if (hex.length() == 8) { + hex = "#" + hex.substring(2); + } + return hex; + } + public static Color toColor(String c) { + if (null != c && c.startsWith("#")) { + c = c.substring(1); + return new Color(Integer.parseInt(c, 16)); + } + return null; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/vo/ClusterPointMapStyleJson.java b/src/com/fr/plugin/lzljgdmap/vo/ClusterPointMapStyleJson.java new file mode 100644 index 0000000..fa9572f --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/vo/ClusterPointMapStyleJson.java @@ -0,0 +1,14 @@ +package com.fr.plugin.lzljgdmap.vo; + +/** + * @author :fr.open + * @date :2022/8/25 18:35 + * @description: + */ +public class ClusterPointMapStyleJson extends CustomJsonObject { + private String tilte = CLUSTER_POINT_MAP_TITLE; + + public String getTilte() { + return tilte; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/vo/CustomJsonObject.java b/src/com/fr/plugin/lzljgdmap/vo/CustomJsonObject.java new file mode 100644 index 0000000..f1df550 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/vo/CustomJsonObject.java @@ -0,0 +1,23 @@ +package com.fr.plugin.lzljgdmap.vo; + +import com.fr.json.JSONObject; + +/** + * @author :fr.open + * @date :2022/8/25 18:33 + * @description: + */ +public class CustomJsonObject { + private JSONObject obj = JSONObject.create(); + + public JSONObject get() { + return obj; + } + + public void put(JSONObject obj) { + this.obj = obj; + } + + public static final String POINT_MAP_TITLE = "pointmap"; + public static final String CLUSTER_POINT_MAP_TITLE = "clusterpointmap"; +} diff --git a/src/com/fr/plugin/lzljgdmap/vo/PointMapStyleJson.java b/src/com/fr/plugin/lzljgdmap/vo/PointMapStyleJson.java new file mode 100644 index 0000000..9a9fd4f --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/vo/PointMapStyleJson.java @@ -0,0 +1,14 @@ +package com.fr.plugin.lzljgdmap.vo; + +/** + * @author :fr.open + * @date :2022/8/25 18:35 + * @description: + */ +public class PointMapStyleJson extends CustomJsonObject { + private String tilte = POINT_MAP_TITLE; + + public String getTilte() { + return tilte; + } +} diff --git a/src/com/fr/plugin/lzljgdmap/web/LzljMapChart.css b/src/com/fr/plugin/lzljgdmap/web/LzljMapChart.css new file mode 100644 index 0000000..c3fc3c8 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/web/LzljMapChart.css @@ -0,0 +1,307 @@ +.lzlj_gd_amap_chart_title { + position: absolute; + top: 0px; + left: 0px; + width: 100%; + background: rgba(255, 255, 255, 0.7); + color: #000000; + font-size: 12px; + font-family: sans-serif; + font-weight: bold; + font-style: normal; + text-align: center; + padding: 5px 10px; +} + +.lzlj_amap_container { + position: absolute; + background: rgba(51, 51, 51, 0.7); +} + +.lzlj_amap_container_hide { + position: absolute; + background: rgba(51, 51, 51, 0.9); + padding: 3px 10px; + color: #ffffff; + font-size: 12px; + font-family: sans-serif; + border-radius: 0px 10px 10px 0px; + cursor: pointer; +} + +.lzlj_pos_left { + top: 50px; + left: 0px; + border-radius: 0px 10px 10px 0px; +} + +.lzlj_amap_container .tools { + font-weight: bold; + padding: 5px 10px; +} + +.lzlj_amap_container .row { + display: flex; + justify-content: space-between; + padding: 5px 10px; +} + +.lzlj_amap_container .row .tool_circle { + padding: 2px 10px; + border-radius: 20px; + cursor: pointer; + width: 100%; + text-align: center; +} + +.lzlj_amap_container .row .tool_circle_clear { + padding: 2px 10px; + cursor: pointer; +} + +.lzlj_amap_container .row .tool_region { + padding: 2px 10px; + border-radius: 20px; + cursor: pointer; + width: 100%; + text-align: center; +} + +.lzlj_amap_container .row .tool_region_clear { + padding: 2px 10px; + cursor: pointer; +} + +.lzlj_amap_container .active { + background-color: #FF7F50; + border: #FF7F50 solid 1px; +} + +.lzlj_amap_container .inactive { + border: #FF7F50 solid 1px; + background: transparent; +} + +.lzlj_amap_container .filter_row { + padding: 10px; +} + +.lzlj_amap_container .add_layer { + padding: 2px 10px; + border-radius: 20px; + cursor: pointer; + text-align: center; +} + +.lzlj_amap_container .layer_active { + margin-top: 5px; + background-color: #FF7F50; + padding: 2px 10px; + border-radius: 20px; +} + +.lzlj_amap_container .layer_inactive { + margin-top: 5px; + padding: 2px 10px; + border: #FF7F50 solid 1px; + border-radius: 20px; +} + +.lzlj_amap_container .chart_type { + margin-top: 5px; +} + +.lzlj_amap_container .data_type { + margin-top: 10px; +} + +.lzlj_amap_container .close { + width: 16px; + height: 16px; + position: absolute; + right: 4px; + top: 4px; + cursor: pointer; +} + +.lzlj_amap_container .legend_c { + display: flex; + flex-direction: column; + font-weight: bold; + padding: 5px 10px; +} +.lzlj_amap_container .legend_e { + display: flex; + align-items: center; +} + +.lzlj_gd_amap_region { + position: absolute; + width: 300px; + top: 50px; + left: 100px; + background: rgba(255, 255, 255, 1); + z-index: 100; +} + +.lzlj_gd_amap_region .ok { + position: absolute; + right: 10px; + top: 5px; + cursor: pointer; + padding: 2px 5px; + border-radius: 4px; +} + +.lzlj_gd_amap_region .treebar { + height: 500px; + overflow: auto; + margin-top: 25px; + padding: 5px; + font-family: sans-serif; + font-size: 12px; +} + +.lzlj_gd_amap_region .nodeBar { + clear: both; + height: 20px; + background: #ffffff; +} + +.lzlj_gd_amap_region .nodeSplitor { + clear: both; + display: block; + width: 100%; + height: 1px; + margin-top: 1px; + margin-bottom: 3px; + border-bottom-style: solid; + border-bottom-width: 1px; + border-bottom-color: #cccccc; +} + +.lzlj_gd_amap_region .nodeBarSelected { + clear: both; + height: 20px; + background: #d9d9d9; +} + +.lzlj_gd_amap_region .nodeBarOver { + clear: both; + height: 20px; +} + +.lzlj_gd_amap_region .nodeFlag { + float: left; + width: 12px; + height: 100%; +} + +.lzlj_gd_amap_region .nodePlus { + float: left; + width: 16px; + height: 16px; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAZFJREFUWEfll7FKA0EQhv+V3Kyk0UILRXwBQUFBbCwEtbfQRrDQFxBBLNUnsLQylZVpbLUQtRQbC30CUbS0iPhvYOTkIndnDDFs2GAWDm6XZf5v/50b5gwCDxNYHx0JMCAi26o67dMdY8wNyZ18zB8OiMgtgCmf4ulYJDOamYmILAM4UdUN51zJJ0QURevGmCNVPXDObdVi5wH2AOzmKX2BiIiq6qVzbu7fAFgA8fPWjEveHRCRMwB9JGdCAbwD6G02Z9rhgMYnDwZgrb1S1X6SE0GuoHsAROQOwHjK5sfkfRBAD4CXZD6S2vNAchLAR22t5SS01h6q6iKAGOR7GGNmVTUCcJHLgVj4muRaer1lgN8SrHtyoGMdiO80dCF6TQqRBClEIlJS1VHn3HwQgGZE2/oZegew1m7GPVuhUBiuVCrPfxVotL9YLA5Vq9UnAKckl+q2ZNbaBVU9B7BPMu4PvQ0R+eo387HrteXHAFa9KWcDlUmuZMp5PaGkPR/zDHFPspyP2ZG/Zp4P3jhccAc+AV1FhTChwafSAAAAAElFTkSuQmCC') 0px 0px no-repeat; + background-size: 100% 100%; + cursor: pointer; +} + +.lzlj_gd_amap_region .nodeSub { + float: left; + width: 16px; + height: 16px; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAUVJREFUWEftV7FKBDEUnMjuC2ytheIfCBYe2FlYaG+hjWChPyDCYan3BZZWWll5jbWFiKXYWOgXiOIPLDhZeLKyJ7txETwCe2BelYQwM5limBh0PKZjfkykgGkR6avqckh3jDH3JA99zB8OiMgDgF5I8joWyQZnYyMimwAuVXXPOXceUkSaprvGmDNVPXHOHYywfQHHAI58laGEiIiq6q1zbjUKiA5EB6IDf3JARB4BLNYC6aVazwCYAvBe7edrd55JLgH4GJ2NHUTW2lNVXQdQCvkeY8yKqqYAbry0LInvSO7Uz8cWEKM4OhAd+D8OWGv3y86WJMlcnudvoV5e4mRZNlsUxSuAK5IbrVFsrV1T1WsAA5JlPww2IvLVN33stlp+AWA7GHMTaEhyqxHnbURVPV8ILOKJ5NDHnMivWeCH/w7XuQOf+9M8MKmeDQ8AAAAASUVORK5CYII=') 0px 0px no-repeat; + background-size: 100% 100%; + cursor: pointer; +} + +.lzlj_gd_amap_region .nodeLevel { + float: left; + height: 100%; + width: 6px; +} + +.lzlj_gd_amap_region .nodeImg { + float: left; + width: 18px; + padding-left: 3px; + padding-top: 3px; +} + +.lzlj_gd_amap_region .nodeCheck { + float: left; + width: 16px; + height: 16px; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAKZJREFUWEftl8EJQjEQROeHsFUoWIrWYiFqKVby7UQPVjGEKAsqGi//kM/+w+w1YWZ47GF2QPAMwf5YXgAzOwLYA1h1pnMDcCbp+p/5IfAyP3Q2buVO3yHaAFcAm1rrrpRy6Rkk57xNKY0A7iTXb+02wMMfSM6yG2b2p68AIiACIiACIiACIiACiyMQXkq9s8fVcm/EoYdJzztgqtYs/X+quf8LD/AE20fQIQrJsZAAAAAASUVORK5CYII=') 0px 0px no-repeat; + background-size: 100% 100%; +} + +.lzlj_gd_amap_region .nodeChecked { + float: left; + width: 16px; + height: 16px; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAXNJREFUWEftlyFPw0AYhp9b1q+rQqGABBQJGAQhIUEwRQjBIHAofgjwUxAYxEj4A0NhCBIcAYFDova165FLumV0Y4y2W4Hs5LX3vU/fu699ayh5mJL1+X0AInIKHAPzBbvzApyrqqvfHZ8cSMRPChZOlzvrhUgDPAOLcRzXoyi6KRKkWq1uVyqVJvCqqgud2mkA6y6o6ljOhoj01Z8CTB34fw74vr9srb2w1r6HYVjvbeWxd0GtVluK47gBrAH3qro+MYAgCOba7bYT3wAegENVfZwUwKzv+w1r7dZX4g4k8xZ4ntc0xvjGmKNWq/WUekXPeJ53ZYxx+z3wyTv3ZwYQkVtgE7hT1T3gLSkaiMgVsPOdeC4HRGQFuARWrbXNMAx3gSgR3x9FPBdAsrgLAVw7AOBgVPHcAAMg3NTQPU9/zjOfgVQrdZxw032tNixDFAKQJ6RMAf6EA6WHUpfZy4vlSa+X92OSp8Wyrh1L/v8JTOkAH9paLjBtTnOxAAAAAElFTkSuQmCC') 0px 0px no-repeat; + background-size: 100% 100%; +} + +.lzlj_gd_amap_region .nodeChecked_part { + float: left; + width: 16px; + height: 16px; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAL5JREFUWEftl8ENwjAMRX+jyFOAxCiwSSQGATYJk8AmcGAKKwrICKoSOFRRinuwr22/X157+O2gPJ3yfswPgIj2ALYAFo3tXAEcmVny+/kw8Fq+a7y4jDsMIUqAC4BVznmTUjq3BPHer51zJwA3Zl6+s0uAu1xg5km+DSL6yp8/QIzxSV07IYT+kFUGDMAMmAEzYAbMgBlQN1DbA349V9UH/g2gXkqls+vVctGt+mPS8n2PzZqk/49dLvepAzwA9bAQMMgDzMEAAAAASUVORK5CYII=') 0px 0px no-repeat; + background-size: 100% 100%; +} + +.lzlj_gd_amap_region .nodeTxt { + float: left; + height: 22px; + color: #000000; + padding-top: 2px; +} + +.lzlj_gd_amap_data_list { + position: absolute; + right: 0px; + top: 0px; + height: 100%; + background-color: #ffffff; +} + +.lzlj_gd_amap_data_list .list_title { + display: flex; + padding: 10px 10px; + padding-right: 17px; + background-color: #d9d9d9; +} + +.lzlj_gd_amap_data_list .list_content_ul { + padding: 0px 10px; + margin: 0px; + overflow-y: scroll; + scrollbar-width: thin; +} + +.lzlj_gd_amap_data_list .list_content_li { + display: flex; + padding: 10px 0px; + border-bottom: 1px solid #d9d9d9; + word-break: break-word; +} + +.lzlj_gd_amap_data_list .close_list { + margin-left: 20px; + color: #0583f2; + cursor: pointer; +} + +::-webkit-scrollbar { + width: 7px; + height: 7px; + background-color: #f5f5f5; +} +::-webkit-scrollbar-thumb { + border-radius: 10px; + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); + background-color: #c8c8c8; +} \ No newline at end of file diff --git a/src/com/fr/plugin/lzljgdmap/web/LzljMapChartWrapper.js b/src/com/fr/plugin/lzljgdmap/web/LzljMapChartWrapper.js new file mode 100644 index 0000000..801b3b4 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/web/LzljMapChartWrapper.js @@ -0,0 +1,1754 @@ +LzljMapChartWrapper = ExtendedChart.extend({ + + _init: function (dom, option) { + debugger; + + var self = this; + //self.chartBaseOption = option; + window.lzljgdmapChartObj = self; + + + this._dom = dom; + this.width = option.width || $(dom).width();// 补充从dom获取. + this.height = option.height || $(dom).height(); + + this.chartData = option.data; + option.data = []; + + this.titleConf = option.titleConf; + this.mapConf = option.mapConf; + this.pointConf = option.pointConf; + this.heatConf = option.heatConf; + this.toolConf = option.toolConf; + this.labelConf = option.labelConf; + this.tipsConf = option.tipsConf; + + this.pointStyleCond = option.pointStyleCond; + + this.pointLink = option.pointLink; + this.linkParam = option.linkParam; + + this.reqParams = {}; + this.chartTypeConf = {}; + this.drawCircle = null; + this.addedOverlays = []; + this.isCircleMode = false; + this.isManulOperMap = false; + + window._AMapSecurityConfig = { + securityJsCode:'6c10d1752e8f1cb4f908d87bcd84a1bc', + }; + + this.initTips(); + this.initRegion(); + this.initMaps(); + this.initChartTitle(); + + return {}; + }, + reloadChart: function() { + var newurl = window.location.href; + if (newurl.indexOf(".frm") > 0) { + newurl = newurl.substr(0, newurl.indexOf('.frm') + 4); + } else if (newurl.indexOf(".cpt") > 0) { + newurl = newurl.substr(0, newurl.indexOf('.cpt') + 4); + } + newurl += '®ions=' + this.reqParams.regions; + newurl += '&areas=' + this.reqParams.areas; + newurl += '&countys=' + this.reqParams.countys; + + newurl += '&layertype=' + this.reqParams.layertype; + newurl += '&datatype=' + this.reqParams.datatype; + window.location.href = newurl; + return; + }, + reloadMapData: function () { + //var ID = FR.cjkEncode(id); + var self = this; + + self.clearMapLayer(); + + // 检测js堆栈内存 + if (window.performance && window.performance.memory + && (window.performance.memory.usedJSHeapSize / window.performance.memory.jsHeapSizeLimit > 0.9)) { + window.location.reload(true); + return; + } + + // 正在加载数据,限制重复加载数据 + self.notLoadData = true; + + var width = self.width; + var height = self.height; + var sheetIndex = self.sheetIndex; + var ecName = self.ecName; + var reqObj = $.extend({ + cmd: 'chart_auto_refresh', + sessionID: FR.SessionMgr.getSessionID(), + chartID: self.chartID, + chartWidth: width, + chartHeight: height, + sheetIndex: sheetIndex, + ecName: ecName, + __time: new Date().getTime() + }, self.reqParams); + + var mapBounds = self.baseMap.getBounds(); + + var min = mapBounds.southWest; + var max = mapBounds.northEast; + reqObj.minx = self.reqParams.minx || min.lng; + reqObj.miny = self.reqParams.miny || min.lat; + reqObj.maxx = self.reqParams.maxx || max.lng; + reqObj.maxy = self.reqParams.maxy || max.lat; + + console.log('load remote data'); + + if (FR.servletURL) { + FR.showLoadingDialog(); + FR.ajax({ + type: 'GET', + url: FR.servletURL + '?op=chartauto', + data: reqObj, + dataType: 'json', + success: function (chartRelateJS) { + + var newData = chartRelateJS.relateChartList[0].chartAttr.data; + //var newdataStr = JSON.stringify(newData); + self.chartData = newData; + chartRelateJS.relateChartList[0].chartAttr.data = []; + if (!newData || newData.length <= 0) { + FR.hideLoadingDialog(); + } + + //self.wrapData(); + //self.loadMapLayers(); + self.renderMapData(); + + } + }); + } + }, + + initTips: function () { + var self = this; + if (self.tipsConf.showPointTips) { + $('
').css({ + 'position': 'absolute', + 'left': '0px', + 'top': '0px', + 'width': (self.tipsConf.tipbgwidth || 150) + 'px', + 'padding': '10px', + 'background-color': self.hexToRgba(self.tipsConf.tipBgColor, self.tipsConf.tipBgOpacity).rgba, + 'border-radius': '5px', + 'color': self.tipsConf.tipcolor, + 'font-size': self.tipsConf.tipsize, + 'font-family': self.tipsConf.tipfamily, + 'font-style': self.getFontStyle(self.tipsConf.tipstyle), + 'font-weight': self.getFontWeight(self.tipsConf.tipstyle) + }).addClass('LzljAMap_custom_tips').appendTo($(this._dom).parent()); + + $(this._dom).parent().find('div.LzljAMap_custom_tips').hide(); + } + }, + initLegend: function() { + var self = this; + if ($(this._dom).parent().find('div.lzlj_amap_legend_container') + && $(this._dom).parent().find('div.lzlj_amap_legend_container').length > 0) { + return; + } + + $('
').appendTo($(this._dom).parent()); + + var vHtml = ''; + for (var i = 0; i < self.pointStyleCond.length; i++) { + if (self.pointStyleCond[i].title == "pointmap") { + + } + } + }, + initTools: function () { + var self = this; + if ($(this._dom).parent().find('div.lzlj_amap_container') + && $(this._dom).parent().find('div.lzlj_amap_container').length > 0) { + return; + } + + $('
').appendTo($(this._dom).parent()); + + $(this._dom).parent().find('div.lzlj_amap_container').css({ + 'background-color': self.hexToRgba(self.toolConf.toolBgColor, self.toolConf.toolBgOpacity).rgba, + 'color': self.toolConf.toolcolor, + 'font-size': self.toolConf.toolsize, + 'font-family': self.toolConf.toolfamily, + 'font-style': self.getFontStyle(self.toolConf.toolstyle), + 'font-weight': self.getFontWeight(self.toolConf.toolstyle) + }); + + var vHtml = '
区域筛选
' + + '
圈选
' + + '
区域
' + + '
数据筛选
'; + for (var i = 0; i < self.toolsData.length; i++) { + vHtml += '
' + + '
' + self.toolsData[i].name + '
' + + '
点图热力图
' + + '
'; + for (var k = 0; k < self.toolsData[i].data.length; k++) { + + var styleItem = {layertype: self.toolsData[i].name, datatype: self.toolsData[i].data[k]}; + + + var markerCondStyle = self.findLegendCond(styleItem, "pointmap"); + var legendIcon = "data:image/png;base64," + (markerCondStyle.pointimg || self.pointConf.pointimg); + vHtml += '
'; + + vHtml += '' + self.toolsData[i].data[k] + ''; + //if (k < self.toolsData[i].data.length - 1) { + vHtml += '
'; + //} + } + vHtml += '
'; + } + //vHtml += '
图例
'; + //vHtml += '
其他
'; + + $(this._dom).parent().find('div.lzlj_amap_container').html(vHtml); + + var toolHeight = $(this._dom).parent().find('div.lzlj_amap_container').height(); + if (toolHeight > this.height - 100) { + $(this._dom).parent().find('div.lzlj_amap_container').css({ + "top": '20px', + "height": (self.height - 40) + 'px', + "overflow-y": 'auto' + }); + } + + self.activeSelectedBtn(); + + // 显示工具 + $('
工具
').appendTo($(this._dom).parent()); + $(this._dom).parent().find('div.lzlj_amap_container_hide').hide(); + + + // 事件 + // 关闭工具 + $(self._dom).parent().find('div.lzlj_amap_container img').on('click', function (e) { + $(self._dom).parent().find('div.lzlj_amap_container').hide('fast', function () { + $(self._dom).parent().find('div.lzlj_amap_container_hide').show(); + }); + }); + // 打开工具 + $(self._dom).parent().find('div.lzlj_amap_container_hide').on('click', function (e) { + $(self._dom).parent().find('div.lzlj_amap_container').show('fast'); + $(self._dom).parent().find('div.lzlj_amap_container_hide').hide(); + }); + // 区域 + $(self._dom).parent().find('div.lzlj_amap_container .tool_region').on('click', function (e) { + var isSelected = $(self._dom).parent().find('div.lzlj_amap_container .tool_region').hasClass("active"); + if (isSelected) { + // 取消 + $(self._dom).parent().find('div.lzlj_amap_container .tool_region').removeClass('active'); + $(self._dom).parent().find('div.lzlj_amap_container .tool_region').addClass('inactive'); + + self.reqParams.regions = ""; + self.reqParams.areas = ""; + self.reqParams.countys = ""; + + self.mapRegionTree.SetChildrenCheckbox({NodeId: -1, NodeChecked: 0}); + + self.disProvince && self.disProvince.setMap(null); + + self.isManulOperMap = false; + + self.reloadMapData(); + } else { + // 选中 + $(self._dom).parent().find('div.lzlj_gd_amap_region').show(); + $(self._dom).parent().find('div.lzlj_amap_container .tool_region').removeClass('inactive'); + $(self._dom).parent().find('div.lzlj_amap_container .tool_region').addClass('active'); + } + self.activeSelectedBtn(); + }); + // 清除区域 + $(self._dom).parent().find('div.lzlj_amap_container .tool_region_clear').on('click', function (e) { + $(self._dom).parent().find('div.lzlj_amap_container .tool_region').removeClass('active'); + $(self._dom).parent().find('div.lzlj_amap_container .tool_region').addClass('inactive'); + self.activeSelectedBtn(); + self.reqParams.regions = ""; + self.reqParams.areas = ""; + + self.mapRegionTree.SetChildrenCheckbox({NodeId: -1, NodeChecked: 0}); + + self.disProvince && self.disProvince.setMap(null); + + self.reloadMapData(); + }); + // 圈选 + $(self._dom).parent().find('div.lzlj_amap_container .tool_circle').on('click', function (e) { + + var isSelected = $(self._dom).parent().find('div.lzlj_amap_container .tool_circle').hasClass("active"); + if (isSelected) { + // 取消 + self.baseMap.setDefaultCursor("default"); + + self.mouseTool.close(true); + self.circleEditor.close(); + if (self.drawCircle) { + self.baseMap.remove(self.drawCircle); + } + self.drawCircle = null; + self.reqParams.minx = 72.08; + self.reqParams.miny = 0.1; + self.reqParams.maxx = 141.08; + self.reqParams.maxy = 54.28; + self.reqParams.centerx = ''; + self.reqParams.centery = ''; + self.reqParams.radius = ''; + self.isCircleMode = false; + + $(self._dom).parent().find('div.lzlj_amap_container .tool_circle').removeClass('active'); + $(self._dom).parent().find('div.lzlj_amap_container .tool_circle').addClass('inactive'); + + $(self._dom).parent().find('div.lzlj_gd_amap_data_list').remove(); + + self.reloadMapData(); + } else { + // 选中 + //用鼠标工具画圆 + self.baseMap.setDefaultCursor("crosshair"); + + self.mouseTool.circle({ + strokeColor: self.mapConf.circleBorderColor, + strokeWeight: self.mapConf.circleBorderWidth, + fillColor: self.mapConf.circleFillColor, + fillOpacity: (parseInt(self.mapConf.circleOpacity) || 0 ) / 100 + }); + $(self._dom).parent().find('div.lzlj_amap_container .tool_circle').removeClass('inactive'); + $(self._dom).parent().find('div.lzlj_amap_container .tool_circle').addClass('active'); + } + + self.activeSelectedBtn(); + }); + + // 分类 add_layer + $(self._dom).parent().find('div.lzlj_amap_container .add_layer').on('click', function (e) { + if ($(this).hasClass('active')) { + $(this).removeClass('active'); + $(this).addClass('inactive'); + + $(this).parent().find('.chart_type').hide(); + $(this).parent().find('.data_type').hide(); + $(this).parent().find('.data_type input[type=checkbox]').attr('checked', false); + } else { + $(this).removeClass('inactive'); + $(this).addClass('active'); + + $(this).parent().find('.chart_type').show(); + $(this).parent().find('.data_type').show(); + $(this).parent().find('.data_type input[type=checkbox]').attr('checked', true); + } + self.activeSelectedBtn(); + + var checkedVals = "''"; + $(self._dom).parent().find('div.lzlj_amap_container .add_layer.active').each(function (e1) { + checkedVals += ",'" + $(this).text() + "'"; + }); + if (checkedVals.length > 3) checkedVals = checkedVals.substring(3, checkedVals.length); + self.reqParams.layertype = checkedVals; + + checkedVals = "''"; + $(self._dom).parent().find('div.lzlj_amap_container .data_type input[type=checkbox]:checked').each(function (e1) { + checkedVals += ",'" + $(this).val() + "'"; + }); + if (checkedVals.length > 3) checkedVals = checkedVals.substring(3, checkedVals.length); + self.reqParams.datatype = checkedVals; + + self.reqParams.minx = 72.08; + self.reqParams.miny = 0.1; + self.reqParams.maxx = 141.08; + self.reqParams.maxy = 54.28; + + self.isManulOperMap = false; + self.reloadMapData(); + + }); + // 数据类型 data_type + $(self._dom).parent().find('div.lzlj_amap_container .data_type input').on('click', function (e) { + var checkedVals = "''"; + $(self._dom).parent().find('div.lzlj_amap_container .data_type input[type=checkbox]:checked').each(function (e1) { + checkedVals += ",'" + $(this).val() + "'"; + }); + if (checkedVals.length > 3) checkedVals = checkedVals.substring(3, checkedVals.length); + self.reqParams.datatype = checkedVals; + + self.reqParams.minx = 72.08; + self.reqParams.miny = 0.1; + self.reqParams.maxx = 141.08; + self.reqParams.maxy = 54.28; + + self.isManulOperMap = false; + self.reloadMapData(); + }); + // 图层类型 chart_type + $(self._dom).parent().find('div.lzlj_amap_container .chart_type input').on('click', function (e) { + var layertype = $(this).parent().parent().find('div.add_layer').text(); + if (layertype) { + self.chartTypeConf[layertype] = $(this).val(); + self.reloadMapData(); + } + }); + }, + initRegion: function () { + var self = this; + $('
').appendTo($(this._dom).parent()); + //$(self._dom).parent().find('div.lzlj_gd_amap_region').html('
'); + $(self._dom).parent().find('div.lzlj_gd_amap_region').html('
确定
'); + + $(self._dom).parent().find('div.lzlj_gd_amap_region').hide(); + + $(self._dom).parent().find('div.lzlj_gd_amap_region .ok').css({ + "color": self.toolConf.toolcolor, + "background-color": self.toolConf.toolBtnColor + }); + + $(self._dom).parent().find('div.lzlj_gd_amap_region .ok').on('click', function (e) { + $(self._dom).parent().find('div.lzlj_gd_amap_region').hide(); + var checkedRegion = self.mapRegionTree.GetCheckedTxtsByLevel(1); + var checkedArea = self.mapRegionTree.GetCheckedTxtsByLevel(2); + var checkedCountry = self.mapRegionTree.GetCheckedTxtsByLevel(3); + self.reqParams.regions = checkedRegion; + self.reqParams.areas = checkedArea; + self.reqParams.countys = checkedCountry; + self.reqParams.provinces = self.mapRegionTree.GetCheckedProvinceTxts(); + self.reqParams.minx = 72.08; + self.reqParams.miny = 0.1; + self.reqParams.maxx = 141.08; + self.reqParams.maxy = 54.28; + + self.isManulOperMap = false; + self.loadRegionFlag = true; + self.loadRegionBorder(self.mapRegionTree.GetCheckedValues()); + + self.reloadMapData(); + }); + + var tree = new MyTree("popRegionTreeContainer", true, -1); + self.mapRegionTree = tree; + self.initRegionData(tree); + }, + initSelectedDataList: function () { + var self = this; + + if ($(this._dom).parent().find('div.lzlj_gd_amap_data_list').length <= 0) { + $('
').appendTo($(this._dom).parent()); + $(this._dom).parent().find('div.lzlj_gd_amap_data_list').css({ + "background-color": self.hexToRgba(self.toolConf.detailBgColor, self.toolConf.detailBgOpacity).rgba, + 'color': self.toolConf.detailcolor, + 'font-size': self.toolConf.detailsize, + 'font-family': self.toolConf.detailfamily, + 'font-style': self.getFontStyle(self.toolConf.detailstyle), + 'font-weight': self.getFontWeight(self.toolConf.detailstyle) + }); + } + + $(this._dom).parent().find('div.lzlj_gd_amap_data_list').html(''); + $(this._dom).parent().find('div.lzlj_gd_amap_data_list').hide(); + + var vHtml = ''; + vHtml += '
'; + if (self.toolConf.showRegion) { + vHtml += '
省份
'; + } + if (self.toolConf.showArea) { + vHtml += '
地市
'; + } + if (self.toolConf.showCounty) { + vHtml += '
区县
'; + } + if (self.toolConf.showName) { + vHtml += '
名称
'; + } + if (self.toolConf.showLayerType) { + vHtml += '
数据分类
'; + } + if (self.toolConf.showDataType) { + vHtml += '
数据类型
'; + } + if (self.toolConf.showLng) { + vHtml += '
经度
'; + } + if (self.toolConf.showLat) { + vHtml += '
纬度
'; + } + if (self.toolConf.showVal) { + vHtml += '
数值
'; + } + if (self.toolConf.showDesc) { + vHtml += '
描述
'; + } + vHtml += '
'; + + vHtml += '
    '; + for (var i = 0; i < this.chartData.length; i++) { + vHtml += '
  • '; + if (self.toolConf.showRegion) { + vHtml += '
    ' + this.chartData[i].region + '
    '; + } + if (self.toolConf.showArea) { + vHtml += '
    ' + this.chartData[i].area + '
    '; + } + if (self.toolConf.showCounty) { + vHtml += '
    ' + this.chartData[i].county + '
    '; + } + if (self.toolConf.showName) { + vHtml += '
    ' + this.chartData[i].name + '
    '; + } + if (self.toolConf.showLayerType) { + vHtml += '
    ' + this.chartData[i].layertype + '
    '; + } + if (self.toolConf.showDataType) { + vHtml += '
    ' + this.chartData[i].datatype + '
    '; + } + if (self.toolConf.showLng) { + vHtml += '
    ' + this.chartData[i].lng + '
    '; + } + if (self.toolConf.showLat) { + vHtml += '
    ' + this.chartData[i].lat + '
    '; + } + if (self.toolConf.showVal) { + vHtml += '
    ' + this.chartData[i].val + '
    '; + } + if (self.toolConf.showDesc) { + vHtml += '
    ' + this.chartData[i].desc + '
    '; + } + vHtml += '
  • '; + } + vHtml += '
'; + vHtml += '
共 ' + this.chartData.length + ' 条记录关闭
' + + $(this._dom).parent().find('div.lzlj_gd_amap_data_list').html(vHtml); + + $(this._dom).parent().find('div.lzlj_gd_amap_data_list').show('fast', function(){ + if ($(self._dom).parent().find('div.lzlj_gd_amap_data_list .list_content_ul').height() > self.height - 100) { + $(self._dom).parent().find('div.lzlj_gd_amap_data_list .list_content_ul').height(self.height - 100); + } + }); + + $(this._dom).parent().find('div.lzlj_gd_amap_data_list .close_list').on('click', function(e){ + $(this).parent().parent().remove(); + }); + }, + + initChartTitle: function () { + if (this.titleConf.titlevisiable) { + var self = this; + if ($(this._dom).parent().find('div.lzlj_gd_amap_chart_title').length <= 0) { + $('
').appendTo($(this._dom).parent()); + } + $(this._dom).parent().find('div.lzlj_gd_amap_chart_title').html(this.titleConf.titlename || ''); + $(this._dom).parent().find('div.lzlj_gd_amap_chart_title').css({ + "background": self.hexToRgba(self.titleConf.titlebgcolor, self.titleConf.titleBgOpacity).rgba, + "color": self.titleConf.titlecolor, + "font-family": self.titleConf.titlefamily, + "text-align": self.getAlign(self.titleConf.titleposition), + "font-size": self.titleConf.titlesize + "px", + "font-style": self.getFontStyle(self.titleConf.titlestyle), + "font-weight": self.getFontWeight(self.titleConf.titlestyle) + }); + } + }, + + activeSelectedBtn: function() { + var self = this; + $(this._dom).parent().find('div.lzlj_amap_container .active').css({ + "color": self.toolConf.toolcolor, + "background-color": self.toolConf.toolBtnColor, + "border": self.toolConf.toolBtnColor + ' solid 1px' + }); + $(this._dom).parent().find('div.lzlj_amap_container .inactive').css({ + "color": self.toolConf.toolBtnColor, + "background": "transparent", + "border": self.toolConf.toolBtnColor + ' solid 1px' + }); + $(this._dom).parent().find('div.lzlj_amap_container .chart_type').css({ + "color": self.toolConf.toolBtnColor + }); + $(this._dom).parent().find('div.lzlj_amap_container .data_type').css({ + "color": self.toolConf.toolBtnColor + }); + }, + + renderMapData() { + + var self = this; + + // 数据结构调整 + self.wrapData(); + + var isLoadRegion = self.loadRegionFlag && self.reqParams.provinces && self.reqParams.provinces.length > 0; + if (isLoadRegion) { + console.log('start load region '); + // 行政区域模式,加载行政区域 + console.log('start load region data'); + if (!self.isManulOperMap) { + var pointViewPoints = self.getMapViewPoints(); + + var fitZoomAndCenter = self.baseMap.getFitZoomAndCenterByBounds(pointViewPoints, [10,10,10,10]); + + //var fitZoomAndCenter = self.baseMap.getFitZoomAndCenterByOverlays(self.disProvince, [10,10,10,10]); + + var zoom0 = self.pointConf.clusterMaxZoom || 12; + var zoom1 = fitZoomAndCenter[0] || self.reqParams.mapzoom; + + var fitCenter = fitZoomAndCenter[1] || self.getAreaCenter(pointViewPoints); + self.baseMap.setZoomAndCenter(zoom1, fitCenter, true, 0); + + if ((zoom0 > zoom1 && zoom0 < self.reqParams.mapzoom) || (zoom0 < zoom1 && zoom0 > self.reqParams.mapzoom)) { + // 重新计算是否聚合 + self.reqParams.mapzoom = zoom1; + self.wrapData(); + } + + // 添加数据图层 + self.loadMapLayers(); + + FR.hideLoadingDialog(); + setTimeout(function(){ + self.notLoadData = false; + }, 5000); + + + } else { + // 添加数据图层 + self.loadMapLayers(); + + FR.hideLoadingDialog(); + + setTimeout(function(){ + self.notLoadData = false; + }, 1000); + } + console.log('finish load region data'); + + /*var geocoder = new AMap.Geocoder(); + var provinceArr = self.reqParams.provinces.split(","); + var provicePoints = []; + var loadRegionNum = 0; + for (var i = 0; i < provinceArr.length; i++) { + geocoder.getLocation(provinceArr[i], function(status, result) { + loadRegionNum++; + if (status === 'complete' && result.geocodes.length) { + var lnglat = result.geocodes[0].location + provicePoints.push(lnglat); + } else { + console.log(result); + alert('暂无此区域边界数据!'); + } + if (loadRegionNum == provinceArr.length) { + + } + }); + }*/ + } else { + // 加载点地图 + console.log('start load point data'); + if (!self.isManulOperMap) { + + var pointViewPoints = self.getMapViewPoints(); + + var fitZoomAndCenter = self.baseMap.getFitZoomAndCenterByBounds(pointViewPoints, [10,10,10,10]); + + var zoom0 = self.pointConf.clusterMaxZoom || 12; + var zoom1 = fitZoomAndCenter[0] || self.reqParams.mapzoom; + + var fitCenter = fitZoomAndCenter[1] || self.getAreaCenter(pointViewPoints); + self.baseMap.setZoomAndCenter(zoom1, fitCenter, true, 0); + + //self.baseMap.setBounds(pointViewPoints, true, 0); + //var zoom1 = self.baseMap.getZoom(0); + //var zoom0 = self.pointConf.clusterMaxZoom || 12; + if ((zoom0 > zoom1 && zoom0 < self.reqParams.mapzoom) || (zoom0 < zoom1 && zoom0 > self.reqParams.mapzoom)) { + // 重新计算是否聚合 + self.reqParams.mapzoom = zoom1; + self.wrapData(); + } + + // 添加数据图层 + self.loadMapLayers(); + + FR.hideLoadingDialog(); + setTimeout(function(){ + self.notLoadData = false; + }, 5000); + + } else { + // 添加数据图层 + self.loadMapLayers(); + FR.hideLoadingDialog(); + setTimeout(function(){ + self.notLoadData = false; + }, 1000); + } + console.log('finish load point data'); + } + + // 圈选模式,加载详情 + self.isCircleMode && self.mapConf.showCircleDetail && self.initSelectedDataList(); + + }, + + clearMapLayer: function() { + console.log('clear map data!'); + var self = this; + // 清理图层 + //self.baseMap.clearMap(); + self.baseMap.remove(self.addedOverlays); + self.addedOverlays.map(function (e) { + if (e.setMap) { + e.setMap(null); + } + if (e.clear) { + e.clear(); + self.baseMap.removeLayer(e); + } + if (e.destroy) { + e.destroy(); + } + e = null; + }); + if (self.pointData.point && self.pointData.point.data) { + self.pointData.point.data.map(function(e){ + if (e.destroy) { + e.destroy(); + } + if (e.setMap) { + e.setMap(null); + } + e = null; + }); + self.pointData.point.data = null; + self.pointData.point = null; + } + + self.pointData = {}; + self.pointClusterData = {}; + self.heatData = {}; + + self.addedOverlays = []; + self.chartData = []; + + /* + var mapStyle = self.mapConf.mapStyle; + var mapzoom = self.baseMap.getZoom(2); + var centerx = self.baseMap.getCenter().lng; + var centery = self.baseMap.getCenter().lat; + self.baseMap.destroy(); + self.baseMap = null; + var mapcanvas = $(self._dom).find('canvas.amap-layer'); + if (mapcanvas && mapcanvas.length > 0) { + mapcanvas[0].getContext('webgl').getExtension('WEBGL_lose_context').loseContext() + } + + var map = new AMap.Map(self._dom, { + resizeEnable: true, + center: [centerx, centery], + zoom: mapzoom + }); + if (mapStyle && mapStyle.trim() && mapStyle.trim().length > 0) { + map.setMapStyle('amap://styles/' + mapStyle); + } + + self.baseMap = map; + + map.on('click', function (e) { + self.isManulOperMap = true; + }); + map.on('mousewheel', function (e) { + self.isManulOperMap = true; + //self.clearMapLayer(); + }); + map.on('dragstart', function (e) { + self.isManulOperMap = true; + //self.clearMapLayer(); + }); + + map.on('moveend', function (e) { + console.log(e); + + if (self.currLoadTime + && (new Date().getTime() - self.currLoadTime) > 1000 + && !self.notLoadData) { + setTimeout(function(){ + console.log('zoom start query!'); + self.reloadMapData(); + }, 100); + } + self.currLoadTime = new Date().getTime(); + }); + + //self.initTools(); + self.initCircleTool(); + */ + + }, + /*resetMaps: function () { + + var self = this; + + self.baseMap.remove(self.addedOverlays); + self.addedOverlays.map(function (e) { + if (e.setMap) { + e.setMap(null); + e = null; + } else if (e.clear) { + e.clear(); + self.baseMap.removeLayer(e); + } + + }); + self.addedOverlays = []; + self.wrapData(); + + var isLoadRegion = self.loadRegionFlag && self.reqParams.provinces && self.reqParams.provinces.length > 0; + + self.loadMapLayers(isLoadRegion); + + self.isCircleMode && self.mapConf.showCircleDetail && self.initSelectedDataList(); + + if (isLoadRegion) { + self.loadRegionFlag = false; + + var geocoder = new AMap.Geocoder(); + + var provinceArr = self.reqParams.provinces.split(","); + var provicePoints = []; + var loadRegionNum = 0; + for (var i = 0; i < provinceArr.length; i++) { + //provinceArr[i].replaceAll("'", "") + geocoder.getLocation(provinceArr[i], function(status, result) { + if (status === 'complete'&&result.geocodes.length) { + var lnglat = result.geocodes[0].location + var text = new AMap.Text({ + text:' ', + style:{ + 'border-width': 0, + 'background-color': 'rgba(0,0,0,0)' + }, + position: [lnglat.lng, lnglat.lat] + }); + + text.setMap(self.baseMap); + provicePoints.push(text); + loadRegionNum++; + if (!self.isManulOperMap && loadRegionNum == provinceArr.length) { + var zoom1 = self.baseMap.getZoom(0); + var zoom0 = (self.pointConf.clusterMaxZoom || 12); + self.baseMap.setFitView(provicePoints, true, [200,200,200,200], 7.5); + setTimeout(function(){ + var zoom2 = self.baseMap.getZoom(0); + if ((zoom0 < zoom1 && zoom0 > zoom2) || (zoom0 > zoom1 && zoom0 < zoom2)) { + self.resetMaps(); + } + }, 1000); + } + } + }); + } + + } + },*/ + + + initMaps: function () { + var self = this; + + var mapKey = "cdd06cfb8afcef04222b5621247106b2"; + var mapStyle = self.mapConf.mapStyle; + + self.reqParams.centerx = self.mapConf.centerx || 116.402921; + self.reqParams.centery = self.mapConf.centery || 39.907123; + self.reqParams.mapzoom = self.mapConf.mapzoom || 10; + + if (self.mapConf.mapKey && self.mapConf.mapKey.trim() && self.mapConf.mapKey.trim().length > 0) { + mapKey = self.mapConf.mapKey; + } + + var mapUrl = "https://webapi.amap.com/maps?v=2.0&key=" + mapKey + "&plugin=AMap.MarkerCluster,AMap.HeatMap,AMap.DistrictLayer,AMap.MouseTool,AMap.CircleEditor,AMap.Geocoder"; + + $.getScript(mapUrl, function () { + var map = new AMap.Map(self._dom, { + resizeEnable: true, + animateEnable: false, + jogEnable: false, + center: [self.reqParams.centerx, self.reqParams.centery], + zoom: self.reqParams.mapzoom + }); + if (mapStyle && mapStyle.trim() && mapStyle.trim().length > 0) { + map.setMapStyle('amap://styles/' + mapStyle); + } + + self.baseMap = map; + + map.on('click', function (e) { + self.isManulOperMap = true; + }); + map.on('mousewheel', function (e) { + self.isManulOperMap = true; + if (self.currLoadTime + && (new Date().getTime() - self.currLoadTime) > 1000 + && !self.notLoadData) { + self.clearMapLayer(); + } + }); + map.on('dragstart', function (e) { + self.isManulOperMap = true; + if (self.currLoadTime + && (new Date().getTime() - self.currLoadTime) > 1000 + && !self.notLoadData) { + self.clearMapLayer(); + } + }); + + /*self.mapMoveFunc = function(e){ + console.log(e); + if (self.currLoadTime + && (new Date().getTime() - self.currLoadTime) > 1000) { + self.reloadMapData(); + console.log(new Date().getTime() - self.currLoadTime); + } + self.currLoadTime = new Date().getTime(); + }; + map.on('moveend', self.mapMoveFunc);*/ + map.on('moveend', function (e) { + if (self.currLoadTime + && (new Date().getTime() - self.currLoadTime) > 1000 + && !self.notLoadData) { + console.log('moveend'); + setTimeout(function(){ + self.reqParams.mapzoom = self.baseMap.getZoom(0); + self.reloadMapData(); + }, 100); + + } + self.currLoadTime = new Date().getTime(); + }); + + + self.renderMapData(); + + self.initTools(); + self.initCircleTool(); + + }); + + + }, + + initCircleTool: function () { + var self = this; + //在地图中添加MouseTool插件 + self.mouseTool = new AMap.MouseTool(self.baseMap); + //添加事件 + AMap.Event.addListener(self.mouseTool, 'draw', function (e) { + if (e && e.obj) { + self.baseMap.setDefaultCursor("default"); + self.isManulOperMap = true; + self.drawCircle = e.obj; + self.mouseTool.close(); + self.circleEditor = new AMap.CircleEditor(self.baseMap, e.obj, { + editOptions: { + strokeColor: self.mapConf.circleBorderColor, + strokeWeight: self.mapConf.circleBorderWidth, + fillColor: self.mapConf.circleFillColor, + fillOpacity: (parseInt(self.mapConf.circleOpacity) || 0 ) / 100 + } + }); + self.circleEditor.open(); + + var min = e.obj.getBounds().southWest; + var max = e.obj.getBounds().northEast; + + self.reqParams.minx = min.lng; + self.reqParams.miny = min.lat; + self.reqParams.maxx = max.lng; + self.reqParams.maxy = max.lat; + + self.reqParams.centerx = e.obj.getCenter().lng; + self.reqParams.centery = e.obj.getCenter().lat; + self.reqParams.radius = e.obj.getRadius(); + + self.isCircleMode = true; + + self.reloadMapData(); + + self.circleEditor.on('adjust', function (e2) { + var min = e2.target.getBounds().southWest; + var max = e2.target.getBounds().northEast; + + self.reqParams.minx = min.lng; + self.reqParams.miny = min.lat; + self.reqParams.maxx = max.lng; + self.reqParams.maxy = max.lat; + + self.reqParams.centerx = e2.target.getCenter().lng; + self.reqParams.centery = e2.target.getCenter().lat; + self.reqParams.radius = e2.target.getRadius(); + + self.isCircleMode = true; + self.isManulOperMap = true; + + self.reloadMapData(); + }); + self.circleEditor.on('move', function (e2) { + var min = e2.target.getBounds().southWest; + var max = e2.target.getBounds().northEast; + + self.reqParams.minx = min.lng; + self.reqParams.miny = min.lat; + self.reqParams.maxx = max.lng; + self.reqParams.maxy = max.lat; + + self.reqParams.centerx = e2.target.getCenter().lng; + self.reqParams.centery = e2.target.getCenter().lat; + self.reqParams.radius = e2.target.getRadius(); + + self.isCircleMode = true; + self.isManulOperMap = true; + + self.reloadMapData(); + }); + } + + }); + + if (self.drawCircle) { + self.baseMap.add(self.drawCircle); + self.mouseTool.close(); + self.circleEditor = new AMap.CircleEditor(self.baseMap, self.drawCircle, { + editOptions: { + strokeColor: '#ff0000', + strokeWeight: 2, + fillColor: '#ff0000', + fillOpacity: 0.3 + } + }); + self.circleEditor.open(); + self.isManulOperMap = false; + self.isCircleMode = true; + + self.circleEditor.on('adjust', function (e2) { + var min = e2.target.getBounds().southWest; + var max = e2.target.getBounds().northEast; + self.reqParams.minx = min.lng; + self.reqParams.miny = min.lat; + self.reqParams.maxx = max.lng; + self.reqParams.maxy = max.lat; + + self.reqParams.centerx = e2.target.getCenter().lng; + self.reqParams.centery = e2.target.getCenter().lat; + self.reqParams.radius = e2.target.getRadius(); + + self.isManulOperMap = false; + self.isCircleMode = true; + self.reloadMapData(); + }); + self.circleEditor.on('move', function (e2) { + var min = e2.target.getBounds().southWest; + var max = e2.target.getBounds().northEast; + self.reqParamsOld = self.reqParams; + self.reqParams.minx = min.lng; + self.reqParams.miny = min.lat; + self.reqParams.maxx = max.lng; + self.reqParams.maxy = max.lat; + + self.reqParams.centerx = e2.target.getCenter().lng; + self.reqParams.centery = e2.target.getCenter().lat; + self.reqParams.radius = e2.target.getRadius(); + + self.isManulOperMap = false; + self.isCircleMode = true; + self.reloadMapData(); + }); + } + }, + + loadRegionBorder: function (adcodes) { + if (!adcodes || adcodes.length <= 0) { + return; + } + var self = this; + + self.disProvince && self.disProvince.setMap(null); + + //var regionStyle = self.getGovRegionStyle(); + self.disProvince = new AMap.DistrictLayer.Province({ + zIndex: 10, + adcode: adcodes.split(","), + depth: 2, + styles: { + 'stroke-width': self.mapConf.regionBorderWidth, + 'fill': function (properties) { + var styleAttr = { + lineWidth: 2, + lineColor: 'rgba(0,0,0,1)', + fillColor: 'rgba(255,255,255)', + fillOpacity: 0, + }; + return self.hexToRgba(styleAttr.fillColor, styleAttr.fillOpacity).rgba; + }, + 'province-stroke': function (properties) { + //return self.getGovRegionStyle(properties.NAME_CHN).lineColor; + return self.mapConf.regionBorderColor; //'rgba(0,0,0,1)'; + }, + 'city-stroke': function (properties) { + //return self.getGovRegionStyle(properties.NAME_CHN).lineColor; + return self.mapConf.areaBorderColor; //'rgba(0,0,0,1)'; + }, // 中国地级市边界 + 'county-stroke': function (properties) { + //'rgba(255,255,255,0.5)' // 中国区县边界 + //return self.getGovRegionStyle(properties.NAME_CHN).lineColor; + return self.mapConf.countryBorderColor; //'rgba(0,0,0,1)'; + } + } + }); + + self.disProvince.setMap(self.baseMap); + + }, + + getGovRegionStyle: function (region) { + var self = this; + var iconAttr = {}; + var isSetStyle = false; + for (var i = 0; i < self.iconConf.length; i++) { + if (region == self.iconConf[i].titleName) { + iconAttr = self.iconConf[i]; + isSetStyle = true; + break; + } + } + if (isSetStyle) { + return iconAttr; + } else { + var gb = Math.random() * 155 + 50; + var randomColor = 'rgba(' + gb + ',' + gb + ',255,0.8)'; + return { + lineWidth: 0, + lineColor: 'rgba(255,255,255,0)', + fillColor: randomColor, + fillOpacity: 0, + }; + } + + }, + + calImgSize: function (imgw, imgh, size) { + if (size && size > 0) { + if (imgw > imgh) { + imgh = size * imgh / imgw; + imgw = size; + } else { + imgw = size * imgw / imgh; + imgh = size; + } + } + return { + imgw: imgw, + imgh: imgh + }; + }, + _customDoLink: function (params) { + params.linkKey = params.linkKey || 'pointLink'; + var hyperLink = this.pointLink; + if (params && hyperLink && hyperLink.parasMap) { + params.chartIndex = this.chartIndex || 0; + this._doLinkWithFilter(params, hyperLink); + } + }, + + + loadMapLayers: function () { + var self = this; + + if (!self.chartData || self.chartData.length <= 0) { + return; + } + + // 热力样式 + var heatColors = self.heatConf.intervalColors || '#0000ff|#75d3f8|#00ff00|#ffea00|#ff0000'; + var heatPos = self.heatConf.intervalPos || '0.5|0.65|0.7|0.9|1.0'; + var heatColorArr = heatColors.split("|"); + var heatPosArr = heatPos.split("|"); + var gradientStyle = {}; + for (var i = 0; i < heatPosArr.length; i++) { + gradientStyle[heatPosArr[i]] = heatColorArr[i]; + } + + var _renderClusterMarker = function (context) { + + var pItem = { + layertype: '', + datatype: '', + val: context.count + }; + var clusterCondStyle = self.findMarkerCond(pItem, "clusterpointmap"); + var fillColor = clusterCondStyle.clusterFillColor || self.pointConf.clusterFillColor; + var bgOpacity = clusterCondStyle.clusterBgOpacity || self.pointConf.clusterBgOpacity; + var pointSize = clusterCondStyle.clusterPointSize || self.pointConf.clusterPointSize; + var borderColor = clusterCondStyle.clusterBorderColor || self.pointConf.clusterBorderColor; + var textColor = clusterCondStyle.clusterTextColor || self.pointConf.clusterTextColor; + var div = document.createElement('div'); + div.style.backgroundColor = self.hexToRgba(fillColor, bgOpacity).rgba; + var size = pointSize || 64; + div.style.width = div.style.height = size + 'px'; + div.style.border = 'solid 1px ' + borderColor; + div.style.borderRadius = size / 2 + 'px'; + div.innerHTML = context.count; + div.style.lineHeight = size + 'px'; + div.style.color = textColor; + div.style.fontSize = '14px'; + div.style.textAlign = 'center'; + context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2)); + context.marker.setContent(div); + }; + + // 加载点聚合插件 + //self.baseMap.plugin(["AMap.MarkerCluster", "AMap.HeatMap"], function () { + + // 加载地图数据 + for (var k in self.pointData) { + var markerLayer = new AMap.LabelsLayer({ + visible: true, + zooms: [2, 20], + zIndex: 1000, + collision: false + }); + + self.baseMap.add(markerLayer); + self.addedOverlays.push(markerLayer); + + markerLayer.add(self.pointData[k].data); + + } + // 加载点聚合地图 + for (var k in self.pointClusterData) { + var cluster = new AMap.MarkerCluster(self.baseMap, self.pointClusterData[k].data, { + gridSize: 80, + maxZoom: self.pointConf.clusterMaxZoom || 13, + //styles: clusterMarkerStyles, + renderClusterMarker: _renderClusterMarker, + renderMarker: _renderClusterMarker + }); + self.addedOverlays.push(cluster); + } + + // 加载热力图 + for (var k in self.heatData) { + var heatmap = new AMap.HeatMap(self.baseMap, { + radius: self.heatConf.radius || 30, //给定半径 + opacity: [0.1, self.heatConf.bgOpacity == 0 ? 0 : (self.heatConf.bgOpacity || 100) / 100], + gradient: gradientStyle + }); + //设置数据集:该数据为北京部分“公园”数据 + heatmap.setDataSet({ + data: self.heatData[k].data, + max: self.heatConf.maxValue || 100 + }); + + self.addedOverlays.push(heatmap); + } + + /*if (!noFit) { + self.fitPointsView(); + }*/ + + //self.baseMap.setFitView(self.addedOverlays, true, [200,200,200,200], 12); + //}); + + }, + + getMapViewPoints: function() { + var self = this; + var roundLngLats = [ + {lng: this.maxDataRounds.minx, lat: this.maxDataRounds.maxy}, + {lng: this.maxDataRounds.minx, lat: this.maxDataRounds.miny}, + {lng: this.maxDataRounds.maxx, lat: this.maxDataRounds.maxy}, + {lng: this.maxDataRounds.maxx, lat: this.maxDataRounds.miny} + ]; + return new AMap.Bounds(new AMap.LngLat(this.maxDataRounds.minx, this.maxDataRounds.miny), + new AMap.LngLat(this.maxDataRounds.maxx, this.maxDataRounds.maxy)); + //return self.getAreaCenter(roundLngLats); + + /*var roundPoints = []; + for (var i = 0; i < 4; i++) { + var text = new AMap.Text({ + text:' ', + style:{ + 'border-width': 0, + 'background-color': 'rgba(0,0,0,0)' + }, + position: roundLngLats[i] + }); + text.setMap(this.baseMap); + roundPoints.push(text); + self.addedOverlays.push(text); + } + return roundPoints;*/ + }, + + /*fitPointsView: function() { + var self = this; + var roundLngLats = [ + [this.maxDataRounds.minx, this.maxDataRounds.maxy], + [this.maxDataRounds.minx, this.maxDataRounds.miny], + [this.maxDataRounds.maxx, this.maxDataRounds.maxy], + [this.maxDataRounds.maxx, this.maxDataRounds.miny] + ]; + var roundPoints = []; + for (var i = 0; i < 4; i++) { + var text = new AMap.Text({ + text:' ', + style:{ + 'border-width': 0, + 'background-color': 'rgba(0,0,0,0)' + }, + position: roundLngLats[i] + }); + text.setMap(this.baseMap); + roundPoints.push(text); + } + + if (!this.isManulOperMap) { + self.baseMap.on('moveend', function (e){}); + self.baseMap.setFitView(roundPoints, true, [100,100,100,100], 15); + setTimeout(function(){ + self.baseMap.on('moveend', self.initZoomFunc()); + }, 2000); + } + },*/ + + wrapData: function () { + console.log('start wrap data!'); + var self = this; + this.pointClusterData = {}; + this.heatData = {}; + this.pointData = {}; + if (!this.chartData || this.chartData.length <= 0) { + return; + } + this.maxDataRounds = { + minx: this.chartData[0].lng, + maxx: this.chartData[0].lng, + miny: this.chartData[0].lat, + maxy: this.chartData[0].lat + }; + var isFirst = false; + if (!this.toolsData) { + this.toolsData = []; + isFirst = true; + } + var currZoom = self.reqParams.mapzoom; + console.log('zoom:' + currZoom); + + this.chartData.map(function (item) { + if (isFirst) { + var tmpLayerObj = self.toolsData.find(function (e1) { + return e1.name == item.layertype; + }); + if (!tmpLayerObj) { + tmpLayerObj = { + name: item.layertype, + data: [item.datatype] + } + self.toolsData.push(tmpLayerObj); + } else { + var tmpDataObj = tmpLayerObj.data.find(function (e2) { + return e2 == item.datatype; + }); + if (!tmpDataObj) { + tmpLayerObj.data.push(item.datatype); + } + } + } + if (parseFloat(item.lng) < parseFloat(self.maxDataRounds.minx)) { + self.maxDataRounds.minx = item.lng; + } + if (parseFloat(item.lng) > parseFloat(self.maxDataRounds.maxx)) { + self.maxDataRounds.maxx = item.lng; + } + if (parseFloat(item.lat) < parseFloat(self.maxDataRounds.miny)) { + self.maxDataRounds.miny = item.lat; + } + if (parseFloat(item.lat) > parseFloat(self.maxDataRounds.maxy)) { + self.maxDataRounds.maxy = item.lat; + } + + if (self.chartTypeConf[item.layertype] == "热力") { + //if (!self.heatData[item.layertype] || !self.heatData[item.layertype].data) { + if (!self.heatData.heat || !self.heatData.heat.data) { + self.heatData.heat = { + name: item.layertype, + data: [] + }; + } + self.heatData.heat.data.push({ + lng: item.lng, + lat: item.lat, + count: parseInt(item.val) || 1 + }); + } else { + // 点地图数据 + if (currZoom >= (self.pointConf.clusterMaxZoom || 12) || self.isCircleMode) { + //if (!self.pointData[item.layertype] || !self.pointData[item.layertype].data) { + if (!self.pointData.point || !self.pointData.point.data) { + self.pointData.point = { + name: item.layertype, + data: [] + }; + } + self.pointData.point.data.push(self.getOneMarker(item)); + } else { + //if (!self.pointClusterData[item.layertype] || !self.pointClusterData[item.layertype].data) { + if (!self.pointClusterData.pointcluster || !self.pointClusterData.pointcluster.data) { + self.pointClusterData.pointcluster = { + name: item.layertype, + data: [] + }; + } + self.pointClusterData.pointcluster.data.push({ + weight: parseInt(item.val) || 1, + lnglat: [item.lng, item.lat] + }); + } + + } + + }); + + console.log('finish wrap data ' + this.chartData.length); + }, + + getOneMarker: function (item) { + var self = this; + var defIcon = 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAD60lEQVR4nO1YMWgUQRTd4mb2orYiJpnZw84gaGEhImIhCJJC0gixEQVJmiAowcJCECSdSRrRoGIhGAVNYWEhpEiCAdOI3u1tjhAbG1OoIMTu/D+5O3f3Ljszyc3MBefBh2V3/p/3/v75M7ue5+Dg4ODg4GAKqwUvX+G0b5n7/WAjNevHe/jMNj8tiHjuVMTprTL358ucVrPNn8ex6GOb946xHNABELUgFr2lLWAM2zqUEfWQoyGjz3cgPGEYC2Pa1iWFckAvlRn53i7xDcOYENu2vkxEgX+j7cJThnPY1tkSEaMXdYtvJAHmsq03AezYpsQ3ktApu0SJ0SOwba2YTwBdwblt6/e22e3XoYw/wJ7/AG3zmq6rxsG5rYqv7fMKpMn7MMidbHXiw3v4DMeoxLR6TigrHXLIhHxcMqGQhAWdGrfEMs+flSW5cijPVeOjj3QVABcdGjMBE4/JkCux3Om0b8jJNXi2BPYLmtmXkNO3rbY29JVMwpgZ1THUBIjKfjzuA+v1MNx/l+HzEb8Kk/OQcYkELBkVjw1LgtTvz91drO4DJ7jzcO+nyA8rIp4EjIGxRH5GP6WRoFBIQBfjPiDsqUJje5HwhVgin3TlaAX+wBCKYPRxfXxYyBcUxKP9KfZ5tO6PsUQ+yMlkAkbECSDDjQT05s4oJqCKPv8SQIYlEjBiLAFAaEgoIPZGdpqAUKriyJCxBGye2ASEAnq7Pl6mZ2RWAMQSjgdOxhJQ3O/tkxDxKu6D3V0hAd/ivhhL5IOcjCVggxQjs1mEQHAlKYLcl377nN6J+2IsQfnPGhWPKHH/ungZkCtxH7j3UmLpPEn4QAyRD3Ixqx5QLJBjqqWMiLj/cIuxP+DN30uPxxjC8gcuZlQ3k5sRkcMDUNrva7DnIJZ53UqMXvh0wNubHid5eJoxo7YFQuafk1nTpYBcVY2NPlL9Ajjo0CYNIDEt1dygUclsVRtbrKDBxmzahMZswqqHnIC+gaPt3TCgA1FvVw8aXuO9jWcKseJnBauAtfpMKQltMJzTtu4GKgVywnQCcE7buhOA8/ojU+JxLtt6m1D75F01kIBVnMu23pYIGbms/e3DHLZ1ZkLxz49q42s6VHUcNC6Fzi39NHQshY4v/TTauRR2RemngeUq/I6XE1/ZNaWfhtS/PFHpm/zbqwNh4N/ctnjwtc2/LYi4P6Ve+v6Ubd5tw+ZPVH9OPgH+nPGfnLoB3/jHQdiahPg1HGubrxbAd/+geN3TQds8tQJEjmYkYNQ2PyOIOJlsbnpk0jYvo4gYfd0QD9e2+RhH1fNyIaOLaHhtm48VFLvzHM02DwcHBwcHh/8UfwE/2Xk+00CsAAAAAABJRU5ErkJggg=='; + var size = self.pointConf.pointSize || 32; + + var tipContent = ''; + if (!self.labelConf.showPointLabel) { + tipContent = ''; + } else if (self.labelConf.labelType == "1") { + if (self.labelConf.showLayerType) tipContent += ' | ' + item.layertype; + if (self.labelConf.showDataType) tipContent += ' | ' + item.datatype; + if (self.labelConf.showName) tipContent += ' | ' + item.name; + if (self.labelConf.showLng) tipContent += ' | ' + item.lng; + if (self.labelConf.showLat) tipContent += ' | ' + item.lat; + if (self.labelConf.showDesc) tipContent += ' | ' + item.desc; + if (tipContent.length > 3) tipContent = tipContent.substring(2, tipContent.length); + } else if (self.labelConf.labelType == "2") { + var tipFunc = new Function(self.labelConf.labelJsPane); + tipContent = tipFunc.call(item) || ''; + } + + var textStyle = { + fontSize: self.labelConf.labelsize, + fontWeight: self.getFontWeight(self.labelConf.labelstyle), + fontStyle: self.getFontStyle(self.labelConf.labelstyle), + fillColor: self.labelConf.labelcolor, + //borderColor: '#ff0000', + //borderWidth: 1, + fold: false, + padding: [2,5,2,5], + backgroundColor: self.labelConf.labelBgColor || '#fff' + }; + var markerCondStyle = self.findMarkerCond(item, "pointmap"); + size = markerCondStyle.pointSize || size; + var labelConf = { + //name: '自提点1', + //position: [113.675, 34.563], + zooms: [2, 20], + opacity: 1, + zIndex: 100, + fold: true, + offset: [-size / 2, -size], + icon: { + image: "data:image/png;base64," + (markerCondStyle.pointimg || self.pointConf.pointimg || defIcon), + size: [size, size] + } + , + text: { + content: tipContent, + direction: 'right', + offset: [0, 0], + style: textStyle + } + }; + + var markerConf = $.extend({}, labelConf, {position: [item.lng, item.lat]}); + + var marker = new AMap.LabelMarker(markerConf); + + if (self.tipsConf.showPointTips) { + marker.on('mouseover', function(ev){ + var tmpDom = $(self._dom).parent().find('div.LzljAMap_custom_tips'); + var tipHtmls = '
'; + if (self.tipsConf.showLayerType) { + tipHtmls += '分类:' + item.layertype + '
'; + } + if (self.tipsConf.showDataType) { + tipHtmls += '类型:' + item.datatype + '
'; + } + if (self.tipsConf.showName) { + tipHtmls += '名称:' + item.name + '
'; + } + if (self.tipsConf.showLng) { + tipHtmls += '经度:' + item.lng + '
'; + } + if (self.tipsConf.showLat) { + tipHtmls += '纬度:' + item.lat + '
'; + } + if (self.tipsConf.showDesc) { + tipHtmls += '描述:' + item.desc + '
'; + } + tipHtmls += '
'; + tmpDom.html(tipHtmls); + tmpDom.css({ + "left": (ev.pixel.x + 10) + "px", + "top": (ev.pixel.y + 10) + "px" + }); + tmpDom.show(); + + }); + marker.on('mouseout', function(ev){ + var tmpDom = $(self._dom).parent().find('div.LzljAMap_custom_tips'); + tmpDom.hide(); + }); + marker.on('click', function(ev){ + item.event = {clientX: ev.pixel.x, clientY: ev.pixel.y}; + self._customDoLink(item); + }); + } + + return marker; + }, + + findMarkerCond: function(item, title) { + if (!item || !title) { + return {}; + } + if (this.pointStyleCond && this.pointStyleCond.length > 0) { + try { + for (var i = 0; i < this.pointStyleCond.length; i++) { + if (this.pointStyleCond[i].title == title) { + var cond = this.pointStyleCond[i].condition; + cond = cond.replace(/\{数据分类\}/g, item.layertype); + cond = cond.replace(/\{数据类型\}/g, item.datatype); + cond = cond.replace(/\{数值\}/g, (item.val||0)); + cond = cond.replace(/\{聚合数量\}/g, item.val); + if (eval(cond)) { + return this.pointStyleCond[i]; + } + } + } + } catch (e) { + console.log('条件属性配置错误!请检查条件'); + return {}; + } + } + return {}; + }, + findLegendCond: function(item, title) { + if (!item || !title) { + return {}; + } + if (this.pointStyleCond && this.pointStyleCond.length > 0) { + try { + for (var i = 0; i < this.pointStyleCond.length; i++) { + if (this.pointStyleCond[i].title == title) { + var cond = this.pointStyleCond[i].condition; + + var valIdx = cond.indexOf("数值"); + if (valIdx > 0) { + var start = 0; + var end = cond.length; + if (cond.substr(valIdx - 4, 2) == '&&') { + start = valIdx - 4; + } + if (cond.indexOf("&&", valIdx) > 0) { + end = cond.indexOf("&&", valIdx); + } + cond = cond.substr(0, start) + cond.substr(end, cond.length); + } + cond = cond.replace(/\{数据分类\}/g, item.layertype); + cond = cond.replace(/\{数据类型\}/g, item.datatype); + if (eval(cond)) { + return this.pointStyleCond[i]; + } + } + } + } catch (e) { + console.log('条件属性配置错误!请检查条件'); + return {}; + } + } + return {}; + }, + + initRegionData: function (tree) { + tree.InitChinaRegions(); + tree.Show(); + tree.FullCollapse(); + }, + + coordsConvert: function (LngLatArray, item) { + var self = this; + var LngLatArray2 = []; + var size = 40; + var pageNum = parseInt((LngLatArray.length + size - 1) / size); + var convertNum = 0; + + var convert = function (LngLatArraySlice, n) { + AMap.convertFrom(LngLatArraySlice, 'gps', function (status, result) { + if (result.info === 'ok') { + LngLatArray2[n] = (result.locations); + convertNum++; + if (convertNum >= pageNum) { + self.loadIcon(item, [].concat.apply([], LngLatArray2)); + } + } + }); + }; + for (var i = 0; i < pageNum; i++) { + var LngLatArraySlice = LngLatArray.slice(i * size, (i + 1) * size); + convert(LngLatArraySlice, i); + } + }, + + lnglatToArr: function (fromStr) { + var retArr = []; + if (fromStr) { + var lnglatArr = fromStr.split(","); + for (var i = 0; i < lnglatArr.length; i++) { + retArr.push(lnglatArr[i].trim().split(" ")); + } + } + return retArr; + }, + getAreaCenter: function (coords) { + var total = coords.length; + var X = 0, Y = 0, Z = 0; + for (var i = 0; i < coords.length; i++) { + var lnglat = coords[i]; + var lng = (lnglat.lng * Math.PI) / 180; + var lat = (lnglat.lat * Math.PI) / 180; + var x, y, z; + x = Math.cos(lat) * Math.cos(lng); + y = Math.cos(lat) * Math.sin(lng); + z = Math.sin(lat); + X += x; + Y += y; + Z += z; + } + + X = X / total; + Y = Y / total; + Z = Z / total; + + var Lng = Math.atan2(Y, X); + var Hyp = Math.sqrt(X * X + Y * Y); + var Lat = Math.atan2(Z, Hyp); + return [ + parseFloat((Lng * 180) / Math.PI), + parseFloat((Lat * 180) / Math.PI) + ]; + }, + calTextWidth: function (str, fontSize) { + var fontSize = fontSize || 12; + var strHtml = $('') + .attr("id", "temp_cal_text_font_size") + .css({ + "display": "none", + "font-size": fontSize + "px", + "font-family": "Microsoft YaHei" + }).html(str); + $(document.body).append(strHtml); + var width = $('#temp_cal_text_font_size').width(); + var height = $('#temp_cal_text_font_size').height(); + $('#temp_cal_text_font_size').remove(); + return [width, height]; + }, + hexToRgba: function (hex, al) { + var hexColor = /^#/.test(hex) ? hex.slice(1) : hex, + alp = hex === 'transparent' ? 0 : Math.ceil(al), + r, g, b; + hexColor = /^[0-9a-f]{3}|[0-9a-f]{6}$/i.test(hexColor) ? hexColor : 'fffff'; + if (hexColor.length === 3) { + hexColor = hexColor.replace(/(\w)(\w)(\w)/gi, '$1$1$2$2$3$3'); + } + r = hexColor.slice(0, 2); + g = hexColor.slice(2, 4); + b = hexColor.slice(4, 6); + r = parseInt(r, 16); + g = parseInt(g, 16); + b = parseInt(b, 16); + return { + hex: '#' + hexColor, + alpha: alp, + rgba: 'rgba(' + r + ', ' + g + ', ' + b + ', ' + (alp / 100).toFixed(2) + ')' + }; + }, + isNullStr: function (val, def) { + if (typeof(val) == undefined || "" == val || null == val || val.length <= 0) { + if (typeof(def) == undefined || "" == def || null == def || def.length <= 0) { + return ""; + } + return def; + } + if (val.trim) { + return val.trim(); + } + return val; + }, + isNullInt: function (val, def) { + if (typeof(val) == undefined || "" == val || null == val || val.length <= 0) { + if (typeof(def) == undefined || "" == def || null == def || def.length <= 0) { + return 0; + } + return parseInt(def); + } + return parseInt(val); + }, + isNullBoolean: function (val, def) { + if (typeof(val) == undefined || "" == val || null == val) { + if (typeof(def) == undefined || "" == def || null == def) { + return false; + } + return def; + } + return val; + }, + getAlign: function (align) { + if ("2" == align) { + return "left"; + } else if ("0" == align) { + return "center"; + } else if ("4" == align) { + return "right"; + } + }, + getFontStyle: function (style) { + if ("2" == style || "3" == style) { + return "italic"; + } else { + return "normal"; + } + }, + getFontWeight: function (style) { + if ("1" == style || "3" == style) { + return "bold"; + } else { + return "normal"; + } + } + +}); \ No newline at end of file diff --git a/src/com/fr/plugin/lzljgdmap/web/jstree.js b/src/com/fr/plugin/lzljgdmap/web/jstree.js new file mode 100644 index 0000000..a9e38a5 --- /dev/null +++ b/src/com/fr/plugin/lzljgdmap/web/jstree.js @@ -0,0 +1,3689 @@ +var TREENODE_LEVEL_WIDTH = 20; + +function MyTreeNode(nodeId, nodePId, nodeTxt, nodeUrl, nodeTarget, nodeImg) { + this.NodeType = 1; + this.NodeId = nodeId; + this.NodePId = nodePId; + this.NodeTxt = nodeTxt; + this.NodeUrl = nodeUrl; + this.NodeTarget = nodeTarget; + this.NodeImg = null; //(nodeImg.length > 0) ? (WEBURL+ nodeImg) : ""; + + this.NodeLevel = 0; + this.HasChildren = false; + this.NodeExpanded = false; + this.NodeChecked = 0; //0=false,1=true,2=part + + //HTML + this.DIV_NodeBar = document.createElement("DIV"); + this.DIV_NodeBar.className = "nodeBar"; + + this.DIV_NodeLevel = document.createElement("DIV"); + this.DIV_NodeLevel.className = "nodeLevel"; + + this.DIV_NodeFlag = document.createElement("DIV"); + this.DIV_NodeFlag.className = "nodeFlag"; + this.DIV_NodeFlag.id = "nf" + this.NodeId; + + this.DIV_NodeImg = document.createElement("DIV"); + this.DIV_NodeImg.className = "nodeImg"; + if ((this.NodeImg != null) && (this.NodeImg.length > 0)) { + var img = document.createElement("IMG"); + img.src = this.NodeImg; + img.style.width = "16px"; + img.style.height = "16px"; + this.DIV_NodeImg.appendChild(img); + } + + //checkbox + this.DIV_Checkbox = document.createElement("DIV"); + + //text + this.DIV_NodeTxT = document.createElement("DIV"); + this.DIV_NodeTxT.className = "nodeTxt"; + if ((this.NodeUrl == null) || (this.NodeUrl.length < 1)) { + this.DIV_NodeTxT.appendChild(document.createTextNode(this.NodeTxt)); + } else { + var A = document.createElement("A"); + A.target = this.NodeTarget; + A.href = this.NodeUrl; + A.onfocus = function () { + this.blur(); + } + A.appendChild(document.createTextNode(this.NodeTxt)); + this.DIV_NodeTxT.appendChild(A); + } + + //-------------------- + this.DIV_NodeBar.appendChild(this.DIV_NodeLevel); + this.DIV_NodeBar.appendChild(this.DIV_NodeFlag); + //this.DIV_NodeBar.appendChild(this.DIV_NodeImg); + this.DIV_NodeBar.appendChild(this.DIV_Checkbox); + this.DIV_NodeBar.appendChild(this.DIV_NodeTxT); +} + +function MyTree(treeId) { + this.TreeBar = document.getElementById(treeId); + if (this.TreeBar == null) { + this.TreeBar = document.createElement("DIV"); + document.documentElement.appendChild(this.TreeBar); + } + + this.TreeBar.className = "treebar"; + + this.IsCheckbox = (arguments.length > 1) ? arguments[1] : false; + this.NodePId = (arguments.length > 2) ? arguments[2] : 0; + this.Nodes = new Array(); + this.Created = false; + this.SelectedNode = null; + + return this; +} + +MyTree.prototype.Add = function (nodeId, nodePId, nodeTxt, nodeUrl, nodeTarget, nodeImg) { + var node = new MyTreeNode(nodeId, nodePId, nodeTxt, nodeUrl, nodeTarget, nodeImg); + this.Nodes.push(node); + + var tree = this; + node.DIV_NodeBar.onmouseover = function () { + if (tree.SelectedNode == this) return false; + this.className = "nodeBarOver"; + } + node.DIV_NodeBar.onmouseout = function () { + if (tree.SelectedNode == this) return false; + this.className = "nodeBar"; + } + node.DIV_NodeBar.onclick = function () { + if (tree.SelectedNode == this) return true; + this.className = "nodeBarSelected"; + if (tree.SelectedNode != null) tree.SelectedNode.className = "nodeBar"; + tree.SelectedNode = this; + } + + this.Created = false; +} + +MyTree.prototype.AddSplitor = function (nodeId, nodePId) { + var node = new Object(); + this.Nodes.push(node); + + node.NodeId = nodeId; + node.NodePId = nodePId; + node.NodeLevel = 0; + node.NodeType = 2; + + //HTML + node.DIV_NodeBar = document.createElement("DIV"); + node.DIV_NodeBar.className = "nodeSplitor"; + + this.Created = false; +} + + +MyTree.prototype.ShowChildren = function (prtNode) { + var node = null; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodePId == prtNode.NodeId) { + node.DIV_NodeBar.style.display = "block"; + node.NodeExpanded = false; + if (node.HasChildren) this.SetNodeFlagStyle(node); + //this.ShowChildren(node); // + } + } +} + +MyTree.prototype.HideChildren = function (prtNode) { + var node = null; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodePId == prtNode.NodeId) { + node.DIV_NodeBar.style.display = "none"; + node.NodeExpanded = false; + if (node.HasChildren) { + this.SetNodeFlagStyle(node); + this.HideChildren(node); // + } + } + } +} + +MyTree.prototype.SetNodeFlagStyle = function (node) { + //MyDebug_WriteLn(node.NodeTxt + " " + node.NodeExpanded); + if (node.NodeExpanded == true) { + node.DIV_NodeFlag.className = "nodeSub"; + } + else { + node.DIV_NodeFlag.className = "nodePlus"; + } +} + +MyTree.prototype.SetCheckbox = function (node) { + switch (node.NodeChecked) { + case 0: + node.DIV_Checkbox.className = "nodeCheck"; + break; + case 1: + node.DIV_Checkbox.className = "nodeChecked"; + break; + case 2: + node.DIV_Checkbox.className = "nodeChecked_part"; + break; + } +} + +MyTree.prototype.ChildrenIsChecked = function (prtNode, nd) { + var node = null; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if ((node.NodeId != nd.NodeId) && (node.NodePId == prtNode.NodeId)) { + //MyDebug_WriteLn("Node="+ node.NodeTxt + ", Checked=" + node.NodeChecked); + if (node.NodeChecked != 1) return false; + this.ChildrenIsChecked(node, prtNode); + } + } + return true; +} + +MyTree.prototype.SetChildrenCheckbox = function (prtNode) { + var node = null; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodePId == prtNode.NodeId) { + node.NodeChecked = prtNode.NodeChecked; + this.SetCheckbox(node); + this.SetChildrenCheckbox(node); + } + } +} + +MyTree.prototype.SetParentCheckbox = function (node) { + var prtNode = null; + var nodeChecked = false; + + //MyDebug_WriteLn("NodeChecked = " + node.NodeChecked); + + for (var i = 0; i < this.Nodes.length; i++) { + prtNode = this.Nodes[i]; + if (prtNode.NodeId == node.NodePId) { + nodeChecked = this.ChildrenIsChecked(prtNode, node); + + //MyDebug_WriteLn("ChildrenIsChecked = " + nodeChecked + " ParentChecked = " + prtNode.NodeChecked); + if (nodeChecked) { + prtNode.NodeChecked = (node.NodeChecked == 1) ? 1 : 2; + } else { + prtNode.NodeChecked = (node.NodeChecked == 1) ? 2 : node.NodeChecked; + } + this.SetCheckbox(prtNode); + this.SetParentCheckbox(prtNode); + } + } +} + +MyTree.prototype.SetNodeStyle = function (node) { + //MyDebug_WriteLn(node.NodeTxt + " = " + node.HasChildren); + + if (node.NodeType != 1) return; + + node.DIV_NodeBar.className = "nodeBar"; + node.DIV_NodeBar.style.display = "block"; + node.DIV_NodeFlag.className = "nodeSub"; + node.NodeExpanded = true; + + var tree = this; + if (node.HasChildren == true) { + node.DIV_NodeFlag.onclick = function () { + node.NodeExpanded = !node.NodeExpanded; + tree.SetNodeFlagStyle(node); + if (node.NodeExpanded) { + tree.ShowChildren(node); + } else { + tree.HideChildren(node); + } + } + } + else { + node.DIV_NodeFlag.className = "nodeFlag"; + } + + //是CHECKBOX + if (this.IsCheckbox) { + node.DIV_Checkbox.className = "nodeCheck"; + node.DIV_Checkbox.style.display = "block"; + node.DIV_Checkbox.onclick = function () { + node.NodeChecked = (node.NodeChecked == 0) ? 1 : 0; + tree.CheckedValues = ""; + tree.SetCheckbox(node); + tree.SetChildrenCheckbox(node); + tree.SetParentCheckbox(node); + } + } else { + node.DIV_Checkbox.style.display = "none"; + } +} + +MyTree.prototype.AddChildren = function (nodePId, nPrtLevel) { + var node = null; + var nChildNum = 0; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodePId == nodePId) { + if (node.NodeType == 1) { + node.NodeLevel = nPrtLevel + 1; + node.DIV_NodeLevel.style.width = (node.NodeLevel * TREENODE_LEVEL_WIDTH) + "px"; + } + this.TreeBar.appendChild(node.DIV_NodeBar); + + nChildNum++; + node.HasChildren = this.AddChildren(node.NodeId, node.NodeLevel) > 0; + this.SetNodeStyle(node); + } + } + return nChildNum; +} + +MyTree.prototype.Create = function () { + //MyClearChildren(this.TreeBar); + + + this.TreeBar.style.display = "block"; + + this.AddChildren(this.NodePId, -1); +} + +MyTree.prototype.Show = function () { + if (this.TreeBar == null) return false; + if (this.Created == false) this.Create(); +} + +MyTree.prototype.ShowAll = function (prtNode) { + var node = null; + this.SetNodeFlagStyle(prtNode); + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodePId == prtNode.NodeId) { + node.NodeExpanded = prtNode.NodeExpanded; + node.DIV_NodeBar.style.display = node.NodeExpanded ? "block" : "none"; + //alert(node.NodeTxt); + if (node.HasChildren) { + this.SetNodeFlagStyle(node); + this.ShowAll(node); + } + } + } +} + +MyTree.prototype.FullExpand = function () { + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodePId == this.NodePId) { + node.NodeExpanded = true; + if (node.HasChildren) this.ShowAll(node); + } + } +} + +MyTree.prototype.FullCollapse = function () { + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodePId == this.NodePId) { + node.NodeExpanded = false; + if (node.HasChildren) this.ShowAll(node); + } + } +} + +MyTree.prototype.GetCheckedProvinceTxts = function () { + if (this.IsCheckbox == false) return ""; + var node = null; + var str = ""; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodeChecked != 0 && node.NodeLevel == 1) { + str += ("," + node.NodeTxt + ""); + } + } + + if (str.length > 0) str = str.substring(1, str.length); + if (str == "") str = ""; + return str; +} + +MyTree.prototype.GetCheckedTxtsByLevel = function (level) { + if (this.IsCheckbox == false) return ""; + var node = null; + var str = ""; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodeChecked != 0 && node.NodeLevel == level) { + if (this.GetParentNodeChecked(node.NodePId) != 1) { + str += (",'" + node.NodeTxt + "'"); + } + } + /*if ((node.NodeChecked == 1 && node.NodeLevel == level && level == 1) + || (node.NodeChecked != 0 && node.NodeLevel == level && level == 2)) { + str += (",'" + node.NodeTxt + "'"); + }*/ + } + + if (str.length > 0) str = str.substring(1, str.length); + if (str == "") str = ""; + return str; +} + +MyTree.prototype.GetCheckedValues = function () { + if (this.IsCheckbox == false) return ""; + var node = null; + var str = ""; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodeChecked == 1) { + str += ("," + node.NodeId); + } + } + + if (str.length > 0) str = str.substring(1, str.length); + return str; +} + +MyTree.prototype.GetParentNodeChecked = function (pId) { + if (!pId) return ""; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodeId == pId) { + return node.NodeChecked; + } + } + return ""; +} + +MyTree.prototype.CheckedAll = function (chked) { + if (this.IsCheckbox == false) return false; + var node = null; + + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + node.NodeChecked = chked ? 1 : 0; + this.SetCheckbox(node); + } + + return true; +} + +MyTree.prototype.GetNode = function (nodeId) { + var node = null; + for (var i = 0; i < this.Nodes.length; i++) { + node = this.Nodes[i]; + if (node.NodeId == nodeId) return node; + } + return null; +} + +MyTree.prototype.SetCheckedNodes = function (nodeIds) { + + this.CheckedAll(false); + + if ((nodeIds == null) && (nodeIds.length < 1)) return false; + var ndIds = nodeIds.split(","); + if (ndIds == null) return false; + + var node = null; + for (var i = 0; i < ndIds.length; i++) { + node = this.GetNode(ndIds[i]); + if (node != null) { + node.NodeChecked = 1; + this.SetCheckbox(node); + } + } +} + +MyTree.prototype.InitChinaRegions = function () { + this.Add(100000, -1, "中国"); + + this.Add(110000, 100000, "北京市"); + this.Add(120000, 100000, "天津市"); + this.Add(130000, 100000, "河北省"); + this.Add(140000, 100000, "山西省"); + this.Add(150000, 100000, "内蒙古自治区"); + this.Add(210000, 100000, "辽宁省"); + this.Add(220000, 100000, "吉林省"); + this.Add(230000, 100000, "黑龙江省"); + this.Add(310000, 100000, "上海市"); + this.Add(320000, 100000, "江苏省"); + this.Add(330000, 100000, "浙江省"); + this.Add(340000, 100000, "安徽省"); + this.Add(350000, 100000, "福建省"); + this.Add(360000, 100000, "江西省"); + this.Add(370000, 100000, "山东省"); + this.Add(410000, 100000, "河南省"); + this.Add(420000, 100000, "湖北省"); + this.Add(430000, 100000, "湖南省"); + this.Add(440000, 100000, "广东省"); + this.Add(442101, 100000, "东沙群岛"); + this.Add(450000, 100000, "广西壮族自治区"); + this.Add(460000, 100000, "海南省"); + this.Add(500000, 100000, "重庆市"); + this.Add(510000, 100000, "四川省"); + this.Add(520000, 100000, "贵州省"); + this.Add(530000, 100000, "云南省"); + this.Add(540000, 100000, "西藏自治区"); + this.Add(610000, 100000, "陕西省"); + this.Add(620000, 100000, "甘肃省"); + this.Add(630000, 100000, "青海省"); + this.Add(640000, 100000, "宁夏回族自治区"); + this.Add(650000, 100000, "新疆维吾尔自治区"); + this.Add(710000, 100000, "台湾省"); + this.Add(810000, 100000, "香港特别行政区"); + this.Add(820000, 100000, "澳门特别行政区"); + this.Add(110101, 110000, "东城区"); + this.Add(110102, 110000, "西城区"); + this.Add(110105, 110000, "朝阳区"); + this.Add(110106, 110000, "丰台区"); + this.Add(110107, 110000, "石景山区"); + this.Add(110108, 110000, "海淀区"); + this.Add(110109, 110000, "门头沟区"); + this.Add(110111, 110000, "房山区"); + this.Add(110112, 110000, "通州区"); + this.Add(110113, 110000, "顺义区"); + this.Add(110114, 110000, "昌平区"); + this.Add(110115, 110000, "大兴区"); + this.Add(110116, 110000, "怀柔区"); + this.Add(110117, 110000, "平谷区"); + this.Add(110118, 110000, "密云区"); + this.Add(110119, 110000, "延庆区"); + this.Add(120101, 120000, "和平区"); + this.Add(120102, 120000, "河东区"); + this.Add(120103, 120000, "河西区"); + this.Add(120104, 120000, "南开区"); + this.Add(120105, 120000, "河北区"); + this.Add(120106, 120000, "红桥区"); + this.Add(120110, 120000, "东丽区"); + this.Add(120111, 120000, "西青区"); + this.Add(120112, 120000, "津南区"); + this.Add(120113, 120000, "北辰区"); + this.Add(120114, 120000, "武清区"); + this.Add(120115, 120000, "宝坻区"); + this.Add(120116, 120000, "滨海新区"); + this.Add(120117, 120000, "宁河区"); + this.Add(120118, 120000, "静海区"); + this.Add(120119, 120000, "蓟州区"); + this.Add(130100, 130000, "石家庄市"); + this.Add(130200, 130000, "唐山市"); + this.Add(130300, 130000, "秦皇岛市"); + this.Add(130400, 130000, "邯郸市"); + this.Add(130500, 130000, "邢台市"); + this.Add(130600, 130000, "保定市"); + this.Add(130700, 130000, "张家口市"); + this.Add(130800, 130000, "承德市"); + this.Add(130900, 130000, "沧州市"); + this.Add(131000, 130000, "廊坊市"); + this.Add(131100, 130000, "衡水市"); + this.Add(130102, 130100, "长安区"); + this.Add(130104, 130100, "桥西区"); + this.Add(130105, 130100, "新华区"); + this.Add(130107, 130100, "井陉矿区"); + this.Add(130108, 130100, "裕华区"); + this.Add(130109, 130100, "藁城区"); + this.Add(130110, 130100, "鹿泉区"); + this.Add(130111, 130100, "栾城区"); + this.Add(130121, 130100, "井陉县"); + this.Add(130123, 130100, "正定县"); + this.Add(130125, 130100, "行唐县"); + this.Add(130126, 130100, "灵寿县"); + this.Add(130127, 130100, "高邑县"); + this.Add(130128, 130100, "深泽县"); + this.Add(130129, 130100, "赞皇县"); + this.Add(130130, 130100, "无极县"); + this.Add(130131, 130100, "平山县"); + this.Add(130132, 130100, "元氏县"); + this.Add(130133, 130100, "赵县"); + this.Add(130181, 130100, "辛集市"); + this.Add(130183, 130100, "晋州市"); + this.Add(130184, 130100, "新乐市"); + this.Add(130202, 130200, "路南区"); + this.Add(130203, 130200, "路北区"); + this.Add(130204, 130200, "古冶区"); + this.Add(130205, 130200, "开平区"); + this.Add(130207, 130200, "丰南区"); + this.Add(130208, 130200, "丰润区"); + this.Add(130209, 130200, "曹妃甸区"); + this.Add(130224, 130200, "滦南县"); + this.Add(130225, 130200, "乐亭县"); + this.Add(130227, 130200, "迁西县"); + this.Add(130229, 130200, "玉田县"); + this.Add(130281, 130200, "遵化市"); + this.Add(130283, 130200, "迁安市"); + this.Add(130284, 130200, "滦州市"); + this.Add(130302, 130300, "海港区"); + this.Add(130303, 130300, "山海关区"); + this.Add(130304, 130300, "北戴河区"); + this.Add(130306, 130300, "抚宁区"); + this.Add(130321, 130300, "青龙满族自治县"); + this.Add(130322, 130300, "昌黎县"); + this.Add(130324, 130300, "卢龙县"); + this.Add(130402, 130400, "邯山区"); + this.Add(130403, 130400, "丛台区"); + this.Add(130404, 130400, "复兴区"); + this.Add(130406, 130400, "峰峰矿区"); + this.Add(130407, 130400, "肥乡区"); + this.Add(130408, 130400, "永年区"); + this.Add(130423, 130400, "临漳县"); + this.Add(130424, 130400, "成安县"); + this.Add(130425, 130400, "大名县"); + this.Add(130426, 130400, "涉县"); + this.Add(130427, 130400, "磁县"); + this.Add(130430, 130400, "邱县"); + this.Add(130431, 130400, "鸡泽县"); + this.Add(130432, 130400, "广平县"); + this.Add(130433, 130400, "馆陶县"); + this.Add(130434, 130400, "魏县"); + this.Add(130435, 130400, "曲周县"); + this.Add(130481, 130400, "武安市"); + this.Add(130502, 130500, "襄都区"); + this.Add(130503, 130500, "信都区"); + this.Add(130505, 130500, "任泽区"); + this.Add(130506, 130500, "南和区"); + this.Add(130522, 130500, "临城县"); + this.Add(130523, 130500, "内丘县"); + this.Add(130524, 130500, "柏乡县"); + this.Add(130525, 130500, "隆尧县"); + this.Add(130528, 130500, "宁晋县"); + this.Add(130529, 130500, "巨鹿县"); + this.Add(130530, 130500, "新河县"); + this.Add(130531, 130500, "广宗县"); + this.Add(130532, 130500, "平乡县"); + this.Add(130533, 130500, "威县"); + this.Add(130534, 130500, "清河县"); + this.Add(130535, 130500, "临西县"); + this.Add(130581, 130500, "南宫市"); + this.Add(130582, 130500, "沙河市"); + this.Add(130602, 130600, "竞秀区"); + this.Add(130606, 130600, "莲池区"); + this.Add(130607, 130600, "满城区"); + this.Add(130608, 130600, "清苑区"); + this.Add(130609, 130600, "徐水区"); + this.Add(130623, 130600, "涞水县"); + this.Add(130624, 130600, "阜平县"); + this.Add(130626, 130600, "定兴县"); + this.Add(130627, 130600, "唐县"); + this.Add(130628, 130600, "高阳县"); + this.Add(130629, 130600, "容城县"); + this.Add(130630, 130600, "涞源县"); + this.Add(130631, 130600, "望都县"); + this.Add(130632, 130600, "安新县"); + this.Add(130633, 130600, "易县"); + this.Add(130634, 130600, "曲阳县"); + this.Add(130635, 130600, "蠡县"); + this.Add(130636, 130600, "顺平县"); + this.Add(130637, 130600, "博野县"); + this.Add(130638, 130600, "雄县"); + this.Add(130681, 130600, "涿州市"); + this.Add(130682, 130600, "定州市"); + this.Add(130683, 130600, "安国市"); + this.Add(130684, 130600, "高碑店市"); + this.Add(130702, 130700, "桥东区"); + this.Add(130703, 130700, "桥西区"); + this.Add(130705, 130700, "宣化区"); + this.Add(130706, 130700, "下花园区"); + this.Add(130708, 130700, "万全区"); + this.Add(130709, 130700, "崇礼区"); + this.Add(130722, 130700, "张北县"); + this.Add(130723, 130700, "康保县"); + this.Add(130724, 130700, "沽源县"); + this.Add(130725, 130700, "尚义县"); + this.Add(130726, 130700, "蔚县"); + this.Add(130727, 130700, "阳原县"); + this.Add(130728, 130700, "怀安县"); + this.Add(130730, 130700, "怀来县"); + this.Add(130731, 130700, "涿鹿县"); + this.Add(130732, 130700, "赤城县"); + this.Add(130802, 130800, "双桥区"); + this.Add(130803, 130800, "双滦区"); + this.Add(130804, 130800, "鹰手营子矿区"); + this.Add(130821, 130800, "承德县"); + this.Add(130822, 130800, "兴隆县"); + this.Add(130824, 130800, "滦平县"); + this.Add(130825, 130800, "隆化县"); + this.Add(130826, 130800, "丰宁满族自治县"); + this.Add(130827, 130800, "宽城满族自治县"); + this.Add(130828, 130800, "围场满族蒙古族自治县"); + this.Add(130881, 130800, "平泉市"); + this.Add(130902, 130900, "新华区"); + this.Add(130903, 130900, "运河区"); + this.Add(130921, 130900, "沧县"); + this.Add(130922, 130900, "青县"); + this.Add(130923, 130900, "东光县"); + this.Add(130924, 130900, "海兴县"); + this.Add(130925, 130900, "盐山县"); + this.Add(130926, 130900, "肃宁县"); + this.Add(130927, 130900, "南皮县"); + this.Add(130928, 130900, "吴桥县"); + this.Add(130929, 130900, "献县"); + this.Add(130930, 130900, "孟村回族自治县"); + this.Add(130981, 130900, "泊头市"); + this.Add(130982, 130900, "任丘市"); + this.Add(130983, 130900, "黄骅市"); + this.Add(130984, 130900, "河间市"); + this.Add(131002, 131000, "安次区"); + this.Add(131003, 131000, "广阳区"); + this.Add(131022, 131000, "固安县"); + this.Add(131023, 131000, "永清县"); + this.Add(131024, 131000, "香河县"); + this.Add(131025, 131000, "大城县"); + this.Add(131026, 131000, "文安县"); + this.Add(131028, 131000, "大厂回族自治县"); + this.Add(131081, 131000, "霸州市"); + this.Add(131082, 131000, "三河市"); + this.Add(131102, 131100, "桃城区"); + this.Add(131103, 131100, "冀州区"); + this.Add(131121, 131100, "枣强县"); + this.Add(131122, 131100, "武邑县"); + this.Add(131123, 131100, "武强县"); + this.Add(131124, 131100, "饶阳县"); + this.Add(131125, 131100, "安平县"); + this.Add(131126, 131100, "故城县"); + this.Add(131127, 131100, "景县"); + this.Add(131128, 131100, "阜城县"); + this.Add(131182, 131100, "深州市"); + this.Add(140100, 140000, "太原市"); + this.Add(140200, 140000, "大同市"); + this.Add(140300, 140000, "阳泉市"); + this.Add(140400, 140000, "长治市"); + this.Add(140500, 140000, "晋城市"); + this.Add(140600, 140000, "朔州市"); + this.Add(140700, 140000, "晋中市"); + this.Add(140800, 140000, "运城市"); + this.Add(140900, 140000, "忻州市"); + this.Add(141000, 140000, "临汾市"); + this.Add(141100, 140000, "吕梁市"); + this.Add(140105, 140100, "小店区"); + this.Add(140106, 140100, "迎泽区"); + this.Add(140107, 140100, "杏花岭区"); + this.Add(140108, 140100, "尖草坪区"); + this.Add(140109, 140100, "万柏林区"); + this.Add(140110, 140100, "晋源区"); + this.Add(140121, 140100, "清徐县"); + this.Add(140122, 140100, "阳曲县"); + this.Add(140123, 140100, "娄烦县"); + this.Add(140181, 140100, "古交市"); + this.Add(140212, 140200, "新荣区"); + this.Add(140213, 140200, "平城区"); + this.Add(140214, 140200, "云冈区"); + this.Add(140215, 140200, "云州区"); + this.Add(140221, 140200, "阳高县"); + this.Add(140222, 140200, "天镇县"); + this.Add(140223, 140200, "广灵县"); + this.Add(140224, 140200, "灵丘县"); + this.Add(140225, 140200, "浑源县"); + this.Add(140226, 140200, "左云县"); + this.Add(140302, 140300, "城区"); + this.Add(140303, 140300, "矿区"); + this.Add(140311, 140300, "郊区"); + this.Add(140321, 140300, "平定县"); + this.Add(140322, 140300, "盂县"); + this.Add(140403, 140400, "潞州区"); + this.Add(140404, 140400, "上党区"); + this.Add(140405, 140400, "屯留区"); + this.Add(140406, 140400, "潞城区"); + this.Add(140423, 140400, "襄垣县"); + this.Add(140425, 140400, "平顺县"); + this.Add(140426, 140400, "黎城县"); + this.Add(140427, 140400, "壶关县"); + this.Add(140428, 140400, "长子县"); + this.Add(140429, 140400, "武乡县"); + this.Add(140430, 140400, "沁县"); + this.Add(140431, 140400, "沁源县"); + this.Add(140502, 140500, "城区"); + this.Add(140521, 140500, "沁水县"); + this.Add(140522, 140500, "阳城县"); + this.Add(140524, 140500, "陵川县"); + this.Add(140525, 140500, "泽州县"); + this.Add(140581, 140500, "高平市"); + this.Add(140602, 140600, "朔城区"); + this.Add(140603, 140600, "平鲁区"); + this.Add(140621, 140600, "山阴县"); + this.Add(140622, 140600, "应县"); + this.Add(140623, 140600, "右玉县"); + this.Add(140681, 140600, "怀仁市"); + this.Add(140702, 140700, "榆次区"); + this.Add(140703, 140700, "太谷区"); + this.Add(140721, 140700, "榆社县"); + this.Add(140722, 140700, "左权县"); + this.Add(140723, 140700, "和顺县"); + this.Add(140724, 140700, "昔阳县"); + this.Add(140725, 140700, "寿阳县"); + this.Add(140727, 140700, "祁县"); + this.Add(140728, 140700, "平遥县"); + this.Add(140729, 140700, "灵石县"); + this.Add(140781, 140700, "介休市"); + this.Add(140802, 140800, "盐湖区"); + this.Add(140821, 140800, "临猗县"); + this.Add(140822, 140800, "万荣县"); + this.Add(140823, 140800, "闻喜县"); + this.Add(140824, 140800, "稷山县"); + this.Add(140825, 140800, "新绛县"); + this.Add(140826, 140800, "绛县"); + this.Add(140827, 140800, "垣曲县"); + this.Add(140828, 140800, "夏县"); + this.Add(140829, 140800, "平陆县"); + this.Add(140830, 140800, "芮城县"); + this.Add(140881, 140800, "永济市"); + this.Add(140882, 140800, "河津市"); + this.Add(140902, 140900, "忻府区"); + this.Add(140921, 140900, "定襄县"); + this.Add(140922, 140900, "五台县"); + this.Add(140923, 140900, "代县"); + this.Add(140924, 140900, "繁峙县"); + this.Add(140925, 140900, "宁武县"); + this.Add(140926, 140900, "静乐县"); + this.Add(140927, 140900, "神池县"); + this.Add(140928, 140900, "五寨县"); + this.Add(140929, 140900, "岢岚县"); + this.Add(140930, 140900, "河曲县"); + this.Add(140931, 140900, "保德县"); + this.Add(140932, 140900, "偏关县"); + this.Add(140981, 140900, "原平市"); + this.Add(141002, 141000, "尧都区"); + this.Add(141021, 141000, "曲沃县"); + this.Add(141022, 141000, "翼城县"); + this.Add(141023, 141000, "襄汾县"); + this.Add(141024, 141000, "洪洞县"); + this.Add(141025, 141000, "古县"); + this.Add(141026, 141000, "安泽县"); + this.Add(141027, 141000, "浮山县"); + this.Add(141028, 141000, "吉县"); + this.Add(141029, 141000, "乡宁县"); + this.Add(141030, 141000, "大宁县"); + this.Add(141031, 141000, "隰县"); + this.Add(141032, 141000, "永和县"); + this.Add(141033, 141000, "蒲县"); + this.Add(141034, 141000, "汾西县"); + this.Add(141081, 141000, "侯马市"); + this.Add(141082, 141000, "霍州市"); + this.Add(141102, 141100, "离石区"); + this.Add(141121, 141100, "文水县"); + this.Add(141122, 141100, "交城县"); + this.Add(141123, 141100, "兴县"); + this.Add(141124, 141100, "临县"); + this.Add(141125, 141100, "柳林县"); + this.Add(141126, 141100, "石楼县"); + this.Add(141127, 141100, "岚县"); + this.Add(141128, 141100, "方山县"); + this.Add(141129, 141100, "中阳县"); + this.Add(141130, 141100, "交口县"); + this.Add(141181, 141100, "孝义市"); + this.Add(141182, 141100, "汾阳市"); + this.Add(150100, 150000, "呼和浩特市"); + this.Add(150200, 150000, "包头市"); + this.Add(150300, 150000, "乌海市"); + this.Add(150400, 150000, "赤峰市"); + this.Add(150500, 150000, "通辽市"); + this.Add(150600, 150000, "鄂尔多斯市"); + this.Add(150700, 150000, "呼伦贝尔市"); + this.Add(150800, 150000, "巴彦淖尔市"); + this.Add(150900, 150000, "乌兰察布市"); + this.Add(152200, 150000, "兴安盟"); + this.Add(152500, 150000, "锡林郭勒盟"); + this.Add(152900, 150000, "阿拉善盟"); + this.Add(150102, 150100, "新城区"); + this.Add(150103, 150100, "回民区"); + this.Add(150104, 150100, "玉泉区"); + this.Add(150105, 150100, "赛罕区"); + this.Add(150121, 150100, "土默特左旗"); + this.Add(150122, 150100, "托克托县"); + this.Add(150123, 150100, "和林格尔县"); + this.Add(150124, 150100, "清水河县"); + this.Add(150125, 150100, "武川县"); + this.Add(150202, 150200, "东河区"); + this.Add(150203, 150200, "昆都仑区"); + this.Add(150204, 150200, "青山区"); + this.Add(150205, 150200, "石拐区"); + this.Add(150206, 150200, "白云鄂博矿区"); + this.Add(150207, 150200, "九原区"); + this.Add(150221, 150200, "土默特右旗"); + this.Add(150222, 150200, "固阳县"); + this.Add(150223, 150200, "达尔罕茂明安联合旗"); + this.Add(150302, 150300, "海勃湾区"); + this.Add(150303, 150300, "海南区"); + this.Add(150304, 150300, "乌达区"); + this.Add(150402, 150400, "红山区"); + this.Add(150403, 150400, "元宝山区"); + this.Add(150404, 150400, "松山区"); + this.Add(150421, 150400, "阿鲁科尔沁旗"); + this.Add(150422, 150400, "巴林左旗"); + this.Add(150423, 150400, "巴林右旗"); + this.Add(150424, 150400, "林西县"); + this.Add(150425, 150400, "克什克腾旗"); + this.Add(150426, 150400, "翁牛特旗"); + this.Add(150428, 150400, "喀喇沁旗"); + this.Add(150429, 150400, "宁城县"); + this.Add(150430, 150400, "敖汉旗"); + this.Add(150502, 150500, "科尔沁区"); + this.Add(150521, 150500, "科尔沁左翼中旗"); + this.Add(150522, 150500, "科尔沁左翼后旗"); + this.Add(150523, 150500, "开鲁县"); + this.Add(150524, 150500, "库伦旗"); + this.Add(150525, 150500, "奈曼旗"); + this.Add(150526, 150500, "扎鲁特旗"); + this.Add(150581, 150500, "霍林郭勒市"); + this.Add(150602, 150600, "东胜区"); + this.Add(150603, 150600, "康巴什区"); + this.Add(150621, 150600, "达拉特旗"); + this.Add(150622, 150600, "准格尔旗"); + this.Add(150623, 150600, "鄂托克前旗"); + this.Add(150624, 150600, "鄂托克旗"); + this.Add(150625, 150600, "杭锦旗"); + this.Add(150626, 150600, "乌审旗"); + this.Add(150627, 150600, "伊金霍洛旗"); + this.Add(150702, 150700, "海拉尔区"); + this.Add(150703, 150700, "扎赉诺尔区"); + this.Add(150721, 150700, "阿荣旗"); + this.Add(150722, 150700, "莫力达瓦达斡尔族自治旗"); + this.Add(150723, 150700, "鄂伦春自治旗"); + this.Add(150724, 150700, "鄂温克族自治旗"); + this.Add(150725, 150700, "陈巴尔虎旗"); + this.Add(150726, 150700, "新巴尔虎左旗"); + this.Add(150727, 150700, "新巴尔虎右旗"); + this.Add(150781, 150700, "满洲里市"); + this.Add(150782, 150700, "牙克石市"); + this.Add(150783, 150700, "扎兰屯市"); + this.Add(150784, 150700, "额尔古纳市"); + this.Add(150785, 150700, "根河市"); + this.Add(150802, 150800, "临河区"); + this.Add(150821, 150800, "五原县"); + this.Add(150822, 150800, "磴口县"); + this.Add(150823, 150800, "乌拉特前旗"); + this.Add(150824, 150800, "乌拉特中旗"); + this.Add(150825, 150800, "乌拉特后旗"); + this.Add(150826, 150800, "杭锦后旗"); + this.Add(150902, 150900, "集宁区"); + this.Add(150921, 150900, "卓资县"); + this.Add(150922, 150900, "化德县"); + this.Add(150923, 150900, "商都县"); + this.Add(150924, 150900, "兴和县"); + this.Add(150925, 150900, "凉城县"); + this.Add(150926, 150900, "察哈尔右翼前旗"); + this.Add(150927, 150900, "察哈尔右翼中旗"); + this.Add(150928, 150900, "察哈尔右翼后旗"); + this.Add(150929, 150900, "四子王旗"); + this.Add(150981, 150900, "丰镇市"); + this.Add(152201, 152200, "乌兰浩特市"); + this.Add(152202, 152200, "阿尔山市"); + this.Add(152221, 152200, "科尔沁右翼前旗"); + this.Add(152222, 152200, "科尔沁右翼中旗"); + this.Add(152223, 152200, "扎赉特旗"); + this.Add(152224, 152200, "突泉县"); + this.Add(152501, 152500, "二连浩特市"); + this.Add(152502, 152500, "锡林浩特市"); + this.Add(152522, 152500, "阿巴嘎旗"); + this.Add(152523, 152500, "苏尼特左旗"); + this.Add(152524, 152500, "苏尼特右旗"); + this.Add(152525, 152500, "东乌珠穆沁旗"); + this.Add(152526, 152500, "西乌珠穆沁旗"); + this.Add(152527, 152500, "太仆寺旗"); + this.Add(152528, 152500, "镶黄旗"); + this.Add(152529, 152500, "正镶白旗"); + this.Add(152530, 152500, "正蓝旗"); + this.Add(152531, 152500, "多伦县"); + this.Add(152921, 152900, "阿拉善左旗"); + this.Add(152922, 152900, "阿拉善右旗"); + this.Add(152923, 152900, "额济纳旗"); + this.Add(210100, 210000, "沈阳市"); + this.Add(210200, 210000, "大连市"); + this.Add(210300, 210000, "鞍山市"); + this.Add(210400, 210000, "抚顺市"); + this.Add(210500, 210000, "本溪市"); + this.Add(210600, 210000, "丹东市"); + this.Add(210700, 210000, "锦州市"); + this.Add(210800, 210000, "营口市"); + this.Add(210900, 210000, "阜新市"); + this.Add(211000, 210000, "辽阳市"); + this.Add(211100, 210000, "盘锦市"); + this.Add(211200, 210000, "铁岭市"); + this.Add(211300, 210000, "朝阳市"); + this.Add(211400, 210000, "葫芦岛市"); + this.Add(210102, 210100, "和平区"); + this.Add(210103, 210100, "沈河区"); + this.Add(210104, 210100, "大东区"); + this.Add(210105, 210100, "皇姑区"); + this.Add(210106, 210100, "铁西区"); + this.Add(210111, 210100, "苏家屯区"); + this.Add(210112, 210100, "浑南区"); + this.Add(210113, 210100, "沈北新区"); + this.Add(210114, 210100, "于洪区"); + this.Add(210115, 210100, "辽中区"); + this.Add(210123, 210100, "康平县"); + this.Add(210124, 210100, "法库县"); + this.Add(210181, 210100, "新民市"); + this.Add(210202, 210200, "中山区"); + this.Add(210203, 210200, "西岗区"); + this.Add(210204, 210200, "沙河口区"); + this.Add(210211, 210200, "甘井子区"); + this.Add(210212, 210200, "旅顺口区"); + this.Add(210213, 210200, "金州区"); + this.Add(210214, 210200, "普兰店区"); + this.Add(210224, 210200, "长海县"); + this.Add(210281, 210200, "瓦房店市"); + this.Add(210283, 210200, "庄河市"); + this.Add(210302, 210300, "铁东区"); + this.Add(210303, 210300, "铁西区"); + this.Add(210304, 210300, "立山区"); + this.Add(210311, 210300, "千山区"); + this.Add(210321, 210300, "台安县"); + this.Add(210323, 210300, "岫岩满族自治县"); + this.Add(210381, 210300, "海城市"); + this.Add(210402, 210400, "新抚区"); + this.Add(210403, 210400, "东洲区"); + this.Add(210404, 210400, "望花区"); + this.Add(210411, 210400, "顺城区"); + this.Add(210421, 210400, "抚顺县"); + this.Add(210422, 210400, "新宾满族自治县"); + this.Add(210423, 210400, "清原满族自治县"); + this.Add(210502, 210500, "平山区"); + this.Add(210503, 210500, "溪湖区"); + this.Add(210504, 210500, "明山区"); + this.Add(210505, 210500, "南芬区"); + this.Add(210521, 210500, "本溪满族自治县"); + this.Add(210522, 210500, "桓仁满族自治县"); + this.Add(210602, 210600, "元宝区"); + this.Add(210603, 210600, "振兴区"); + this.Add(210604, 210600, "振安区"); + this.Add(210624, 210600, "宽甸满族自治县"); + this.Add(210681, 210600, "东港市"); + this.Add(210682, 210600, "凤城市"); + this.Add(210702, 210700, "古塔区"); + this.Add(210703, 210700, "凌河区"); + this.Add(210711, 210700, "太和区"); + this.Add(210726, 210700, "黑山县"); + this.Add(210727, 210700, "义县"); + this.Add(210781, 210700, "凌海市"); + this.Add(210782, 210700, "北镇市"); + this.Add(210802, 210800, "站前区"); + this.Add(210803, 210800, "西市区"); + this.Add(210804, 210800, "鲅鱼圈区"); + this.Add(210811, 210800, "老边区"); + this.Add(210881, 210800, "盖州市"); + this.Add(210882, 210800, "大石桥市"); + this.Add(210902, 210900, "海州区"); + this.Add(210903, 210900, "新邱区"); + this.Add(210904, 210900, "太平区"); + this.Add(210905, 210900, "清河门区"); + this.Add(210911, 210900, "细河区"); + this.Add(210921, 210900, "阜新蒙古族自治县"); + this.Add(210922, 210900, "彰武县"); + this.Add(211002, 211000, "白塔区"); + this.Add(211003, 211000, "文圣区"); + this.Add(211004, 211000, "宏伟区"); + this.Add(211005, 211000, "弓长岭区"); + this.Add(211011, 211000, "太子河区"); + this.Add(211021, 211000, "辽阳县"); + this.Add(211081, 211000, "灯塔市"); + this.Add(211102, 211100, "双台子区"); + this.Add(211103, 211100, "兴隆台区"); + this.Add(211104, 211100, "大洼区"); + this.Add(211122, 211100, "盘山县"); + this.Add(211202, 211200, "银州区"); + this.Add(211204, 211200, "清河区"); + this.Add(211221, 211200, "铁岭县"); + this.Add(211223, 211200, "西丰县"); + this.Add(211224, 211200, "昌图县"); + this.Add(211281, 211200, "调兵山市"); + this.Add(211282, 211200, "开原市"); + this.Add(211302, 211300, "双塔区"); + this.Add(211303, 211300, "龙城区"); + this.Add(211321, 211300, "朝阳县"); + this.Add(211322, 211300, "建平县"); + this.Add(211324, 211300, "喀喇沁左翼蒙古族自治县"); + this.Add(211381, 211300, "北票市"); + this.Add(211382, 211300, "凌源市"); + this.Add(211402, 211400, "连山区"); + this.Add(211403, 211400, "龙港区"); + this.Add(211404, 211400, "南票区"); + this.Add(211421, 211400, "绥中县"); + this.Add(211422, 211400, "建昌县"); + this.Add(211481, 211400, "兴城市"); + this.Add(220100, 220000, "长春市"); + this.Add(220184, 220000, "公主岭市"); + this.Add(220200, 220000, "吉林市"); + this.Add(220400, 220000, "辽源市"); + this.Add(220500, 220000, "通化市"); + this.Add(220600, 220000, "白山市"); + this.Add(220700, 220000, "松原市"); + this.Add(220800, 220000, "白城市"); + this.Add(222400, 220000, "延边朝鲜族自治州"); + this.Add(220102, 220100, "南关区"); + this.Add(220103, 220100, "宽城区"); + this.Add(220104, 220100, "朝阳区"); + this.Add(220105, 220100, "二道区"); + this.Add(220106, 220100, "绿园区"); + this.Add(220112, 220100, "双阳区"); + this.Add(220113, 220100, "九台区"); + this.Add(220122, 220100, "农安县"); + this.Add(220182, 220100, "榆树市"); + this.Add(220183, 220100, "德惠市"); + this.Add(220300, 220184, "四平市"); + this.Add(220302, 220184, "铁西区"); + this.Add(220303, 220184, "铁东区"); + this.Add(220322, 220184, "梨树县"); + this.Add(220323, 220184, "伊通满族自治县"); + this.Add(220382, 220184, "双辽市"); + this.Add(220202, 220200, "昌邑区"); + this.Add(220203, 220200, "龙潭区"); + this.Add(220204, 220200, "船营区"); + this.Add(220211, 220200, "丰满区"); + this.Add(220221, 220200, "永吉县"); + this.Add(220281, 220200, "蛟河市"); + this.Add(220282, 220200, "桦甸市"); + this.Add(220283, 220200, "舒兰市"); + this.Add(220284, 220200, "磐石市"); + this.Add(220402, 220400, "龙山区"); + this.Add(220403, 220400, "西安区"); + this.Add(220421, 220400, "东丰县"); + this.Add(220422, 220400, "东辽县"); + this.Add(220502, 220500, "东昌区"); + this.Add(220503, 220500, "二道江区"); + this.Add(220521, 220500, "通化县"); + this.Add(220523, 220500, "辉南县"); + this.Add(220524, 220500, "柳河县"); + this.Add(220581, 220500, "梅河口市"); + this.Add(220582, 220500, "集安市"); + this.Add(220602, 220600, "浑江区"); + this.Add(220605, 220600, "江源区"); + this.Add(220621, 220600, "抚松县"); + this.Add(220622, 220600, "靖宇县"); + this.Add(220623, 220600, "长白朝鲜族自治县"); + this.Add(220681, 220600, "临江市"); + this.Add(220702, 220700, "宁江区"); + this.Add(220721, 220700, "前郭尔罗斯蒙古族自治县"); + this.Add(220722, 220700, "长岭县"); + this.Add(220723, 220700, "乾安县"); + this.Add(220781, 220700, "扶余市"); + this.Add(220802, 220800, "洮北区"); + this.Add(220821, 220800, "镇赉县"); + this.Add(220822, 220800, "通榆县"); + this.Add(220881, 220800, "洮南市"); + this.Add(220882, 220800, "大安市"); + this.Add(222401, 222400, "延吉市"); + this.Add(222402, 222400, "图们市"); + this.Add(222403, 222400, "敦化市"); + this.Add(222404, 222400, "珲春市"); + this.Add(222405, 222400, "龙井市"); + this.Add(222406, 222400, "和龙市"); + this.Add(222424, 222400, "汪清县"); + this.Add(222426, 222400, "安图县"); + this.Add(230100, 230000, "哈尔滨市"); + this.Add(230200, 230000, "齐齐哈尔市"); + this.Add(230300, 230000, "鸡西市"); + this.Add(230400, 230000, "鹤岗市"); + this.Add(230500, 230000, "双鸭山市"); + this.Add(230600, 230000, "大庆市"); + this.Add(230700, 230000, "伊春市"); + this.Add(230800, 230000, "佳木斯市"); + this.Add(230900, 230000, "七台河市"); + this.Add(231000, 230000, "牡丹江市"); + this.Add(231100, 230000, "黑河市"); + this.Add(231200, 230000, "绥化市"); + this.Add(232700, 230000, "大兴安岭地区"); + this.Add(230102, 230100, "道里区"); + this.Add(230103, 230100, "南岗区"); + this.Add(230104, 230100, "道外区"); + this.Add(230108, 230100, "平房区"); + this.Add(230109, 230100, "松北区"); + this.Add(230110, 230100, "香坊区"); + this.Add(230111, 230100, "呼兰区"); + this.Add(230112, 230100, "阿城区"); + this.Add(230113, 230100, "双城区"); + this.Add(230123, 230100, "依兰县"); + this.Add(230124, 230100, "方正县"); + this.Add(230125, 230100, "宾县"); + this.Add(230126, 230100, "巴彦县"); + this.Add(230127, 230100, "木兰县"); + this.Add(230128, 230100, "通河县"); + this.Add(230129, 230100, "延寿县"); + this.Add(230183, 230100, "尚志市"); + this.Add(230184, 230100, "五常市"); + this.Add(230202, 230200, "龙沙区"); + this.Add(230203, 230200, "建华区"); + this.Add(230204, 230200, "铁锋区"); + this.Add(230205, 230200, "昂昂溪区"); + this.Add(230206, 230200, "富拉尔基区"); + this.Add(230207, 230200, "碾子山区"); + this.Add(230208, 230200, "梅里斯达斡尔族区"); + this.Add(230221, 230200, "龙江县"); + this.Add(230223, 230200, "依安县"); + this.Add(230224, 230200, "泰来县"); + this.Add(230225, 230200, "甘南县"); + this.Add(230227, 230200, "富裕县"); + this.Add(230229, 230200, "克山县"); + this.Add(230230, 230200, "克东县"); + this.Add(230231, 230200, "拜泉县"); + this.Add(230281, 230200, "讷河市"); + this.Add(230302, 230300, "鸡冠区"); + this.Add(230303, 230300, "恒山区"); + this.Add(230304, 230300, "滴道区"); + this.Add(230305, 230300, "梨树区"); + this.Add(230306, 230300, "城子河区"); + this.Add(230307, 230300, "麻山区"); + this.Add(230321, 230300, "鸡东县"); + this.Add(230381, 230300, "虎林市"); + this.Add(230382, 230300, "密山市"); + this.Add(230402, 230400, "向阳区"); + this.Add(230403, 230400, "工农区"); + this.Add(230404, 230400, "南山区"); + this.Add(230405, 230400, "兴安区"); + this.Add(230406, 230400, "东山区"); + this.Add(230407, 230400, "兴山区"); + this.Add(230421, 230400, "萝北县"); + this.Add(230422, 230400, "绥滨县"); + this.Add(230502, 230500, "尖山区"); + this.Add(230503, 230500, "岭东区"); + this.Add(230505, 230500, "四方台区"); + this.Add(230506, 230500, "宝山区"); + this.Add(230521, 230500, "集贤县"); + this.Add(230522, 230500, "友谊县"); + this.Add(230523, 230500, "宝清县"); + this.Add(230524, 230500, "饶河县"); + this.Add(230602, 230600, "萨尔图区"); + this.Add(230603, 230600, "龙凤区"); + this.Add(230604, 230600, "让胡路区"); + this.Add(230605, 230600, "红岗区"); + this.Add(230606, 230600, "大同区"); + this.Add(230621, 230600, "肇州县"); + this.Add(230622, 230600, "肇源县"); + this.Add(230623, 230600, "林甸县"); + this.Add(230624, 230600, "杜尔伯特蒙古族自治县"); + this.Add(230712, 230700, "汤旺河区"); + this.Add(230717, 230700, "伊美区"); + this.Add(230718, 230700, "乌翠区"); + this.Add(230719, 230700, "友好区"); + this.Add(230722, 230700, "嘉荫县"); + this.Add(230723, 230700, "汤旺县"); + this.Add(230724, 230700, "丰林县"); + this.Add(230725, 230700, "大箐山县"); + this.Add(230726, 230700, "南岔县"); + this.Add(230751, 230700, "金林区"); + this.Add(230781, 230700, "铁力市"); + this.Add(230803, 230800, "向阳区"); + this.Add(230804, 230800, "前进区"); + this.Add(230805, 230800, "东风区"); + this.Add(230811, 230800, "郊区"); + this.Add(230822, 230800, "桦南县"); + this.Add(230826, 230800, "桦川县"); + this.Add(230828, 230800, "汤原县"); + this.Add(230881, 230800, "同江市"); + this.Add(230882, 230800, "富锦市"); + this.Add(230883, 230800, "抚远市"); + this.Add(230902, 230900, "新兴区"); + this.Add(230903, 230900, "桃山区"); + this.Add(230904, 230900, "茄子河区"); + this.Add(230921, 230900, "勃利县"); + this.Add(231002, 231000, "东安区"); + this.Add(231003, 231000, "阳明区"); + this.Add(231004, 231000, "爱民区"); + this.Add(231005, 231000, "西安区"); + this.Add(231025, 231000, "林口县"); + this.Add(231081, 231000, "绥芬河市"); + this.Add(231083, 231000, "海林市"); + this.Add(231084, 231000, "宁安市"); + this.Add(231085, 231000, "穆棱市"); + this.Add(231086, 231000, "东宁市"); + this.Add(231102, 231100, "爱辉区"); + this.Add(231123, 231100, "逊克县"); + this.Add(231124, 231100, "孙吴县"); + this.Add(231181, 231100, "北安市"); + this.Add(231182, 231100, "五大连池市"); + this.Add(231183, 231100, "嫩江市"); + this.Add(231202, 231200, "北林区"); + this.Add(231221, 231200, "望奎县"); + this.Add(231222, 231200, "兰西县"); + this.Add(231223, 231200, "青冈县"); + this.Add(231224, 231200, "庆安县"); + this.Add(231225, 231200, "明水县"); + this.Add(231226, 231200, "绥棱县"); + this.Add(231281, 231200, "安达市"); + this.Add(231282, 231200, "肇东市"); + this.Add(231283, 231200, "海伦市"); + this.Add(232701, 232700, "漠河市"); + this.Add(232718, 232700, "加格达奇区"); + this.Add(232721, 232700, "呼玛县"); + this.Add(232722, 232700, "塔河县"); + this.Add(310101, 310000, "黄浦区"); + this.Add(310104, 310000, "徐汇区"); + this.Add(310105, 310000, "长宁区"); + this.Add(310106, 310000, "静安区"); + this.Add(310107, 310000, "普陀区"); + this.Add(310109, 310000, "虹口区"); + this.Add(310110, 310000, "杨浦区"); + this.Add(310112, 310000, "闵行区"); + this.Add(310113, 310000, "宝山区"); + this.Add(310114, 310000, "嘉定区"); + this.Add(310115, 310000, "浦东新区"); + this.Add(310116, 310000, "金山区"); + this.Add(310117, 310000, "松江区"); + this.Add(310118, 310000, "青浦区"); + this.Add(310120, 310000, "奉贤区"); + this.Add(310151, 310000, "崇明区"); + this.Add(320100, 320000, "南京市"); + this.Add(320200, 320000, "无锡市"); + this.Add(320300, 320000, "徐州市"); + this.Add(320400, 320000, "常州市"); + this.Add(320500, 320000, "苏州市"); + this.Add(320600, 320000, "南通市"); + this.Add(320700, 320000, "连云港市"); + this.Add(320800, 320000, "淮安市"); + this.Add(320900, 320000, "盐城市"); + this.Add(321000, 320000, "扬州市"); + this.Add(321100, 320000, "镇江市"); + this.Add(321200, 320000, "泰州市"); + this.Add(321300, 320000, "宿迁市"); + this.Add(320102, 320100, "玄武区"); + this.Add(320104, 320100, "秦淮区"); + this.Add(320105, 320100, "建邺区"); + this.Add(320106, 320100, "鼓楼区"); + this.Add(320111, 320100, "浦口区"); + this.Add(320113, 320100, "栖霞区"); + this.Add(320114, 320100, "雨花台区"); + this.Add(320115, 320100, "江宁区"); + this.Add(320116, 320100, "六合区"); + this.Add(320117, 320100, "溧水区"); + this.Add(320118, 320100, "高淳区"); + this.Add(320205, 320200, "锡山区"); + this.Add(320206, 320200, "惠山区"); + this.Add(320211, 320200, "滨湖区"); + this.Add(320213, 320200, "梁溪区"); + this.Add(320214, 320200, "新吴区"); + this.Add(320281, 320200, "江阴市"); + this.Add(320282, 320200, "宜兴市"); + this.Add(320302, 320300, "鼓楼区"); + this.Add(320303, 320300, "云龙区"); + this.Add(320305, 320300, "贾汪区"); + this.Add(320311, 320300, "泉山区"); + this.Add(320312, 320300, "铜山区"); + this.Add(320321, 320300, "丰县"); + this.Add(320322, 320300, "沛县"); + this.Add(320324, 320300, "睢宁县"); + this.Add(320381, 320300, "新沂市"); + this.Add(320382, 320300, "邳州市"); + this.Add(320402, 320400, "天宁区"); + this.Add(320404, 320400, "钟楼区"); + this.Add(320411, 320400, "新北区"); + this.Add(320412, 320400, "武进区"); + this.Add(320413, 320400, "金坛区"); + this.Add(320481, 320400, "溧阳市"); + this.Add(320505, 320500, "虎丘区"); + this.Add(320506, 320500, "吴中区"); + this.Add(320507, 320500, "相城区"); + this.Add(320508, 320500, "姑苏区"); + this.Add(320509, 320500, "吴江区"); + this.Add(320571, 320500, "苏州工业园区"); + this.Add(320581, 320500, "常熟市"); + this.Add(320582, 320500, "张家港市"); + this.Add(320583, 320500, "昆山市"); + this.Add(320585, 320500, "太仓市"); + this.Add(320602, 320600, "崇川区"); + this.Add(320612, 320600, "通州区"); + this.Add(320623, 320600, "如东县"); + this.Add(320681, 320600, "启东市"); + this.Add(320682, 320600, "如皋市"); + this.Add(320684, 320600, "海门区"); + this.Add(320685, 320600, "海安市"); + this.Add(320703, 320700, "连云区"); + this.Add(320706, 320700, "海州区"); + this.Add(320707, 320700, "赣榆区"); + this.Add(320722, 320700, "东海县"); + this.Add(320723, 320700, "灌云县"); + this.Add(320724, 320700, "灌南县"); + this.Add(320803, 320800, "淮安区"); + this.Add(320804, 320800, "淮阴区"); + this.Add(320812, 320800, "清江浦区"); + this.Add(320813, 320800, "洪泽区"); + this.Add(320826, 320800, "涟水县"); + this.Add(320830, 320800, "盱眙县"); + this.Add(320831, 320800, "金湖县"); + this.Add(320902, 320900, "亭湖区"); + this.Add(320903, 320900, "盐都区"); + this.Add(320904, 320900, "大丰区"); + this.Add(320921, 320900, "响水县"); + this.Add(320922, 320900, "滨海县"); + this.Add(320923, 320900, "阜宁县"); + this.Add(320924, 320900, "射阳县"); + this.Add(320925, 320900, "建湖县"); + this.Add(320981, 320900, "东台市"); + this.Add(321002, 321000, "广陵区"); + this.Add(321003, 321000, "邗江区"); + this.Add(321012, 321000, "江都区"); + this.Add(321023, 321000, "宝应县"); + this.Add(321081, 321000, "仪征市"); + this.Add(321084, 321000, "高邮市"); + this.Add(321102, 321100, "京口区"); + this.Add(321111, 321100, "润州区"); + this.Add(321112, 321100, "丹徒区"); + this.Add(321181, 321100, "丹阳市"); + this.Add(321182, 321100, "扬中市"); + this.Add(321183, 321100, "句容市"); + this.Add(321202, 321200, "海陵区"); + this.Add(321203, 321200, "高港区"); + this.Add(321204, 321200, "姜堰区"); + this.Add(321281, 321200, "兴化市"); + this.Add(321282, 321200, "靖江市"); + this.Add(321283, 321200, "泰兴市"); + this.Add(321302, 321300, "宿城区"); + this.Add(321311, 321300, "宿豫区"); + this.Add(321322, 321300, "沭阳县"); + this.Add(321323, 321300, "泗阳县"); + this.Add(321324, 321300, "泗洪县"); + this.Add(330100, 330000, "杭州市"); + this.Add(330200, 330000, "宁波市"); + this.Add(330300, 330000, "温州市"); + this.Add(330400, 330000, "嘉兴市"); + this.Add(330500, 330000, "湖州市"); + this.Add(330600, 330000, "绍兴市"); + this.Add(330700, 330000, "金华市"); + this.Add(330800, 330000, "衢州市"); + this.Add(330900, 330000, "舟山市"); + this.Add(331000, 330000, "台州市"); + this.Add(331100, 330000, "丽水市"); + this.Add(330102, 330100, "上城区"); + this.Add(330103, 330100, "下城区"); + this.Add(330104, 330100, "江干区"); + this.Add(330105, 330100, "拱墅区"); + this.Add(330106, 330100, "西湖区"); + this.Add(330108, 330100, "滨江区"); + this.Add(330109, 330100, "萧山区"); + this.Add(330110, 330100, "余杭区"); + this.Add(330111, 330100, "富阳区"); + this.Add(330112, 330100, "临安区"); + this.Add(330122, 330100, "桐庐县"); + this.Add(330127, 330100, "淳安县"); + this.Add(330182, 330100, "建德市"); + this.Add(330203, 330200, "海曙区"); + this.Add(330205, 330200, "江北区"); + this.Add(330206, 330200, "北仑区"); + this.Add(330211, 330200, "镇海区"); + this.Add(330212, 330200, "鄞州区"); + this.Add(330213, 330200, "奉化区"); + this.Add(330225, 330200, "象山县"); + this.Add(330226, 330200, "宁海县"); + this.Add(330281, 330200, "余姚市"); + this.Add(330282, 330200, "慈溪市"); + this.Add(330302, 330300, "鹿城区"); + this.Add(330303, 330300, "龙湾区"); + this.Add(330304, 330300, "瓯海区"); + this.Add(330305, 330300, "洞头区"); + this.Add(330324, 330300, "永嘉县"); + this.Add(330326, 330300, "平阳县"); + this.Add(330327, 330300, "苍南县"); + this.Add(330328, 330300, "文成县"); + this.Add(330329, 330300, "泰顺县"); + this.Add(330381, 330300, "瑞安市"); + this.Add(330382, 330300, "乐清市"); + this.Add(330383, 330300, "龙港市"); + this.Add(330402, 330400, "南湖区"); + this.Add(330411, 330400, "秀洲区"); + this.Add(330421, 330400, "嘉善县"); + this.Add(330424, 330400, "海盐县"); + this.Add(330481, 330400, "海宁市"); + this.Add(330482, 330400, "平湖市"); + this.Add(330483, 330400, "桐乡市"); + this.Add(330502, 330500, "吴兴区"); + this.Add(330503, 330500, "南浔区"); + this.Add(330521, 330500, "德清县"); + this.Add(330522, 330500, "长兴县"); + this.Add(330523, 330500, "安吉县"); + this.Add(330602, 330600, "越城区"); + this.Add(330603, 330600, "柯桥区"); + this.Add(330604, 330600, "上虞区"); + this.Add(330624, 330600, "新昌县"); + this.Add(330681, 330600, "诸暨市"); + this.Add(330683, 330600, "嵊州市"); + this.Add(330702, 330700, "婺城区"); + this.Add(330703, 330700, "金东区"); + this.Add(330723, 330700, "武义县"); + this.Add(330726, 330700, "浦江县"); + + this.Add(330727, 330700, "磐安县"); + this.Add(330781, 330700, "兰溪市"); + this.Add(330782, 330700, "义乌市"); + this.Add(330783, 330700, "东阳市"); + this.Add(330784, 330700, "永康市"); + this.Add(330802, 330800, "柯城区"); + this.Add(330803, 330800, "衢江区"); + this.Add(330822, 330800, "常山县"); + this.Add(330824, 330800, "开化县"); + this.Add(330825, 330800, "龙游县"); + this.Add(330881, 330800, "江山市"); + this.Add(330902, 330900, "定海区"); + this.Add(330903, 330900, "普陀区"); + this.Add(330921, 330900, "岱山县"); + this.Add(330922, 330900, "嵊泗县"); + this.Add(331002, 331000, "椒江区"); + this.Add(331003, 331000, "黄岩区"); + this.Add(331004, 331000, "路桥区"); + this.Add(331022, 331000, "三门县"); + this.Add(331023, 331000, "天台县"); + this.Add(331024, 331000, "仙居县"); + this.Add(331081, 331000, "温岭市"); + this.Add(331082, 331000, "临海市"); + this.Add(331083, 331000, "玉环市"); + this.Add(331102, 331100, "莲都区"); + this.Add(331121, 331100, "青田县"); + this.Add(331122, 331100, "缙云县"); + this.Add(331123, 331100, "遂昌县"); + this.Add(331124, 331100, "松阳县"); + this.Add(331125, 331100, "云和县"); + this.Add(331126, 331100, "庆元县"); + this.Add(331127, 331100, "景宁畲族自治县"); + this.Add(331181, 331100, "龙泉市"); + this.Add(340100, 340000, "合肥市"); + this.Add(340200, 340000, "芜湖市"); + this.Add(340300, 340000, "蚌埠市"); + this.Add(340400, 340000, "淮南市"); + this.Add(340500, 340000, "马鞍山市"); + this.Add(340600, 340000, "淮北市"); + this.Add(340700, 340000, "铜陵市"); + this.Add(340800, 340000, "安庆市"); + this.Add(341000, 340000, "黄山市"); + this.Add(341100, 340000, "滁州市"); + this.Add(341200, 340000, "阜阳市"); + this.Add(341300, 340000, "宿州市"); + this.Add(341500, 340000, "六安市"); + this.Add(341600, 340000, "亳州市"); + this.Add(341700, 340000, "池州市"); + this.Add(341800, 340000, "宣城市"); + this.Add(340102, 340100, "瑶海区"); + this.Add(340103, 340100, "庐阳区"); + this.Add(340104, 340100, "蜀山区"); + this.Add(340111, 340100, "包河区"); + this.Add(340121, 340100, "长丰县"); + this.Add(340122, 340100, "肥东县"); + this.Add(340123, 340100, "肥西县"); + this.Add(340124, 340100, "庐江县"); + this.Add(340181, 340100, "巢湖市"); + this.Add(340202, 340200, "镜湖区"); + this.Add(340203, 340200, "弋江区"); + this.Add(340207, 340200, "鸠江区"); + this.Add(340221, 340200, "湾沚区"); + this.Add(340222, 340200, "繁昌区"); + this.Add(340223, 340200, "南陵县"); + this.Add(340281, 340200, "无为市"); + this.Add(340302, 340300, "龙子湖区"); + this.Add(340303, 340300, "蚌山区"); + this.Add(340304, 340300, "禹会区"); + this.Add(340311, 340300, "淮上区"); + this.Add(340321, 340300, "怀远县"); + this.Add(340322, 340300, "五河县"); + this.Add(340323, 340300, "固镇县"); + this.Add(340402, 340400, "大通区"); + this.Add(340403, 340400, "田家庵区"); + this.Add(340404, 340400, "谢家集区"); + this.Add(340405, 340400, "八公山区"); + this.Add(340406, 340400, "潘集区"); + this.Add(340421, 340400, "凤台县"); + this.Add(340422, 340400, "寿县"); + this.Add(340503, 340500, "花山区"); + this.Add(340504, 340500, "雨山区"); + this.Add(340506, 340500, "博望区"); + this.Add(340521, 340500, "当涂县"); + this.Add(340522, 340500, "含山县"); + this.Add(340523, 340500, "和县"); + this.Add(340602, 340600, "杜集区"); + this.Add(340603, 340600, "相山区"); + this.Add(340604, 340600, "烈山区"); + this.Add(340621, 340600, "濉溪县"); + this.Add(340705, 340700, "铜官区"); + this.Add(340706, 340700, "义安区"); + this.Add(340711, 340700, "郊区"); + this.Add(340722, 340700, "枞阳县"); + this.Add(340802, 340800, "迎江区"); + this.Add(340803, 340800, "大观区"); + this.Add(340811, 340800, "宜秀区"); + this.Add(340822, 340800, "怀宁县"); + this.Add(340825, 340800, "太湖县"); + this.Add(340826, 340800, "宿松县"); + this.Add(340827, 340800, "望江县"); + this.Add(340828, 340800, "岳西县"); + this.Add(340881, 340800, "桐城市"); + this.Add(340882, 340800, "潜山市"); + this.Add(341002, 341000, "屯溪区"); + this.Add(341003, 341000, "黄山区"); + this.Add(341004, 341000, "徽州区"); + this.Add(341021, 341000, "歙县"); + this.Add(341022, 341000, "休宁县"); + this.Add(341023, 341000, "黟县"); + this.Add(341024, 341000, "祁门县"); + this.Add(341102, 341100, "琅琊区"); + this.Add(341103, 341100, "南谯区"); + this.Add(341122, 341100, "来安县"); + this.Add(341124, 341100, "全椒县"); + this.Add(341125, 341100, "定远县"); + this.Add(341126, 341100, "凤阳县"); + this.Add(341181, 341100, "天长市"); + this.Add(341182, 341100, "明光市"); + this.Add(341202, 341200, "颍州区"); + this.Add(341203, 341200, "颍东区"); + this.Add(341204, 341200, "颍泉区"); + this.Add(341221, 341200, "临泉县"); + this.Add(341222, 341200, "太和县"); + this.Add(341225, 341200, "阜南县"); + this.Add(341226, 341200, "颍上县"); + this.Add(341282, 341200, "界首市"); + this.Add(341302, 341300, "埇桥区"); + this.Add(341321, 341300, "砀山县"); + this.Add(341322, 341300, "萧县"); + this.Add(341323, 341300, "灵璧县"); + this.Add(341324, 341300, "泗县"); + this.Add(341502, 341500, "金安区"); + this.Add(341503, 341500, "裕安区"); + this.Add(341504, 341500, "叶集区"); + this.Add(341522, 341500, "霍邱县"); + this.Add(341523, 341500, "舒城县"); + this.Add(341524, 341500, "金寨县"); + this.Add(341525, 341500, "霍山县"); + this.Add(341602, 341600, "谯城区"); + this.Add(341621, 341600, "涡阳县"); + this.Add(341622, 341600, "蒙城县"); + this.Add(341623, 341600, "利辛县"); + this.Add(341702, 341700, "贵池区"); + this.Add(341721, 341700, "东至县"); + this.Add(341722, 341700, "石台县"); + this.Add(341723, 341700, "青阳县"); + this.Add(341802, 341800, "宣州区"); + this.Add(341821, 341800, "郎溪县"); + this.Add(341823, 341800, "泾县"); + this.Add(341824, 341800, "绩溪县"); + this.Add(341825, 341800, "旌德县"); + this.Add(341881, 341800, "宁国市"); + this.Add(341882, 341800, "广德市"); + this.Add(350100, 350000, "福州市"); + this.Add(350200, 350000, "厦门市"); + this.Add(350300, 350000, "莆田市"); + this.Add(350400, 350000, "三明市"); + this.Add(350500, 350000, "泉州市"); + this.Add(350600, 350000, "漳州市"); + this.Add(350700, 350000, "南平市"); + this.Add(350800, 350000, "龙岩市"); + this.Add(350900, 350000, "宁德市"); + this.Add(350102, 350100, "鼓楼区"); + this.Add(350103, 350100, "台江区"); + this.Add(350104, 350100, "仓山区"); + this.Add(350105, 350100, "马尾区"); + this.Add(350111, 350100, "晋安区"); + this.Add(350112, 350100, "长乐区"); + this.Add(350121, 350100, "闽侯县"); + this.Add(350122, 350100, "连江县"); + this.Add(350123, 350100, "罗源县"); + this.Add(350124, 350100, "闽清县"); + this.Add(350125, 350100, "永泰县"); + this.Add(350128, 350100, "平潭县"); + this.Add(350181, 350100, "福清市"); + this.Add(350203, 350200, "思明区"); + this.Add(350205, 350200, "海沧区"); + this.Add(350206, 350200, "湖里区"); + this.Add(350211, 350200, "集美区"); + this.Add(350212, 350200, "同安区"); + this.Add(350213, 350200, "翔安区"); + this.Add(350302, 350300, "城厢区"); + this.Add(350303, 350300, "涵江区"); + this.Add(350304, 350300, "荔城区"); + this.Add(350305, 350300, "秀屿区"); + this.Add(350322, 350300, "仙游县"); + this.Add(350402, 350400, "梅列区"); + this.Add(350403, 350400, "三元区"); + this.Add(350421, 350400, "明溪县"); + this.Add(350423, 350400, "清流县"); + this.Add(350424, 350400, "宁化县"); + this.Add(350425, 350400, "大田县"); + this.Add(350426, 350400, "尤溪县"); + this.Add(350427, 350400, "沙县"); + this.Add(350428, 350400, "将乐县"); + this.Add(350429, 350400, "泰宁县"); + this.Add(350430, 350400, "建宁县"); + this.Add(350481, 350400, "永安市"); + this.Add(350502, 350500, "鲤城区"); + this.Add(350503, 350500, "丰泽区"); + this.Add(350504, 350500, "洛江区"); + this.Add(350505, 350500, "泉港区"); + this.Add(350521, 350500, "惠安县"); + this.Add(350524, 350500, "安溪县"); + this.Add(350525, 350500, "永春县"); + this.Add(350526, 350500, "德化县"); + this.Add(350527, 350500, "金门县"); + this.Add(350581, 350500, "石狮市"); + this.Add(350582, 350500, "晋江市"); + this.Add(350583, 350500, "南安市"); + this.Add(350602, 350600, "芗城区"); + this.Add(350603, 350600, "龙文区"); + this.Add(350622, 350600, "云霄县"); + this.Add(350623, 350600, "漳浦县"); + this.Add(350624, 350600, "诏安县"); + this.Add(350625, 350600, "长泰县"); + this.Add(350626, 350600, "东山县"); + this.Add(350627, 350600, "南靖县"); + this.Add(350628, 350600, "平和县"); + this.Add(350629, 350600, "华安县"); + this.Add(350681, 350600, "龙海市"); + this.Add(350702, 350700, "延平区"); + this.Add(350703, 350700, "建阳区"); + this.Add(350721, 350700, "顺昌县"); + this.Add(350722, 350700, "浦城县"); + this.Add(350723, 350700, "光泽县"); + this.Add(350724, 350700, "松溪县"); + this.Add(350725, 350700, "政和县"); + this.Add(350781, 350700, "邵武市"); + this.Add(350782, 350700, "武夷山市"); + this.Add(350783, 350700, "建瓯市"); + this.Add(350802, 350800, "新罗区"); + this.Add(350803, 350800, "永定区"); + this.Add(350821, 350800, "长汀县"); + this.Add(350823, 350800, "上杭县"); + this.Add(350824, 350800, "武平县"); + this.Add(350825, 350800, "连城县"); + this.Add(350881, 350800, "漳平市"); + this.Add(350902, 350900, "蕉城区"); + this.Add(350921, 350900, "霞浦县"); + this.Add(350922, 350900, "古田县"); + this.Add(350923, 350900, "屏南县"); + this.Add(350924, 350900, "寿宁县"); + this.Add(350925, 350900, "周宁县"); + this.Add(350926, 350900, "柘荣县"); + this.Add(350981, 350900, "福安市"); + this.Add(350982, 350900, "福鼎市"); + this.Add(360100, 360000, "南昌市"); + this.Add(360200, 360000, "景德镇市"); + this.Add(360300, 360000, "萍乡市"); + this.Add(360400, 360000, "九江市"); + this.Add(360500, 360000, "新余市"); + this.Add(360600, 360000, "鹰潭市"); + this.Add(360700, 360000, "赣州市"); + this.Add(360800, 360000, "吉安市"); + this.Add(360900, 360000, "宜春市"); + this.Add(361000, 360000, "抚州市"); + this.Add(361100, 360000, "上饶市"); + this.Add(360102, 360100, "东湖区"); + this.Add(360103, 360100, "西湖区"); + this.Add(360104, 360100, "青云谱区"); + this.Add(360111, 360100, "青山湖区"); + this.Add(360112, 360100, "新建区"); + this.Add(360113, 360100, "红谷滩区"); + this.Add(360121, 360100, "南昌县"); + this.Add(360123, 360100, "安义县"); + this.Add(360124, 360100, "进贤县"); + this.Add(360202, 360200, "昌江区"); + this.Add(360203, 360200, "珠山区"); + this.Add(360222, 360200, "浮梁县"); + this.Add(360281, 360200, "乐平市"); + this.Add(360302, 360300, "安源区"); + this.Add(360313, 360300, "湘东区"); + this.Add(360321, 360300, "莲花县"); + this.Add(360322, 360300, "上栗县"); + this.Add(360323, 360300, "芦溪县"); + this.Add(360402, 360400, "濂溪区"); + this.Add(360403, 360400, "浔阳区"); + this.Add(360404, 360400, "柴桑区"); + this.Add(360423, 360400, "武宁县"); + this.Add(360424, 360400, "修水县"); + this.Add(360425, 360400, "永修县"); + this.Add(360426, 360400, "德安县"); + this.Add(360428, 360400, "都昌县"); + this.Add(360429, 360400, "湖口县"); + this.Add(360430, 360400, "彭泽县"); + this.Add(360481, 360400, "瑞昌市"); + this.Add(360482, 360400, "共青城市"); + this.Add(360483, 360400, "庐山市"); + this.Add(360502, 360500, "渝水区"); + this.Add(360521, 360500, "分宜县"); + this.Add(360602, 360600, "月湖区"); + this.Add(360603, 360600, "余江区"); + this.Add(360681, 360600, "贵溪市"); + this.Add(360702, 360700, "章贡区"); + this.Add(360703, 360700, "南康区"); + this.Add(360704, 360700, "赣县区"); + this.Add(360722, 360700, "信丰县"); + this.Add(360723, 360700, "大余县"); + this.Add(360724, 360700, "上犹县"); + this.Add(360725, 360700, "崇义县"); + this.Add(360726, 360700, "安远县"); + this.Add(360728, 360700, "定南县"); + this.Add(360729, 360700, "全南县"); + this.Add(360730, 360700, "宁都县"); + this.Add(360731, 360700, "于都县"); + this.Add(360732, 360700, "兴国县"); + this.Add(360733, 360700, "会昌县"); + this.Add(360734, 360700, "寻乌县"); + this.Add(360735, 360700, "石城县"); + this.Add(360781, 360700, "瑞金市"); + this.Add(360783, 360700, "龙南市"); + this.Add(360802, 360800, "吉州区"); + this.Add(360803, 360800, "青原区"); + this.Add(360821, 360800, "吉安县"); + this.Add(360822, 360800, "吉水县"); + this.Add(360823, 360800, "峡江县"); + this.Add(360824, 360800, "新干县"); + this.Add(360825, 360800, "永丰县"); + this.Add(360826, 360800, "泰和县"); + this.Add(360827, 360800, "遂川县"); + this.Add(360828, 360800, "万安县"); + this.Add(360829, 360800, "安福县"); + this.Add(360830, 360800, "永新县"); + this.Add(360881, 360800, "井冈山市"); + this.Add(360902, 360900, "袁州区"); + this.Add(360921, 360900, "奉新县"); + this.Add(360922, 360900, "万载县"); + this.Add(360923, 360900, "上高县"); + this.Add(360924, 360900, "宜丰县"); + this.Add(360925, 360900, "靖安县"); + this.Add(360926, 360900, "铜鼓县"); + this.Add(360981, 360900, "丰城市"); + this.Add(360982, 360900, "樟树市"); + this.Add(360983, 360900, "高安市"); + this.Add(361002, 361000, "临川区"); + this.Add(361003, 361000, "东乡区"); + this.Add(361021, 361000, "南城县"); + this.Add(361022, 361000, "黎川县"); + this.Add(361023, 361000, "南丰县"); + this.Add(361024, 361000, "崇仁县"); + this.Add(361025, 361000, "乐安县"); + this.Add(361026, 361000, "宜黄县"); + this.Add(361027, 361000, "金溪县"); + this.Add(361028, 361000, "资溪县"); + this.Add(361030, 361000, "广昌县"); + this.Add(361102, 361100, "信州区"); + this.Add(361103, 361100, "广丰区"); + this.Add(361104, 361100, "广信区"); + this.Add(361123, 361100, "玉山县"); + this.Add(361124, 361100, "铅山县"); + this.Add(361125, 361100, "横峰县"); + this.Add(361126, 361100, "弋阳县"); + this.Add(361127, 361100, "余干县"); + this.Add(361128, 361100, "鄱阳县"); + this.Add(361129, 361100, "万年县"); + this.Add(361130, 361100, "婺源县"); + this.Add(361181, 361100, "德兴市"); + this.Add(370100, 370000, "济南市"); + this.Add(370200, 370000, "青岛市"); + this.Add(370300, 370000, "淄博市"); + this.Add(370400, 370000, "枣庄市"); + this.Add(370500, 370000, "东营市"); + this.Add(370600, 370000, "烟台市"); + this.Add(370700, 370000, "潍坊市"); + this.Add(370800, 370000, "济宁市"); + this.Add(370900, 370000, "泰安市"); + this.Add(371000, 370000, "威海市"); + this.Add(371100, 370000, "日照市"); + this.Add(371300, 370000, "临沂市"); + this.Add(371400, 370000, "德州市"); + this.Add(371500, 370000, "聊城市"); + this.Add(371600, 370000, "滨州市"); + this.Add(371700, 370000, "菏泽市"); + this.Add(370102, 370100, "历下区"); + this.Add(370103, 370100, "市中区"); + this.Add(370104, 370100, "槐荫区"); + this.Add(370105, 370100, "天桥区"); + this.Add(370112, 370100, "历城区"); + this.Add(370113, 370100, "长清区"); + this.Add(370114, 370100, "章丘区"); + this.Add(370115, 370100, "济阳区"); + this.Add(370116, 370100, "莱芜区"); + this.Add(370117, 370100, "钢城区"); + this.Add(370124, 370100, "平阴县"); + this.Add(370126, 370100, "商河县"); + this.Add(370202, 370200, "市南区"); + this.Add(370203, 370200, "市北区"); + this.Add(370211, 370200, "黄岛区"); + this.Add(370212, 370200, "崂山区"); + this.Add(370213, 370200, "李沧区"); + this.Add(370214, 370200, "城阳区"); + this.Add(370215, 370200, "即墨区"); + this.Add(370281, 370200, "胶州市"); + this.Add(370283, 370200, "平度市"); + this.Add(370285, 370200, "莱西市"); + this.Add(370302, 370300, "淄川区"); + this.Add(370303, 370300, "张店区"); + this.Add(370304, 370300, "博山区"); + this.Add(370305, 370300, "临淄区"); + this.Add(370306, 370300, "周村区"); + this.Add(370321, 370300, "桓台县"); + this.Add(370322, 370300, "高青县"); + this.Add(370323, 370300, "沂源县"); + this.Add(370402, 370400, "市中区"); + this.Add(370403, 370400, "薛城区"); + this.Add(370404, 370400, "峄城区"); + this.Add(370405, 370400, "台儿庄区"); + this.Add(370406, 370400, "山亭区"); + this.Add(370481, 370400, "滕州市"); + this.Add(370502, 370500, "东营区"); + this.Add(370503, 370500, "河口区"); + this.Add(370505, 370500, "垦利区"); + this.Add(370522, 370500, "利津县"); + this.Add(370523, 370500, "广饶县"); + this.Add(370602, 370600, "芝罘区"); + this.Add(370611, 370600, "福山区"); + this.Add(370612, 370600, "牟平区"); + this.Add(370613, 370600, "莱山区"); + this.Add(370614, 370600, "蓬莱区"); + this.Add(370681, 370600, "龙口市"); + this.Add(370682, 370600, "莱阳市"); + this.Add(370683, 370600, "莱州市"); + this.Add(370685, 370600, "招远市"); + this.Add(370686, 370600, "栖霞市"); + this.Add(370687, 370600, "海阳市"); + this.Add(370702, 370700, "潍城区"); + this.Add(370703, 370700, "寒亭区"); + this.Add(370704, 370700, "坊子区"); + this.Add(370705, 370700, "奎文区"); + this.Add(370724, 370700, "临朐县"); + this.Add(370725, 370700, "昌乐县"); + this.Add(370781, 370700, "青州市"); + this.Add(370782, 370700, "诸城市"); + this.Add(370783, 370700, "寿光市"); + this.Add(370784, 370700, "安丘市"); + this.Add(370785, 370700, "高密市"); + this.Add(370786, 370700, "昌邑市"); + this.Add(370811, 370800, "任城区"); + this.Add(370812, 370800, "兖州区"); + this.Add(370826, 370800, "微山县"); + this.Add(370827, 370800, "鱼台县"); + this.Add(370828, 370800, "金乡县"); + this.Add(370829, 370800, "嘉祥县"); + this.Add(370830, 370800, "汶上县"); + this.Add(370831, 370800, "泗水县"); + this.Add(370832, 370800, "梁山县"); + this.Add(370881, 370800, "曲阜市"); + this.Add(370883, 370800, "邹城市"); + this.Add(370902, 370900, "泰山区"); + this.Add(370911, 370900, "岱岳区"); + this.Add(370921, 370900, "宁阳县"); + this.Add(370923, 370900, "东平县"); + this.Add(370982, 370900, "新泰市"); + this.Add(370983, 370900, "肥城市"); + this.Add(371002, 371000, "环翠区"); + this.Add(371003, 371000, "文登区"); + this.Add(371082, 371000, "荣成市"); + this.Add(371083, 371000, "乳山市"); + this.Add(371102, 371100, "东港区"); + this.Add(371103, 371100, "岚山区"); + this.Add(371121, 371100, "五莲县"); + this.Add(371122, 371100, "莒县"); + this.Add(371302, 371300, "兰山区"); + this.Add(371311, 371300, "罗庄区"); + this.Add(371312, 371300, "河东区"); + this.Add(371321, 371300, "沂南县"); + this.Add(371322, 371300, "郯城县"); + this.Add(371323, 371300, "沂水县"); + this.Add(371324, 371300, "兰陵县"); + this.Add(371325, 371300, "费县"); + this.Add(371326, 371300, "平邑县"); + this.Add(371327, 371300, "莒南县"); + this.Add(371328, 371300, "蒙阴县"); + this.Add(371329, 371300, "临沭县"); + this.Add(371402, 371400, "德城区"); + this.Add(371403, 371400, "陵城区"); + this.Add(371422, 371400, "宁津县"); + this.Add(371423, 371400, "庆云县"); + this.Add(371424, 371400, "临邑县"); + this.Add(371425, 371400, "齐河县"); + this.Add(371426, 371400, "平原县"); + this.Add(371427, 371400, "夏津县"); + this.Add(371428, 371400, "武城县"); + this.Add(371481, 371400, "乐陵市"); + this.Add(371482, 371400, "禹城市"); + this.Add(371502, 371500, "东昌府区"); + this.Add(371503, 371500, "茌平区"); + this.Add(371521, 371500, "阳谷县"); + this.Add(371522, 371500, "莘县"); + this.Add(371524, 371500, "东阿县"); + this.Add(371525, 371500, "冠县"); + this.Add(371526, 371500, "高唐县"); + this.Add(371581, 371500, "临清市"); + this.Add(371602, 371600, "滨城区"); + this.Add(371603, 371600, "沾化区"); + this.Add(371621, 371600, "惠民县"); + this.Add(371622, 371600, "阳信县"); + this.Add(371623, 371600, "无棣县"); + this.Add(371625, 371600, "博兴县"); + this.Add(371681, 371600, "邹平市"); + this.Add(371702, 371700, "牡丹区"); + this.Add(371703, 371700, "定陶区"); + this.Add(371721, 371700, "曹县"); + this.Add(371722, 371700, "单县"); + this.Add(371723, 371700, "成武县"); + this.Add(371724, 371700, "巨野县"); + this.Add(371725, 371700, "郓城县"); + this.Add(371726, 371700, "鄄城县"); + this.Add(371728, 371700, "东明县"); + this.Add(410100, 410000, "郑州市"); + this.Add(410200, 410000, "开封市"); + this.Add(410300, 410000, "洛阳市"); + this.Add(410400, 410000, "平顶山市"); + this.Add(410500, 410000, "安阳市"); + this.Add(410600, 410000, "鹤壁市"); + this.Add(410700, 410000, "新乡市"); + this.Add(410800, 410000, "焦作市"); + this.Add(410900, 410000, "濮阳市"); + this.Add(411000, 410000, "许昌市"); + this.Add(411100, 410000, "漯河市"); + this.Add(411200, 410000, "三门峡市"); + this.Add(411300, 410000, "南阳市"); + this.Add(411400, 410000, "商丘市"); + this.Add(411500, 410000, "信阳市"); + this.Add(411600, 410000, "周口市"); + this.Add(411700, 410000, "驻马店市"); + this.Add(419001, 410000, "济源市"); + this.Add(410102, 410100, "中原区"); + this.Add(410103, 410100, "二七区"); + this.Add(410104, 410100, "管城回族区"); + this.Add(410105, 410100, "金水区"); + this.Add(410106, 410100, "上街区"); + this.Add(410108, 410100, "惠济区"); + this.Add(410122, 410100, "中牟县"); + this.Add(410181, 410100, "巩义市"); + this.Add(410182, 410100, "荥阳市"); + this.Add(410183, 410100, "新密市"); + this.Add(410184, 410100, "新郑市"); + this.Add(410185, 410100, "登封市"); + this.Add(410202, 410200, "龙亭区"); + this.Add(410203, 410200, "顺河回族区"); + this.Add(410204, 410200, "鼓楼区"); + this.Add(410205, 410200, "禹王台区"); + this.Add(410212, 410200, "祥符区"); + this.Add(410221, 410200, "杞县"); + this.Add(410222, 410200, "通许县"); + this.Add(410223, 410200, "尉氏县"); + this.Add(410225, 410200, "兰考县"); + this.Add(410302, 410300, "老城区"); + this.Add(410303, 410300, "西工区"); + this.Add(410304, 410300, "瀍河回族区"); + this.Add(410305, 410300, "涧西区"); + this.Add(410306, 410300, "吉利区"); + this.Add(410311, 410300, "洛龙区"); + this.Add(410322, 410300, "孟津县"); + this.Add(410323, 410300, "新安县"); + this.Add(410324, 410300, "栾川县"); + this.Add(410325, 410300, "嵩县"); + this.Add(410326, 410300, "汝阳县"); + this.Add(410327, 410300, "宜阳县"); + this.Add(410328, 410300, "洛宁县"); + this.Add(410329, 410300, "伊川县"); + this.Add(410381, 410300, "偃师市"); + this.Add(410402, 410400, "新华区"); + this.Add(410403, 410400, "卫东区"); + this.Add(410404, 410400, "石龙区"); + this.Add(410411, 410400, "湛河区"); + this.Add(410421, 410400, "宝丰县"); + this.Add(410422, 410400, "叶县"); + this.Add(410423, 410400, "鲁山县"); + this.Add(410425, 410400, "郏县"); + this.Add(410481, 410400, "舞钢市"); + this.Add(410482, 410400, "汝州市"); + this.Add(410502, 410500, "文峰区"); + this.Add(410503, 410500, "北关区"); + this.Add(410505, 410500, "殷都区"); + this.Add(410506, 410500, "龙安区"); + this.Add(410522, 410500, "安阳县"); + this.Add(410523, 410500, "汤阴县"); + this.Add(410526, 410500, "滑县"); + this.Add(410527, 410500, "内黄县"); + this.Add(410581, 410500, "林州市"); + this.Add(410602, 410600, "鹤山区"); + this.Add(410603, 410600, "山城区"); + this.Add(410611, 410600, "淇滨区"); + this.Add(410621, 410600, "浚县"); + this.Add(410622, 410600, "淇县"); + this.Add(410702, 410700, "红旗区"); + this.Add(410703, 410700, "卫滨区"); + this.Add(410704, 410700, "凤泉区"); + this.Add(410711, 410700, "牧野区"); + this.Add(410721, 410700, "新乡县"); + this.Add(410724, 410700, "获嘉县"); + this.Add(410725, 410700, "原阳县"); + this.Add(410726, 410700, "延津县"); + this.Add(410727, 410700, "封丘县"); + this.Add(410781, 410700, "卫辉市"); + this.Add(410782, 410700, "辉县市"); + this.Add(410783, 410700, "长垣市"); + this.Add(410802, 410800, "解放区"); + this.Add(410803, 410800, "中站区"); + this.Add(410804, 410800, "马村区"); + this.Add(410811, 410800, "山阳区"); + this.Add(410821, 410800, "修武县"); + this.Add(410822, 410800, "博爱县"); + this.Add(410823, 410800, "武陟县"); + this.Add(410825, 410800, "温县"); + this.Add(410882, 410800, "沁阳市"); + this.Add(410883, 410800, "孟州市"); + this.Add(410902, 410900, "华龙区"); + this.Add(410922, 410900, "清丰县"); + this.Add(410923, 410900, "南乐县"); + this.Add(410926, 410900, "范县"); + this.Add(410927, 410900, "台前县"); + this.Add(410928, 410900, "濮阳县"); + this.Add(411002, 411000, "魏都区"); + this.Add(411003, 411000, "建安区"); + this.Add(411024, 411000, "鄢陵县"); + this.Add(411025, 411000, "襄城县"); + this.Add(411081, 411000, "禹州市"); + this.Add(411082, 411000, "长葛市"); + this.Add(411102, 411100, "源汇区"); + this.Add(411103, 411100, "郾城区"); + this.Add(411104, 411100, "召陵区"); + this.Add(411121, 411100, "舞阳县"); + this.Add(411122, 411100, "临颍县"); + this.Add(411202, 411200, "湖滨区"); + this.Add(411203, 411200, "陕州区"); + this.Add(411221, 411200, "渑池县"); + this.Add(411224, 411200, "卢氏县"); + this.Add(411281, 411200, "义马市"); + this.Add(411282, 411200, "灵宝市"); + this.Add(411302, 411300, "宛城区"); + this.Add(411303, 411300, "卧龙区"); + this.Add(411321, 411300, "南召县"); + this.Add(411322, 411300, "方城县"); + this.Add(411323, 411300, "西峡县"); + this.Add(411324, 411300, "镇平县"); + this.Add(411325, 411300, "内乡县"); + this.Add(411326, 411300, "淅川县"); + this.Add(411327, 411300, "社旗县"); + this.Add(411328, 411300, "唐河县"); + this.Add(411329, 411300, "新野县"); + this.Add(411330, 411300, "桐柏县"); + this.Add(411381, 411300, "邓州市"); + this.Add(411402, 411400, "梁园区"); + this.Add(411403, 411400, "睢阳区"); + this.Add(411421, 411400, "民权县"); + this.Add(411422, 411400, "睢县"); + this.Add(411423, 411400, "宁陵县"); + this.Add(411424, 411400, "柘城县"); + this.Add(411425, 411400, "虞城县"); + this.Add(411426, 411400, "夏邑县"); + this.Add(411481, 411400, "永城市"); + this.Add(411502, 411500, "浉河区"); + this.Add(411503, 411500, "平桥区"); + this.Add(411521, 411500, "罗山县"); + this.Add(411522, 411500, "光山县"); + this.Add(411523, 411500, "新县"); + this.Add(411524, 411500, "商城县"); + this.Add(411525, 411500, "固始县"); + this.Add(411526, 411500, "潢川县"); + this.Add(411527, 411500, "淮滨县"); + this.Add(411528, 411500, "息县"); + this.Add(411602, 411600, "川汇区"); + this.Add(411603, 411600, "淮阳区"); + this.Add(411621, 411600, "扶沟县"); + this.Add(411622, 411600, "西华县"); + this.Add(411623, 411600, "商水县"); + this.Add(411624, 411600, "沈丘县"); + this.Add(411625, 411600, "郸城县"); + this.Add(411627, 411600, "太康县"); + this.Add(411628, 411600, "鹿邑县"); + this.Add(411681, 411600, "项城市"); + this.Add(411702, 411700, "驿城区"); + this.Add(411721, 411700, "西平县"); + this.Add(411722, 411700, "上蔡县"); + this.Add(411723, 411700, "平舆县"); + this.Add(411724, 411700, "正阳县"); + this.Add(411725, 411700, "确山县"); + this.Add(411726, 411700, "泌阳县"); + this.Add(411727, 411700, "汝南县"); + this.Add(411728, 411700, "遂平县"); + this.Add(411729, 411700, "新蔡县"); + this.Add(420100, 420000, "武汉市"); + this.Add(420200, 420000, "黄石市"); + this.Add(420300, 420000, "十堰市"); + this.Add(420500, 420000, "宜昌市"); + this.Add(420600, 420000, "襄阳市"); + this.Add(420700, 420000, "鄂州市"); + this.Add(420800, 420000, "荆门市"); + this.Add(420900, 420000, "孝感市"); + this.Add(421000, 420000, "荆州市"); + this.Add(421100, 420000, "黄冈市"); + this.Add(421200, 420000, "咸宁市"); + this.Add(421300, 420000, "随州市"); + this.Add(422800, 420000, "恩施土家族苗族自治州"); + this.Add(429004, 420000, "仙桃市"); + this.Add(429005, 420000, "潜江市"); + this.Add(429006, 420000, "天门市"); + this.Add(429021, 420000, "神农架林区"); + this.Add(420102, 420100, "江岸区"); + this.Add(420103, 420100, "江汉区"); + this.Add(420104, 420100, "硚口区"); + this.Add(420105, 420100, "汉阳区"); + this.Add(420106, 420100, "武昌区"); + this.Add(420107, 420100, "青山区"); + this.Add(420111, 420100, "洪山区"); + this.Add(420112, 420100, "东西湖区"); + this.Add(420113, 420100, "汉南区"); + this.Add(420114, 420100, "蔡甸区"); + this.Add(420115, 420100, "江夏区"); + this.Add(420116, 420100, "黄陂区"); + this.Add(420117, 420100, "新洲区"); + this.Add(420202, 420200, "黄石港区"); + this.Add(420203, 420200, "西塞山区"); + this.Add(420204, 420200, "下陆区"); + this.Add(420205, 420200, "铁山区"); + this.Add(420222, 420200, "阳新县"); + this.Add(420281, 420200, "大冶市"); + this.Add(420302, 420300, "茅箭区"); + this.Add(420303, 420300, "张湾区"); + this.Add(420304, 420300, "郧阳区"); + this.Add(420322, 420300, "郧西县"); + this.Add(420323, 420300, "竹山县"); + this.Add(420324, 420300, "竹溪县"); + this.Add(420325, 420300, "房县"); + this.Add(420381, 420300, "丹江口市"); + this.Add(420502, 420500, "西陵区"); + this.Add(420503, 420500, "伍家岗区"); + this.Add(420504, 420500, "点军区"); + this.Add(420505, 420500, "猇亭区"); + this.Add(420506, 420500, "夷陵区"); + this.Add(420525, 420500, "远安县"); + this.Add(420526, 420500, "兴山县"); + this.Add(420527, 420500, "秭归县"); + this.Add(420528, 420500, "长阳土家族自治县"); + this.Add(420529, 420500, "五峰土家族自治县"); + this.Add(420581, 420500, "宜都市"); + this.Add(420582, 420500, "当阳市"); + this.Add(420583, 420500, "枝江市"); + this.Add(420602, 420600, "襄城区"); + this.Add(420606, 420600, "樊城区"); + this.Add(420607, 420600, "襄州区"); + this.Add(420624, 420600, "南漳县"); + this.Add(420625, 420600, "谷城县"); + this.Add(420626, 420600, "保康县"); + this.Add(420682, 420600, "老河口市"); + this.Add(420683, 420600, "枣阳市"); + this.Add(420684, 420600, "宜城市"); + this.Add(420702, 420700, "梁子湖区"); + this.Add(420703, 420700, "华容区"); + this.Add(420704, 420700, "鄂城区"); + this.Add(420802, 420800, "东宝区"); + this.Add(420804, 420800, "掇刀区"); + this.Add(420822, 420800, "沙洋县"); + this.Add(420881, 420800, "钟祥市"); + this.Add(420882, 420800, "京山市"); + this.Add(420902, 420900, "孝南区"); + this.Add(420921, 420900, "孝昌县"); + this.Add(420922, 420900, "大悟县"); + this.Add(420923, 420900, "云梦县"); + this.Add(420981, 420900, "应城市"); + this.Add(420982, 420900, "安陆市"); + this.Add(420984, 420900, "汉川市"); + this.Add(421002, 421000, "沙市区"); + this.Add(421003, 421000, "荆州区"); + this.Add(421022, 421000, "公安县"); + this.Add(421023, 421000, "监利市"); + this.Add(421024, 421000, "江陵县"); + this.Add(421081, 421000, "石首市"); + this.Add(421083, 421000, "洪湖市"); + this.Add(421087, 421000, "松滋市"); + this.Add(421102, 421100, "黄州区"); + this.Add(421121, 421100, "团风县"); + this.Add(421122, 421100, "红安县"); + this.Add(421123, 421100, "罗田县"); + this.Add(421124, 421100, "英山县"); + this.Add(421125, 421100, "浠水县"); + this.Add(421126, 421100, "蕲春县"); + this.Add(421127, 421100, "黄梅县"); + this.Add(421181, 421100, "麻城市"); + this.Add(421182, 421100, "武穴市"); + this.Add(421202, 421200, "咸安区"); + this.Add(421221, 421200, "嘉鱼县"); + this.Add(421222, 421200, "通城县"); + this.Add(421223, 421200, "崇阳县"); + this.Add(421224, 421200, "通山县"); + this.Add(421281, 421200, "赤壁市"); + this.Add(421303, 421300, "曾都区"); + this.Add(421321, 421300, "随县"); + this.Add(421381, 421300, "广水市"); + this.Add(422801, 422800, "恩施市"); + this.Add(422802, 422800, "利川市"); + this.Add(422822, 422800, "建始县"); + this.Add(422823, 422800, "巴东县"); + this.Add(422825, 422800, "宣恩县"); + this.Add(422826, 422800, "咸丰县"); + this.Add(422827, 422800, "来凤县"); + this.Add(422828, 422800, "鹤峰县"); + this.Add(430100, 430000, "长沙市"); + this.Add(430200, 430000, "株洲市"); + this.Add(430300, 430000, "湘潭市"); + this.Add(430400, 430000, "衡阳市"); + this.Add(430500, 430000, "邵阳市"); + this.Add(430600, 430000, "岳阳市"); + this.Add(430700, 430000, "常德市"); + this.Add(430800, 430000, "张家界市"); + this.Add(430900, 430000, "益阳市"); + this.Add(431000, 430000, "郴州市"); + this.Add(431100, 430000, "永州市"); + this.Add(431200, 430000, "怀化市"); + this.Add(431300, 430000, "娄底市"); + this.Add(433100, 430000, "湘西土家族苗族自治州"); + this.Add(430102, 430100, "芙蓉区"); + this.Add(430103, 430100, "天心区"); + this.Add(430104, 430100, "岳麓区"); + this.Add(430105, 430100, "开福区"); + this.Add(430111, 430100, "雨花区"); + this.Add(430112, 430100, "望城区"); + this.Add(430121, 430100, "长沙县"); + this.Add(430181, 430100, "浏阳市"); + this.Add(430182, 430100, "宁乡市"); + this.Add(430202, 430200, "荷塘区"); + this.Add(430203, 430200, "芦淞区"); + this.Add(430204, 430200, "石峰区"); + this.Add(430211, 430200, "天元区"); + this.Add(430212, 430200, "渌口区"); + this.Add(430223, 430200, "攸县"); + this.Add(430224, 430200, "茶陵县"); + this.Add(430225, 430200, "炎陵县"); + this.Add(430281, 430200, "醴陵市"); + this.Add(430302, 430300, "雨湖区"); + this.Add(430304, 430300, "岳塘区"); + this.Add(430321, 430300, "湘潭县"); + this.Add(430381, 430300, "湘乡市"); + this.Add(430382, 430300, "韶山市"); + this.Add(430405, 430400, "珠晖区"); + this.Add(430406, 430400, "雁峰区"); + this.Add(430407, 430400, "石鼓区"); + this.Add(430408, 430400, "蒸湘区"); + this.Add(430412, 430400, "南岳区"); + this.Add(430421, 430400, "衡阳县"); + this.Add(430422, 430400, "衡南县"); + this.Add(430423, 430400, "衡山县"); + this.Add(430424, 430400, "衡东县"); + this.Add(430426, 430400, "祁东县"); + this.Add(430481, 430400, "耒阳市"); + this.Add(430482, 430400, "常宁市"); + this.Add(430502, 430500, "双清区"); + this.Add(430503, 430500, "大祥区"); + this.Add(430511, 430500, "北塔区"); + this.Add(430522, 430500, "新邵县"); + this.Add(430523, 430500, "邵阳县"); + this.Add(430524, 430500, "隆回县"); + this.Add(430525, 430500, "洞口县"); + this.Add(430527, 430500, "绥宁县"); + this.Add(430528, 430500, "新宁县"); + this.Add(430529, 430500, "城步苗族自治县"); + this.Add(430581, 430500, "武冈市"); + this.Add(430582, 430500, "邵东市"); + this.Add(430602, 430600, "岳阳楼区"); + this.Add(430603, 430600, "云溪区"); + this.Add(430611, 430600, "君山区"); + this.Add(430621, 430600, "岳阳县"); + this.Add(430623, 430600, "华容县"); + this.Add(430624, 430600, "湘阴县"); + this.Add(430626, 430600, "平江县"); + this.Add(430681, 430600, "汨罗市"); + this.Add(430682, 430600, "临湘市"); + this.Add(430702, 430700, "武陵区"); + this.Add(430703, 430700, "鼎城区"); + this.Add(430721, 430700, "安乡县"); + this.Add(430722, 430700, "汉寿县"); + this.Add(430723, 430700, "澧县"); + this.Add(430724, 430700, "临澧县"); + this.Add(430725, 430700, "桃源县"); + this.Add(430726, 430700, "石门县"); + this.Add(430781, 430700, "津市市"); + this.Add(430802, 430800, "永定区"); + this.Add(430811, 430800, "武陵源区"); + this.Add(430821, 430800, "慈利县"); + this.Add(430822, 430800, "桑植县"); + this.Add(430902, 430900, "资阳区"); + this.Add(430903, 430900, "赫山区"); + this.Add(430921, 430900, "南县"); + this.Add(430922, 430900, "桃江县"); + this.Add(430923, 430900, "安化县"); + this.Add(430981, 430900, "沅江市"); + this.Add(431002, 431000, "北湖区"); + this.Add(431003, 431000, "苏仙区"); + this.Add(431021, 431000, "桂阳县"); + this.Add(431022, 431000, "宜章县"); + this.Add(431023, 431000, "永兴县"); + this.Add(431024, 431000, "嘉禾县"); + this.Add(431025, 431000, "临武县"); + this.Add(431026, 431000, "汝城县"); + this.Add(431027, 431000, "桂东县"); + this.Add(431028, 431000, "安仁县"); + this.Add(431081, 431000, "资兴市"); + this.Add(431102, 431100, "零陵区"); + this.Add(431103, 431100, "冷水滩区"); + this.Add(431121, 431100, "祁阳县"); + this.Add(431122, 431100, "东安县"); + this.Add(431123, 431100, "双牌县"); + this.Add(431124, 431100, "道县"); + this.Add(431125, 431100, "江永县"); + this.Add(431126, 431100, "宁远县"); + this.Add(431127, 431100, "蓝山县"); + this.Add(431128, 431100, "新田县"); + this.Add(431129, 431100, "江华瑶族自治县"); + this.Add(431202, 431200, "鹤城区"); + this.Add(431221, 431200, "中方县"); + this.Add(431222, 431200, "沅陵县"); + this.Add(431223, 431200, "辰溪县"); + this.Add(431224, 431200, "溆浦县"); + this.Add(431225, 431200, "会同县"); + this.Add(431226, 431200, "麻阳苗族自治县"); + this.Add(431227, 431200, "新晃侗族自治县"); + this.Add(431228, 431200, "芷江侗族自治县"); + this.Add(431229, 431200, "靖州苗族侗族自治县"); + this.Add(431230, 431200, "通道侗族自治县"); + this.Add(431281, 431200, "洪江市"); + this.Add(431302, 431300, "娄星区"); + this.Add(431321, 431300, "双峰县"); + this.Add(431322, 431300, "新化县"); + this.Add(431381, 431300, "冷水江市"); + this.Add(431382, 431300, "涟源市"); + this.Add(433101, 433100, "吉首市"); + this.Add(433122, 433100, "泸溪县"); + this.Add(433123, 433100, "凤凰县"); + this.Add(433124, 433100, "花垣县"); + this.Add(433125, 433100, "保靖县"); + this.Add(433126, 433100, "古丈县"); + this.Add(433127, 433100, "永顺县"); + this.Add(433130, 433100, "龙山县"); + this.Add(440100, 440000, "广州市"); + this.Add(440200, 440000, "韶关市"); + this.Add(440300, 440000, "深圳市"); + this.Add(440400, 440000, "珠海市"); + this.Add(440500, 440000, "汕头市"); + this.Add(440600, 440000, "佛山市"); + this.Add(440700, 440000, "江门市"); + this.Add(440800, 440000, "湛江市"); + this.Add(440900, 440000, "茂名市"); + this.Add(441200, 440000, "肇庆市"); + this.Add(441300, 440000, "惠州市"); + this.Add(441400, 440000, "梅州市"); + this.Add(441500, 440000, "汕尾市"); + this.Add(441600, 440000, "河源市"); + this.Add(441700, 440000, "阳江市"); + this.Add(441800, 440000, "清远市"); + this.Add(441900, 440000, "东莞市"); + this.Add(442000, 440000, "中山市"); + this.Add(445100, 440000, "潮州市"); + this.Add(445200, 440000, "揭阳市"); + this.Add(445300, 440000, "云浮市"); + this.Add(440103, 440100, "荔湾区"); + this.Add(440104, 440100, "越秀区"); + this.Add(440105, 440100, "海珠区"); + this.Add(440106, 440100, "天河区"); + this.Add(440111, 440100, "白云区"); + this.Add(440112, 440100, "黄埔区"); + this.Add(440113, 440100, "番禺区"); + this.Add(440114, 440100, "花都区"); + this.Add(440115, 440100, "南沙区"); + this.Add(440117, 440100, "从化区"); + this.Add(440118, 440100, "增城区"); + this.Add(440203, 440200, "武江区"); + this.Add(440204, 440200, "浈江区"); + this.Add(440205, 440200, "曲江区"); + this.Add(440222, 440200, "始兴县"); + this.Add(440224, 440200, "仁化县"); + this.Add(440229, 440200, "翁源县"); + this.Add(440232, 440200, "乳源瑶族自治县"); + this.Add(440233, 440200, "新丰县"); + this.Add(440281, 440200, "乐昌市"); + this.Add(440282, 440200, "南雄市"); + this.Add(440303, 440300, "罗湖区"); + this.Add(440304, 440300, "福田区"); + this.Add(440305, 440300, "南山区"); + this.Add(440306, 440300, "宝安区"); + this.Add(440307, 440300, "龙岗区"); + this.Add(440308, 440300, "盐田区"); + this.Add(440309, 440300, "龙华区"); + this.Add(440310, 440300, "坪山区"); + this.Add(440311, 440300, "光明区"); + this.Add(440402, 440400, "香洲区"); + this.Add(440403, 440400, "斗门区"); + this.Add(440404, 440400, "金湾区"); + this.Add(440507, 440500, "龙湖区"); + this.Add(440511, 440500, "金平区"); + this.Add(440512, 440500, "濠江区"); + this.Add(440513, 440500, "潮阳区"); + this.Add(440514, 440500, "潮南区"); + this.Add(440515, 440500, "澄海区"); + this.Add(440523, 440500, "南澳县"); + this.Add(440604, 440600, "禅城区"); + this.Add(440605, 440600, "南海区"); + + this.Add(440606, 440600, "顺德区"); + this.Add(440607, 440600, "三水区"); + this.Add(440608, 440600, "高明区"); + this.Add(440703, 440700, "蓬江区"); + this.Add(440704, 440700, "江海区"); + this.Add(440705, 440700, "新会区"); + this.Add(440781, 440700, "台山市"); + this.Add(440783, 440700, "开平市"); + this.Add(440784, 440700, "鹤山市"); + this.Add(440785, 440700, "恩平市"); + this.Add(440802, 440800, "赤坎区"); + this.Add(440803, 440800, "霞山区"); + this.Add(440804, 440800, "坡头区"); + this.Add(440811, 440800, "麻章区"); + this.Add(440823, 440800, "遂溪县"); + this.Add(440825, 440800, "徐闻县"); + this.Add(440881, 440800, "廉江市"); + this.Add(440882, 440800, "雷州市"); + this.Add(440883, 440800, "吴川市"); + this.Add(440902, 440900, "茂南区"); + this.Add(440904, 440900, "电白区"); + this.Add(440981, 440900, "高州市"); + this.Add(440982, 440900, "化州市"); + this.Add(440983, 440900, "信宜市"); + this.Add(441202, 441200, "端州区"); + this.Add(441203, 441200, "鼎湖区"); + this.Add(441204, 441200, "高要区"); + this.Add(441223, 441200, "广宁县"); + this.Add(441224, 441200, "怀集县"); + this.Add(441225, 441200, "封开县"); + this.Add(441226, 441200, "德庆县"); + this.Add(441284, 441200, "四会市"); + this.Add(441302, 441300, "惠城区"); + this.Add(441303, 441300, "惠阳区"); + this.Add(441322, 441300, "博罗县"); + this.Add(441323, 441300, "惠东县"); + this.Add(441324, 441300, "龙门县"); + this.Add(441402, 441400, "梅江区"); + this.Add(441403, 441400, "梅县区"); + this.Add(441422, 441400, "大埔县"); + this.Add(441423, 441400, "丰顺县"); + this.Add(441424, 441400, "五华县"); + this.Add(441426, 441400, "平远县"); + this.Add(441427, 441400, "蕉岭县"); + this.Add(441481, 441400, "兴宁市"); + this.Add(441502, 441500, "城区"); + this.Add(441521, 441500, "海丰县"); + this.Add(441523, 441500, "陆河县"); + this.Add(441581, 441500, "陆丰市"); + this.Add(441602, 441600, "源城区"); + this.Add(441621, 441600, "紫金县"); + this.Add(441622, 441600, "龙川县"); + this.Add(441623, 441600, "连平县"); + this.Add(441624, 441600, "和平县"); + this.Add(441625, 441600, "东源县"); + this.Add(441702, 441700, "江城区"); + this.Add(441704, 441700, "阳东区"); + this.Add(441721, 441700, "阳西县"); + this.Add(441781, 441700, "阳春市"); + this.Add(441802, 441800, "清城区"); + this.Add(441803, 441800, "清新区"); + this.Add(441821, 441800, "佛冈县"); + this.Add(441823, 441800, "阳山县"); + this.Add(441825, 441800, "连山壮族瑶族自治县"); + this.Add(441826, 441800, "连南瑶族自治县"); + this.Add(441881, 441800, "英德市"); + this.Add(441882, 441800, "连州市"); + this.Add(445102, 445100, "湘桥区"); + this.Add(445103, 445100, "潮安区"); + this.Add(445122, 445100, "饶平县"); + this.Add(445202, 445200, "榕城区"); + this.Add(445203, 445200, "揭东区"); + this.Add(445222, 445200, "揭西县"); + this.Add(445224, 445200, "惠来县"); + this.Add(445281, 445200, "普宁市"); + this.Add(445302, 445300, "云城区"); + this.Add(445303, 445300, "云安区"); + this.Add(445321, 445300, "新兴县"); + this.Add(445322, 445300, "郁南县"); + this.Add(445381, 445300, "罗定市"); + this.Add(450100, 450000, "南宁市"); + this.Add(450200, 450000, "柳州市"); + this.Add(450300, 450000, "桂林市"); + this.Add(450400, 450000, "梧州市"); + this.Add(450500, 450000, "北海市"); + this.Add(450600, 450000, "防城港市"); + this.Add(450700, 450000, "钦州市"); + this.Add(450800, 450000, "贵港市"); + this.Add(450900, 450000, "玉林市"); + this.Add(451000, 450000, "百色市"); + this.Add(451100, 450000, "贺州市"); + this.Add(451200, 450000, "河池市"); + this.Add(451300, 450000, "来宾市"); + this.Add(451400, 450000, "崇左市"); + this.Add(450102, 450100, "兴宁区"); + this.Add(450103, 450100, "青秀区"); + this.Add(450105, 450100, "江南区"); + this.Add(450107, 450100, "西乡塘区"); + this.Add(450108, 450100, "良庆区"); + this.Add(450109, 450100, "邕宁区"); + this.Add(450110, 450100, "武鸣区"); + this.Add(450123, 450100, "隆安县"); + this.Add(450124, 450100, "马山县"); + this.Add(450125, 450100, "上林县"); + this.Add(450126, 450100, "宾阳县"); + this.Add(450127, 450100, "横县"); + this.Add(450202, 450200, "城中区"); + this.Add(450203, 450200, "鱼峰区"); + this.Add(450204, 450200, "柳南区"); + this.Add(450205, 450200, "柳北区"); + this.Add(450206, 450200, "柳江区"); + this.Add(450222, 450200, "柳城县"); + this.Add(450223, 450200, "鹿寨县"); + this.Add(450224, 450200, "融安县"); + this.Add(450225, 450200, "融水苗族自治县"); + this.Add(450226, 450200, "三江侗族自治县"); + this.Add(450302, 450300, "秀峰区"); + this.Add(450303, 450300, "叠彩区"); + this.Add(450304, 450300, "象山区"); + this.Add(450305, 450300, "七星区"); + this.Add(450311, 450300, "雁山区"); + this.Add(450312, 450300, "临桂区"); + this.Add(450321, 450300, "阳朔县"); + this.Add(450323, 450300, "灵川县"); + this.Add(450324, 450300, "全州县"); + this.Add(450325, 450300, "兴安县"); + this.Add(450326, 450300, "永福县"); + this.Add(450327, 450300, "灌阳县"); + this.Add(450328, 450300, "龙胜各族自治县"); + this.Add(450329, 450300, "资源县"); + this.Add(450330, 450300, "平乐县"); + this.Add(450332, 450300, "恭城瑶族自治县"); + this.Add(450381, 450300, "荔浦市"); + this.Add(450403, 450400, "万秀区"); + this.Add(450405, 450400, "长洲区"); + this.Add(450406, 450400, "龙圩区"); + this.Add(450421, 450400, "苍梧县"); + this.Add(450422, 450400, "藤县"); + this.Add(450423, 450400, "蒙山县"); + this.Add(450481, 450400, "岑溪市"); + this.Add(450502, 450500, "海城区"); + this.Add(450503, 450500, "银海区"); + this.Add(450512, 450500, "铁山港区"); + this.Add(450521, 450500, "合浦县"); + this.Add(450602, 450600, "港口区"); + this.Add(450603, 450600, "防城区"); + this.Add(450621, 450600, "上思县"); + this.Add(450681, 450600, "东兴市"); + this.Add(450702, 450700, "钦南区"); + this.Add(450703, 450700, "钦北区"); + this.Add(450721, 450700, "灵山县"); + this.Add(450722, 450700, "浦北县"); + this.Add(450802, 450800, "港北区"); + this.Add(450803, 450800, "港南区"); + this.Add(450804, 450800, "覃塘区"); + this.Add(450821, 450800, "平南县"); + this.Add(450881, 450800, "桂平市"); + this.Add(450902, 450900, "玉州区"); + this.Add(450903, 450900, "福绵区"); + this.Add(450921, 450900, "容县"); + this.Add(450922, 450900, "陆川县"); + this.Add(450923, 450900, "博白县"); + this.Add(450924, 450900, "兴业县"); + this.Add(450981, 450900, "北流市"); + this.Add(451002, 451000, "右江区"); + this.Add(451003, 451000, "田阳区"); + this.Add(451022, 451000, "田东县"); + this.Add(451024, 451000, "德保县"); + this.Add(451026, 451000, "那坡县"); + this.Add(451027, 451000, "凌云县"); + this.Add(451028, 451000, "乐业县"); + this.Add(451029, 451000, "田林县"); + this.Add(451030, 451000, "西林县"); + this.Add(451031, 451000, "隆林各族自治县"); + this.Add(451081, 451000, "靖西市"); + this.Add(451082, 451000, "平果市"); + this.Add(451102, 451100, "八步区"); + this.Add(451103, 451100, "平桂区"); + this.Add(451121, 451100, "昭平县"); + this.Add(451122, 451100, "钟山县"); + this.Add(451123, 451100, "富川瑶族自治县"); + this.Add(451202, 451200, "金城江区"); + this.Add(451203, 451200, "宜州区"); + this.Add(451221, 451200, "南丹县"); + this.Add(451222, 451200, "天峨县"); + this.Add(451223, 451200, "凤山县"); + this.Add(451224, 451200, "东兰县"); + this.Add(451225, 451200, "罗城仫佬族自治县"); + this.Add(451226, 451200, "环江毛南族自治县"); + this.Add(451227, 451200, "巴马瑶族自治县"); + this.Add(451228, 451200, "都安瑶族自治县"); + this.Add(451229, 451200, "大化瑶族自治县"); + this.Add(451302, 451300, "兴宾区"); + this.Add(451321, 451300, "忻城县"); + this.Add(451322, 451300, "象州县"); + this.Add(451323, 451300, "武宣县"); + this.Add(451324, 451300, "金秀瑶族自治县"); + this.Add(451381, 451300, "合山市"); + this.Add(451402, 451400, "江州区"); + this.Add(451421, 451400, "扶绥县"); + this.Add(451422, 451400, "宁明县"); + this.Add(451423, 451400, "龙州县"); + this.Add(451424, 451400, "大新县"); + this.Add(451425, 451400, "天等县"); + this.Add(451481, 451400, "凭祥市"); + this.Add(460100, 460000, "海口市"); + this.Add(460200, 460000, "三亚市"); + this.Add(460300, 460000, "三沙市"); + this.Add(460400, 460000, "儋州市"); + this.Add(469001, 460000, "五指山市"); + this.Add(469002, 460000, "琼海市"); + this.Add(469005, 460000, "文昌市"); + this.Add(469006, 460000, "万宁市"); + this.Add(469007, 460000, "东方市"); + this.Add(469021, 460000, "定安县"); + this.Add(469022, 460000, "屯昌县"); + this.Add(469023, 460000, "澄迈县"); + this.Add(469024, 460000, "临高县"); + this.Add(469025, 460000, "白沙黎族自治县"); + this.Add(469026, 460000, "昌江黎族自治县"); + this.Add(469027, 460000, "乐东黎族自治县"); + this.Add(469028, 460000, "陵水黎族自治县"); + this.Add(469029, 460000, "保亭黎族苗族自治县"); + this.Add(469030, 460000, "琼中黎族苗族自治县"); + this.Add(460105, 460100, "秀英区"); + this.Add(460106, 460100, "龙华区"); + this.Add(460107, 460100, "琼山区"); + this.Add(460108, 460100, "美兰区"); + this.Add(460202, 460200, "海棠区"); + this.Add(460203, 460200, "吉阳区"); + this.Add(460204, 460200, "天涯区"); + this.Add(460205, 460200, "崖州区"); + this.Add(460301, 460300, "西沙区"); + this.Add(460302, 460300, "南沙区"); + this.Add(500101, 500000, "万州区"); + this.Add(500102, 500000, "涪陵区"); + this.Add(500103, 500000, "渝中区"); + this.Add(500104, 500000, "大渡口区"); + this.Add(500105, 500000, "江北区"); + this.Add(500106, 500000, "沙坪坝区"); + this.Add(500107, 500000, "九龙坡区"); + this.Add(500108, 500000, "南岸区"); + this.Add(500109, 500000, "北碚区"); + this.Add(500110, 500000, "綦江区"); + this.Add(500111, 500000, "大足区"); + this.Add(500112, 500000, "渝北区"); + this.Add(500113, 500000, "巴南区"); + this.Add(500114, 500000, "黔江区"); + this.Add(500115, 500000, "长寿区"); + this.Add(500116, 500000, "江津区"); + this.Add(500117, 500000, "合川区"); + this.Add(500118, 500000, "永川区"); + this.Add(500119, 500000, "南川区"); + this.Add(500120, 500000, "璧山区"); + this.Add(500151, 500000, "铜梁区"); + this.Add(500152, 500000, "潼南区"); + this.Add(500153, 500000, "荣昌区"); + this.Add(500154, 500000, "开州区"); + this.Add(500155, 500000, "梁平区"); + this.Add(500156, 500000, "武隆区"); + this.Add(500200, 500000, "重庆市郊县"); + this.Add(500229, 500000, "城口县"); + this.Add(500230, 500000, "丰都县"); + this.Add(500231, 500000, "垫江县"); + this.Add(500233, 500000, "忠县"); + this.Add(500235, 500000, "云阳县"); + this.Add(500236, 500000, "奉节县"); + this.Add(500237, 500000, "巫山县"); + this.Add(500238, 500000, "巫溪县"); + this.Add(500240, 500000, "石柱土家族自治县"); + this.Add(500241, 500000, "秀山土家族苗族自治县"); + this.Add(500242, 500000, "酉阳土家族苗族自治县"); + this.Add(500243, 500000, "彭水苗族土家族自治县"); + this.Add(510100, 510000, "成都市"); + this.Add(510300, 510000, "自贡市"); + this.Add(510400, 510000, "攀枝花市"); + this.Add(510500, 510000, "泸州市"); + this.Add(510600, 510000, "德阳市"); + this.Add(510700, 510000, "绵阳市"); + this.Add(510800, 510000, "广元市"); + this.Add(510900, 510000, "遂宁市"); + this.Add(511000, 510000, "内江市"); + this.Add(511100, 510000, "乐山市"); + this.Add(511300, 510000, "南充市"); + this.Add(511400, 510000, "眉山市"); + this.Add(511500, 510000, "宜宾市"); + this.Add(511600, 510000, "广安市"); + this.Add(511700, 510000, "达州市"); + this.Add(511800, 510000, "雅安市"); + this.Add(511900, 510000, "巴中市"); + this.Add(512000, 510000, "资阳市"); + this.Add(513200, 510000, "阿坝藏族羌族自治州"); + this.Add(513300, 510000, "甘孜藏族自治州"); + this.Add(513400, 510000, "凉山彝族自治州"); + this.Add(510104, 510100, "锦江区"); + this.Add(510105, 510100, "青羊区"); + this.Add(510106, 510100, "金牛区"); + this.Add(510107, 510100, "武侯区"); + this.Add(510108, 510100, "成华区"); + this.Add(510112, 510100, "龙泉驿区"); + this.Add(510113, 510100, "青白江区"); + this.Add(510114, 510100, "新都区"); + this.Add(510115, 510100, "温江区"); + this.Add(510116, 510100, "双流区"); + this.Add(510117, 510100, "郫都区"); + this.Add(510118, 510100, "新津区"); + this.Add(510121, 510100, "金堂县"); + this.Add(510129, 510100, "大邑县"); + this.Add(510131, 510100, "蒲江县"); + this.Add(510181, 510100, "都江堰市"); + this.Add(510182, 510100, "彭州市"); + this.Add(510183, 510100, "邛崃市"); + this.Add(510184, 510100, "崇州市"); + this.Add(510185, 510100, "简阳市"); + this.Add(510302, 510300, "自流井区"); + this.Add(510303, 510300, "贡井区"); + this.Add(510304, 510300, "大安区"); + this.Add(510311, 510300, "沿滩区"); + this.Add(510321, 510300, "荣县"); + this.Add(510322, 510300, "富顺县"); + this.Add(510402, 510400, "东区"); + this.Add(510403, 510400, "西区"); + this.Add(510411, 510400, "仁和区"); + this.Add(510421, 510400, "米易县"); + this.Add(510422, 510400, "盐边县"); + this.Add(510502, 510500, "江阳区"); + this.Add(510503, 510500, "纳溪区"); + this.Add(510504, 510500, "龙马潭区"); + this.Add(510521, 510500, "泸县"); + this.Add(510522, 510500, "合江县"); + this.Add(510524, 510500, "叙永县"); + this.Add(510525, 510500, "古蔺县"); + this.Add(510603, 510600, "旌阳区"); + this.Add(510604, 510600, "罗江区"); + this.Add(510623, 510600, "中江县"); + this.Add(510681, 510600, "广汉市"); + this.Add(510682, 510600, "什邡市"); + this.Add(510683, 510600, "绵竹市"); + this.Add(510703, 510700, "涪城区"); + this.Add(510704, 510700, "游仙区"); + this.Add(510705, 510700, "安州区"); + this.Add(510722, 510700, "三台县"); + this.Add(510723, 510700, "盐亭县"); + this.Add(510725, 510700, "梓潼县"); + this.Add(510726, 510700, "北川羌族自治县"); + this.Add(510727, 510700, "平武县"); + this.Add(510781, 510700, "江油市"); + this.Add(510802, 510800, "利州区"); + this.Add(510811, 510800, "昭化区"); + this.Add(510812, 510800, "朝天区"); + this.Add(510821, 510800, "旺苍县"); + this.Add(510822, 510800, "青川县"); + this.Add(510823, 510800, "剑阁县"); + this.Add(510824, 510800, "苍溪县"); + this.Add(510903, 510900, "船山区"); + this.Add(510904, 510900, "安居区"); + this.Add(510921, 510900, "蓬溪县"); + this.Add(510923, 510900, "大英县"); + this.Add(510981, 510900, "射洪市"); + this.Add(511002, 511000, "市中区"); + this.Add(511011, 511000, "东兴区"); + this.Add(511024, 511000, "威远县"); + this.Add(511025, 511000, "资中县"); + this.Add(511083, 511000, "隆昌市"); + this.Add(511102, 511100, "市中区"); + this.Add(511111, 511100, "沙湾区"); + this.Add(511112, 511100, "五通桥区"); + this.Add(511113, 511100, "金口河区"); + this.Add(511123, 511100, "犍为县"); + this.Add(511124, 511100, "井研县"); + this.Add(511126, 511100, "夹江县"); + this.Add(511129, 511100, "沐川县"); + this.Add(511132, 511100, "峨边彝族自治县"); + this.Add(511133, 511100, "马边彝族自治县"); + this.Add(511181, 511100, "峨眉山市"); + this.Add(511302, 511300, "顺庆区"); + this.Add(511303, 511300, "高坪区"); + this.Add(511304, 511300, "嘉陵区"); + this.Add(511321, 511300, "南部县"); + this.Add(511322, 511300, "营山县"); + this.Add(511323, 511300, "蓬安县"); + this.Add(511324, 511300, "仪陇县"); + this.Add(511325, 511300, "西充县"); + this.Add(511381, 511300, "阆中市"); + this.Add(511402, 511400, "东坡区"); + this.Add(511403, 511400, "彭山区"); + this.Add(511421, 511400, "仁寿县"); + this.Add(511423, 511400, "洪雅县"); + this.Add(511424, 511400, "丹棱县"); + this.Add(511425, 511400, "青神县"); + this.Add(511502, 511500, "翠屏区"); + this.Add(511503, 511500, "南溪区"); + this.Add(511504, 511500, "叙州区"); + this.Add(511523, 511500, "江安县"); + this.Add(511524, 511500, "长宁县"); + this.Add(511525, 511500, "高县"); + this.Add(511526, 511500, "珙县"); + this.Add(511527, 511500, "筠连县"); + this.Add(511528, 511500, "兴文县"); + this.Add(511529, 511500, "屏山县"); + this.Add(511602, 511600, "广安区"); + this.Add(511603, 511600, "前锋区"); + this.Add(511621, 511600, "岳池县"); + this.Add(511622, 511600, "武胜县"); + this.Add(511623, 511600, "邻水县"); + this.Add(511681, 511600, "华蓥市"); + this.Add(511702, 511700, "通川区"); + this.Add(511703, 511700, "达川区"); + this.Add(511722, 511700, "宣汉县"); + this.Add(511723, 511700, "开江县"); + this.Add(511724, 511700, "大竹县"); + this.Add(511725, 511700, "渠县"); + this.Add(511781, 511700, "万源市"); + this.Add(511802, 511800, "雨城区"); + this.Add(511803, 511800, "名山区"); + this.Add(511822, 511800, "荥经县"); + this.Add(511823, 511800, "汉源县"); + this.Add(511824, 511800, "石棉县"); + this.Add(511825, 511800, "天全县"); + this.Add(511826, 511800, "芦山县"); + this.Add(511827, 511800, "宝兴县"); + this.Add(511902, 511900, "巴州区"); + this.Add(511903, 511900, "恩阳区"); + this.Add(511921, 511900, "通江县"); + this.Add(511922, 511900, "南江县"); + this.Add(511923, 511900, "平昌县"); + this.Add(512002, 512000, "雁江区"); + this.Add(512021, 512000, "安岳县"); + this.Add(512022, 512000, "乐至县"); + this.Add(513201, 513200, "马尔康市"); + this.Add(513221, 513200, "汶川县"); + this.Add(513222, 513200, "理县"); + this.Add(513223, 513200, "茂县"); + this.Add(513224, 513200, "松潘县"); + this.Add(513225, 513200, "九寨沟县"); + this.Add(513226, 513200, "金川县"); + this.Add(513227, 513200, "小金县"); + this.Add(513228, 513200, "黑水县"); + this.Add(513230, 513200, "壤塘县"); + this.Add(513231, 513200, "阿坝县"); + this.Add(513232, 513200, "若尔盖县"); + this.Add(513233, 513200, "红原县"); + this.Add(513301, 513300, "康定市"); + this.Add(513322, 513300, "泸定县"); + this.Add(513323, 513300, "丹巴县"); + this.Add(513324, 513300, "九龙县"); + this.Add(513325, 513300, "雅江县"); + this.Add(513326, 513300, "道孚县"); + this.Add(513327, 513300, "炉霍县"); + this.Add(513328, 513300, "甘孜县"); + this.Add(513329, 513300, "新龙县"); + this.Add(513330, 513300, "德格县"); + this.Add(513331, 513300, "白玉县"); + this.Add(513332, 513300, "石渠县"); + this.Add(513333, 513300, "色达县"); + this.Add(513334, 513300, "理塘县"); + this.Add(513335, 513300, "巴塘县"); + this.Add(513336, 513300, "乡城县"); + this.Add(513337, 513300, "稻城县"); + this.Add(513338, 513300, "得荣县"); + this.Add(513401, 513400, "西昌市"); + this.Add(513422, 513400, "木里藏族自治县"); + this.Add(513423, 513400, "盐源县"); + this.Add(513424, 513400, "德昌县"); + this.Add(513425, 513400, "会理县"); + this.Add(513426, 513400, "会东县"); + this.Add(513427, 513400, "宁南县"); + this.Add(513428, 513400, "普格县"); + this.Add(513429, 513400, "布拖县"); + this.Add(513430, 513400, "金阳县"); + this.Add(513431, 513400, "昭觉县"); + this.Add(513432, 513400, "喜德县"); + this.Add(513433, 513400, "冕宁县"); + this.Add(513434, 513400, "越西县"); + this.Add(513435, 513400, "甘洛县"); + this.Add(513436, 513400, "美姑县"); + this.Add(513437, 513400, "雷波县"); + this.Add(520100, 520000, "贵阳市"); + this.Add(520200, 520000, "六盘水市"); + this.Add(520300, 520000, "遵义市"); + this.Add(520400, 520000, "安顺市"); + this.Add(520500, 520000, "毕节市"); + this.Add(520600, 520000, "铜仁市"); + this.Add(522300, 520000, "黔西南布依族苗族自治州"); + this.Add(522600, 520000, "黔东南苗族侗族自治州"); + this.Add(522700, 520000, "黔南布依族苗族自治州"); + this.Add(520102, 520100, "南明区"); + this.Add(520103, 520100, "云岩区"); + this.Add(520111, 520100, "花溪区"); + this.Add(520112, 520100, "乌当区"); + this.Add(520113, 520100, "白云区"); + this.Add(520115, 520100, "观山湖区"); + this.Add(520121, 520100, "开阳县"); + this.Add(520122, 520100, "息烽县"); + this.Add(520123, 520100, "修文县"); + this.Add(520181, 520100, "清镇市"); + this.Add(520201, 520200, "钟山区"); + this.Add(520203, 520200, "六枝特区"); + this.Add(520221, 520200, "水城区"); + this.Add(520281, 520200, "盘州市"); + this.Add(520302, 520300, "红花岗区"); + this.Add(520303, 520300, "汇川区"); + this.Add(520304, 520300, "播州区"); + this.Add(520322, 520300, "桐梓县"); + this.Add(520323, 520300, "绥阳县"); + this.Add(520324, 520300, "正安县"); + this.Add(520325, 520300, "道真仡佬族苗族自治县"); + this.Add(520326, 520300, "务川仡佬族苗族自治县"); + this.Add(520327, 520300, "凤冈县"); + this.Add(520328, 520300, "湄潭县"); + this.Add(520329, 520300, "余庆县"); + this.Add(520330, 520300, "习水县"); + this.Add(520381, 520300, "赤水市"); + this.Add(520382, 520300, "仁怀市"); + this.Add(520402, 520400, "西秀区"); + this.Add(520403, 520400, "平坝区"); + this.Add(520422, 520400, "普定县"); + this.Add(520423, 520400, "镇宁布依族苗族自治县"); + this.Add(520424, 520400, "关岭布依族苗族自治县"); + this.Add(520425, 520400, "紫云苗族布依族自治县"); + this.Add(520502, 520500, "七星关区"); + this.Add(520521, 520500, "大方县"); + this.Add(520522, 520500, "黔西县"); + this.Add(520523, 520500, "金沙县"); + this.Add(520524, 520500, "织金县"); + this.Add(520525, 520500, "纳雍县"); + this.Add(520526, 520500, "威宁彝族回族苗族自治县"); + this.Add(520527, 520500, "赫章县"); + this.Add(520602, 520600, "碧江区"); + this.Add(520603, 520600, "万山区"); + this.Add(520621, 520600, "江口县"); + this.Add(520622, 520600, "玉屏侗族自治县"); + this.Add(520623, 520600, "石阡县"); + this.Add(520624, 520600, "思南县"); + this.Add(520625, 520600, "印江土家族苗族自治县"); + this.Add(520626, 520600, "德江县"); + this.Add(520627, 520600, "沿河土家族自治县"); + this.Add(520628, 520600, "松桃苗族自治县"); + this.Add(522301, 522300, "兴义市"); + this.Add(522302, 522300, "兴仁市"); + this.Add(522323, 522300, "普安县"); + this.Add(522324, 522300, "晴隆县"); + this.Add(522325, 522300, "贞丰县"); + this.Add(522326, 522300, "望谟县"); + this.Add(522327, 522300, "册亨县"); + this.Add(522328, 522300, "安龙县"); + this.Add(522601, 522600, "凯里市"); + this.Add(522622, 522600, "黄平县"); + this.Add(522623, 522600, "施秉县"); + this.Add(522624, 522600, "三穗县"); + this.Add(522625, 522600, "镇远县"); + this.Add(522626, 522600, "岑巩县"); + this.Add(522627, 522600, "天柱县"); + this.Add(522628, 522600, "锦屏县"); + this.Add(522629, 522600, "剑河县"); + this.Add(522630, 522600, "台江县"); + this.Add(522631, 522600, "黎平县"); + this.Add(522632, 522600, "榕江县"); + this.Add(522633, 522600, "从江县"); + this.Add(522634, 522600, "雷山县"); + this.Add(522635, 522600, "麻江县"); + this.Add(522636, 522600, "丹寨县"); + this.Add(522701, 522700, "都匀市"); + this.Add(522702, 522700, "福泉市"); + this.Add(522722, 522700, "荔波县"); + this.Add(522723, 522700, "贵定县"); + this.Add(522725, 522700, "瓮安县"); + this.Add(522726, 522700, "独山县"); + this.Add(522727, 522700, "平塘县"); + this.Add(522728, 522700, "罗甸县"); + this.Add(522729, 522700, "长顺县"); + this.Add(522730, 522700, "龙里县"); + this.Add(522731, 522700, "惠水县"); + this.Add(522732, 522700, "三都水族自治县"); + this.Add(530100, 530000, "昆明市"); + this.Add(530300, 530000, "曲靖市"); + this.Add(530400, 530000, "玉溪市"); + this.Add(530500, 530000, "保山市"); + this.Add(530600, 530000, "昭通市"); + this.Add(530700, 530000, "丽江市"); + this.Add(530800, 530000, "普洱市"); + this.Add(530900, 530000, "临沧市"); + this.Add(532300, 530000, "楚雄彝族自治州"); + this.Add(532500, 530000, "红河哈尼族彝族自治州"); + this.Add(532600, 530000, "文山壮族苗族自治州"); + this.Add(532800, 530000, "西双版纳傣族自治州"); + this.Add(532900, 530000, "大理白族自治州"); + this.Add(533100, 530000, "德宏傣族景颇族自治州"); + this.Add(533300, 530000, "怒江傈僳族自治州"); + this.Add(533400, 530000, "迪庆藏族自治州"); + this.Add(530102, 530100, "五华区"); + this.Add(530103, 530100, "盘龙区"); + this.Add(530111, 530100, "官渡区"); + this.Add(530112, 530100, "西山区"); + this.Add(530113, 530100, "东川区"); + this.Add(530114, 530100, "呈贡区"); + this.Add(530115, 530100, "晋宁区"); + this.Add(530124, 530100, "富民县"); + this.Add(530125, 530100, "宜良县"); + this.Add(530126, 530100, "石林彝族自治县"); + this.Add(530127, 530100, "嵩明县"); + this.Add(530128, 530100, "禄劝彝族苗族自治县"); + this.Add(530129, 530100, "寻甸回族彝族自治县"); + this.Add(530181, 530100, "安宁市"); + this.Add(530302, 530300, "麒麟区"); + this.Add(530303, 530300, "沾益区"); + this.Add(530304, 530300, "马龙区"); + this.Add(530322, 530300, "陆良县"); + this.Add(530323, 530300, "师宗县"); + this.Add(530324, 530300, "罗平县"); + this.Add(530325, 530300, "富源县"); + this.Add(530326, 530300, "会泽县"); + this.Add(530381, 530300, "宣威市"); + this.Add(530402, 530400, "红塔区"); + this.Add(530403, 530400, "江川区"); + this.Add(530423, 530400, "通海县"); + this.Add(530424, 530400, "华宁县"); + this.Add(530425, 530400, "易门县"); + this.Add(530426, 530400, "峨山彝族自治县"); + this.Add(530427, 530400, "新平彝族傣族自治县"); + this.Add(530428, 530400, "元江哈尼族彝族傣族自治县"); + this.Add(530481, 530400, "澄江市"); + this.Add(530502, 530500, "隆阳区"); + this.Add(530521, 530500, "施甸县"); + this.Add(530523, 530500, "龙陵县"); + this.Add(530524, 530500, "昌宁县"); + this.Add(530581, 530500, "腾冲市"); + this.Add(530602, 530600, "昭阳区"); + this.Add(530621, 530600, "鲁甸县"); + this.Add(530622, 530600, "巧家县"); + this.Add(530623, 530600, "盐津县"); + this.Add(530624, 530600, "大关县"); + this.Add(530625, 530600, "永善县"); + this.Add(530626, 530600, "绥江县"); + this.Add(530627, 530600, "镇雄县"); + this.Add(530628, 530600, "彝良县"); + this.Add(530629, 530600, "威信县"); + this.Add(530681, 530600, "水富市"); + this.Add(530702, 530700, "古城区"); + this.Add(530721, 530700, "玉龙纳西族自治县"); + this.Add(530722, 530700, "永胜县"); + this.Add(530723, 530700, "华坪县"); + this.Add(530724, 530700, "宁蒗彝族自治县"); + this.Add(530802, 530800, "思茅区"); + this.Add(530821, 530800, "宁洱哈尼族彝族自治县"); + this.Add(530822, 530800, "墨江哈尼族自治县"); + this.Add(530823, 530800, "景东彝族自治县"); + this.Add(530824, 530800, "景谷傣族彝族自治县"); + this.Add(530825, 530800, "镇沅彝族哈尼族拉祜族自治县"); + this.Add(530826, 530800, "江城哈尼族彝族自治县"); + this.Add(530827, 530800, "孟连傣族拉祜族佤族自治县"); + this.Add(530828, 530800, "澜沧拉祜族自治县"); + this.Add(530829, 530800, "西盟佤族自治县"); + this.Add(530902, 530900, "临翔区"); + this.Add(530921, 530900, "凤庆县"); + this.Add(530922, 530900, "云县"); + this.Add(530923, 530900, "永德县"); + this.Add(530924, 530900, "镇康县"); + this.Add(530925, 530900, "双江拉祜族佤族布朗族傣族自治县"); + this.Add(530926, 530900, "耿马傣族佤族自治县"); + this.Add(530927, 530900, "沧源佤族自治县"); + this.Add(532301, 532300, "楚雄市"); + this.Add(532322, 532300, "双柏县"); + this.Add(532323, 532300, "牟定县"); + this.Add(532324, 532300, "南华县"); + this.Add(532325, 532300, "姚安县"); + this.Add(532326, 532300, "大姚县"); + this.Add(532327, 532300, "永仁县"); + this.Add(532328, 532300, "元谋县"); + this.Add(532329, 532300, "武定县"); + this.Add(532331, 532300, "禄丰县"); + this.Add(532501, 532500, "个旧市"); + this.Add(532502, 532500, "开远市"); + this.Add(532503, 532500, "蒙自市"); + this.Add(532504, 532500, "弥勒市"); + this.Add(532523, 532500, "屏边苗族自治县"); + this.Add(532524, 532500, "建水县"); + this.Add(532525, 532500, "石屏县"); + this.Add(532527, 532500, "泸西县"); + this.Add(532528, 532500, "元阳县"); + this.Add(532529, 532500, "红河县"); + this.Add(532530, 532500, "金平苗族瑶族傣族自治县"); + this.Add(532531, 532500, "绿春县"); + this.Add(532532, 532500, "河口瑶族自治县"); + this.Add(532601, 532600, "文山市"); + this.Add(532622, 532600, "砚山县"); + this.Add(532623, 532600, "西畴县"); + this.Add(532624, 532600, "麻栗坡县"); + this.Add(532625, 532600, "马关县"); + this.Add(532626, 532600, "丘北县"); + this.Add(532627, 532600, "广南县"); + this.Add(532628, 532600, "富宁县"); + this.Add(532801, 532800, "景洪市"); + this.Add(532822, 532800, "勐海县"); + this.Add(532823, 532800, "勐腊县"); + this.Add(532901, 532900, "大理市"); + this.Add(532922, 532900, "漾濞彝族自治县"); + this.Add(532923, 532900, "祥云县"); + this.Add(532924, 532900, "宾川县"); + this.Add(532925, 532900, "弥渡县"); + this.Add(532926, 532900, "南涧彝族自治县"); + this.Add(532927, 532900, "巍山彝族回族自治县"); + this.Add(532928, 532900, "永平县"); + this.Add(532929, 532900, "云龙县"); + this.Add(532930, 532900, "洱源县"); + this.Add(532931, 532900, "剑川县"); + this.Add(532932, 532900, "鹤庆县"); + this.Add(533102, 533100, "瑞丽市"); + this.Add(533103, 533100, "芒市"); + this.Add(533122, 533100, "梁河县"); + this.Add(533123, 533100, "盈江县"); + this.Add(533124, 533100, "陇川县"); + this.Add(533301, 533300, "泸水市"); + this.Add(533323, 533300, "福贡县"); + this.Add(533324, 533300, "贡山独龙族怒族自治县"); + this.Add(533325, 533300, "兰坪白族普米族自治县"); + this.Add(533401, 533400, "香格里拉市"); + this.Add(533422, 533400, "德钦县"); + this.Add(533423, 533400, "维西傈僳族自治县"); + this.Add(540100, 540000, "拉萨市"); + this.Add(540200, 540000, "日喀则市"); + this.Add(540300, 540000, "昌都市"); + this.Add(540400, 540000, "林芝市"); + this.Add(540500, 540000, "山南市"); + this.Add(540600, 540000, "那曲市"); + this.Add(542500, 540000, "阿里地区"); + this.Add(540102, 540100, "城关区"); + this.Add(540103, 540100, "堆龙德庆区"); + this.Add(540104, 540100, "达孜区"); + this.Add(540121, 540100, "林周县"); + this.Add(540122, 540100, "当雄县"); + this.Add(540123, 540100, "尼木县"); + this.Add(540124, 540100, "曲水县"); + this.Add(540127, 540100, "墨竹工卡县"); + this.Add(540202, 540200, "桑珠孜区"); + this.Add(540221, 540200, "南木林县"); + this.Add(540222, 540200, "江孜县"); + this.Add(540223, 540200, "定日县"); + this.Add(540224, 540200, "萨迦县"); + this.Add(540225, 540200, "拉孜县"); + this.Add(540226, 540200, "昂仁县"); + this.Add(540227, 540200, "谢通门县"); + this.Add(540228, 540200, "白朗县"); + this.Add(540229, 540200, "仁布县"); + this.Add(540230, 540200, "康马县"); + this.Add(540231, 540200, "定结县"); + this.Add(540232, 540200, "仲巴县"); + this.Add(540233, 540200, "亚东县"); + this.Add(540234, 540200, "吉隆县"); + this.Add(540235, 540200, "聂拉木县"); + this.Add(540236, 540200, "萨嘎县"); + this.Add(540237, 540200, "岗巴县"); + this.Add(540302, 540300, "卡若区"); + this.Add(540321, 540300, "江达县"); + this.Add(540322, 540300, "贡觉县"); + this.Add(540323, 540300, "类乌齐县"); + this.Add(540324, 540300, "丁青县"); + this.Add(540325, 540300, "察雅县"); + this.Add(540326, 540300, "八宿县"); + this.Add(540327, 540300, "左贡县"); + this.Add(540328, 540300, "芒康县"); + this.Add(540329, 540300, "洛隆县"); + this.Add(540330, 540300, "边坝县"); + this.Add(540402, 540400, "巴宜区"); + this.Add(540421, 540400, "工布江达县"); + this.Add(540422, 540400, "米林县"); + this.Add(540423, 540400, "墨脱县"); + this.Add(540424, 540400, "波密县"); + this.Add(540425, 540400, "察隅县"); + this.Add(540426, 540400, "朗县"); + this.Add(540502, 540500, "乃东区"); + this.Add(540521, 540500, "扎囊县"); + this.Add(540522, 540500, "贡嘎县"); + this.Add(540523, 540500, "桑日县"); + this.Add(540524, 540500, "琼结县"); + this.Add(540525, 540500, "曲松县"); + this.Add(540526, 540500, "措美县"); + this.Add(540527, 540500, "洛扎县"); + this.Add(540528, 540500, "加查县"); + this.Add(540529, 540500, "隆子县"); + this.Add(540530, 540500, "错那县"); + this.Add(540531, 540500, "浪卡子县"); + this.Add(540602, 540600, "色尼区"); + this.Add(540621, 540600, "嘉黎县"); + this.Add(540622, 540600, "比如县"); + this.Add(540623, 540600, "聂荣县"); + this.Add(540624, 540600, "安多县"); + this.Add(540625, 540600, "申扎县"); + this.Add(540626, 540600, "索县"); + this.Add(540627, 540600, "班戈县"); + this.Add(540628, 540600, "巴青县"); + this.Add(540629, 540600, "尼玛县"); + this.Add(540630, 540600, "双湖县"); + this.Add(542521, 542500, "普兰县"); + this.Add(542522, 542500, "札达县"); + this.Add(542523, 542500, "噶尔县"); + this.Add(542524, 542500, "日土县"); + this.Add(542525, 542500, "革吉县"); + this.Add(542526, 542500, "改则县"); + this.Add(542527, 542500, "措勤县"); + this.Add(610100, 610000, "西安市"); + this.Add(610200, 610000, "铜川市"); + this.Add(610300, 610000, "宝鸡市"); + this.Add(610400, 610000, "咸阳市"); + this.Add(610500, 610000, "渭南市"); + this.Add(610600, 610000, "延安市"); + this.Add(610700, 610000, "汉中市"); + this.Add(610800, 610000, "榆林市"); + this.Add(610900, 610000, "安康市"); + this.Add(611000, 610000, "商洛市"); + this.Add(610102, 610100, "新城区"); + this.Add(610103, 610100, "碑林区"); + this.Add(610104, 610100, "莲湖区"); + this.Add(610111, 610100, "灞桥区"); + this.Add(610112, 610100, "未央区"); + this.Add(610113, 610100, "雁塔区"); + this.Add(610114, 610100, "阎良区"); + this.Add(610115, 610100, "临潼区"); + this.Add(610116, 610100, "长安区"); + this.Add(610117, 610100, "高陵区"); + this.Add(610118, 610100, "鄠邑区"); + this.Add(610122, 610100, "蓝田县"); + this.Add(610124, 610100, "周至县"); + this.Add(610202, 610200, "王益区"); + this.Add(610203, 610200, "印台区"); + this.Add(610204, 610200, "耀州区"); + this.Add(610222, 610200, "宜君县"); + this.Add(610302, 610300, "渭滨区"); + this.Add(610303, 610300, "金台区"); + this.Add(610304, 610300, "陈仓区"); + this.Add(610322, 610300, "凤翔县"); + this.Add(610323, 610300, "岐山县"); + this.Add(610324, 610300, "扶风县"); + this.Add(610326, 610300, "眉县"); + this.Add(610327, 610300, "陇县"); + this.Add(610328, 610300, "千阳县"); + this.Add(610329, 610300, "麟游县"); + this.Add(610330, 610300, "凤县"); + this.Add(610331, 610300, "太白县"); + this.Add(610402, 610400, "秦都区"); + this.Add(610403, 610400, "杨陵区"); + this.Add(610404, 610400, "渭城区"); + this.Add(610422, 610400, "三原县"); + this.Add(610423, 610400, "泾阳县"); + this.Add(610424, 610400, "乾县"); + this.Add(610425, 610400, "礼泉县"); + this.Add(610426, 610400, "永寿县"); + this.Add(610428, 610400, "长武县"); + this.Add(610429, 610400, "旬邑县"); + this.Add(610430, 610400, "淳化县"); + this.Add(610431, 610400, "武功县"); + this.Add(610481, 610400, "兴平市"); + this.Add(610482, 610400, "彬州市"); + this.Add(610502, 610500, "临渭区"); + this.Add(610503, 610500, "华州区"); + this.Add(610522, 610500, "潼关县"); + this.Add(610523, 610500, "大荔县"); + this.Add(610524, 610500, "合阳县"); + this.Add(610525, 610500, "澄城县"); + this.Add(610526, 610500, "蒲城县"); + this.Add(610527, 610500, "白水县"); + this.Add(610528, 610500, "富平县"); + this.Add(610581, 610500, "韩城市"); + this.Add(610582, 610500, "华阴市"); + this.Add(610602, 610600, "宝塔区"); + this.Add(610603, 610600, "安塞区"); + this.Add(610621, 610600, "延长县"); + this.Add(610622, 610600, "延川县"); + this.Add(610625, 610600, "志丹县"); + this.Add(610626, 610600, "吴起县"); + this.Add(610627, 610600, "甘泉县"); + this.Add(610628, 610600, "富县"); + this.Add(610629, 610600, "洛川县"); + this.Add(610630, 610600, "宜川县"); + this.Add(610631, 610600, "黄龙县"); + this.Add(610632, 610600, "黄陵县"); + this.Add(610681, 610600, "子长市"); + this.Add(610702, 610700, "汉台区"); + this.Add(610703, 610700, "南郑区"); + this.Add(610722, 610700, "城固县"); + this.Add(610723, 610700, "洋县"); + this.Add(610724, 610700, "西乡县"); + this.Add(610725, 610700, "勉县"); + this.Add(610726, 610700, "宁强县"); + this.Add(610727, 610700, "略阳县"); + this.Add(610728, 610700, "镇巴县"); + this.Add(610729, 610700, "留坝县"); + this.Add(610730, 610700, "佛坪县"); + this.Add(610802, 610800, "榆阳区"); + this.Add(610803, 610800, "横山区"); + this.Add(610822, 610800, "府谷县"); + this.Add(610824, 610800, "靖边县"); + this.Add(610825, 610800, "定边县"); + this.Add(610826, 610800, "绥德县"); + this.Add(610827, 610800, "米脂县"); + this.Add(610828, 610800, "佳县"); + this.Add(610829, 610800, "吴堡县"); + this.Add(610830, 610800, "清涧县"); + this.Add(610831, 610800, "子洲县"); + this.Add(610881, 610800, "神木市"); + this.Add(610902, 610900, "汉滨区"); + this.Add(610921, 610900, "汉阴县"); + this.Add(610922, 610900, "石泉县"); + this.Add(610923, 610900, "宁陕县"); + this.Add(610924, 610900, "紫阳县"); + this.Add(610925, 610900, "岚皋县"); + this.Add(610926, 610900, "平利县"); + this.Add(610927, 610900, "镇坪县"); + this.Add(610928, 610900, "旬阳县"); + this.Add(610929, 610900, "白河县"); + this.Add(611002, 611000, "商州区"); + this.Add(611021, 611000, "洛南县"); + this.Add(611022, 611000, "丹凤县"); + this.Add(611023, 611000, "商南县"); + this.Add(611024, 611000, "山阳县"); + this.Add(611025, 611000, "镇安县"); + this.Add(611026, 611000, "柞水县"); + this.Add(620100, 620000, "兰州市"); + this.Add(620200, 620000, "嘉峪关市"); + this.Add(620300, 620000, "金昌市"); + this.Add(620400, 620000, "白银市"); + this.Add(620500, 620000, "天水市"); + this.Add(620600, 620000, "武威市"); + this.Add(620700, 620000, "张掖市"); + this.Add(620800, 620000, "平凉市"); + this.Add(620900, 620000, "酒泉市"); + this.Add(621000, 620000, "庆阳市"); + this.Add(621100, 620000, "定西市"); + this.Add(621200, 620000, "陇南市"); + this.Add(622900, 620000, "临夏回族自治州"); + this.Add(623000, 620000, "甘南藏族自治州"); + this.Add(620102, 620100, "城关区"); + this.Add(620103, 620100, "七里河区"); + this.Add(620104, 620100, "西固区"); + this.Add(620105, 620100, "安宁区"); + this.Add(620111, 620100, "红古区"); + this.Add(620121, 620100, "永登县"); + this.Add(620122, 620100, "皋兰县"); + this.Add(620123, 620100, "榆中县"); + this.Add(620302, 620300, "金川区"); + this.Add(620321, 620300, "永昌县"); + this.Add(620402, 620400, "白银区"); + this.Add(620403, 620400, "平川区"); + this.Add(620421, 620400, "靖远县"); + this.Add(620422, 620400, "会宁县"); + this.Add(620423, 620400, "景泰县"); + this.Add(620502, 620500, "秦州区"); + this.Add(620503, 620500, "麦积区"); + this.Add(620521, 620500, "清水县"); + this.Add(620522, 620500, "秦安县"); + this.Add(620523, 620500, "甘谷县"); + this.Add(620524, 620500, "武山县"); + this.Add(620525, 620500, "张家川回族自治县"); + this.Add(620602, 620600, "凉州区"); + this.Add(620621, 620600, "民勤县"); + this.Add(620622, 620600, "古浪县"); + this.Add(620623, 620600, "天祝藏族自治县"); + this.Add(620702, 620700, "甘州区"); + this.Add(620721, 620700, "肃南裕固族自治县"); + this.Add(620722, 620700, "民乐县"); + this.Add(620723, 620700, "临泽县"); + this.Add(620724, 620700, "高台县"); + this.Add(620725, 620700, "山丹县"); + this.Add(620802, 620800, "崆峒区"); + this.Add(620821, 620800, "泾川县"); + this.Add(620822, 620800, "灵台县"); + this.Add(620823, 620800, "崇信县"); + this.Add(620825, 620800, "庄浪县"); + this.Add(620826, 620800, "静宁县"); + this.Add(620881, 620800, "华亭市"); + this.Add(620902, 620900, "肃州区"); + this.Add(620921, 620900, "金塔县"); + this.Add(620922, 620900, "瓜州县"); + this.Add(620923, 620900, "肃北蒙古族自治县"); + this.Add(620924, 620900, "阿克塞哈萨克族自治县"); + this.Add(620981, 620900, "玉门市"); + this.Add(620982, 620900, "敦煌市"); + this.Add(621002, 621000, "西峰区"); + this.Add(621021, 621000, "庆城县"); + this.Add(621022, 621000, "环县"); + this.Add(621023, 621000, "华池县"); + this.Add(621024, 621000, "合水县"); + this.Add(621025, 621000, "正宁县"); + this.Add(621026, 621000, "宁县"); + this.Add(621027, 621000, "镇原县"); + this.Add(621102, 621100, "安定区"); + this.Add(621121, 621100, "通渭县"); + this.Add(621122, 621100, "陇西县"); + this.Add(621123, 621100, "渭源县"); + this.Add(621124, 621100, "临洮县"); + this.Add(621125, 621100, "漳县"); + this.Add(621126, 621100, "岷县"); + this.Add(621202, 621200, "武都区"); + this.Add(621221, 621200, "成县"); + this.Add(621222, 621200, "文县"); + this.Add(621223, 621200, "宕昌县"); + this.Add(621224, 621200, "康县"); + this.Add(621225, 621200, "西和县"); + this.Add(621226, 621200, "礼县"); + this.Add(621227, 621200, "徽县"); + + this.Add(621228, 621200, "两当县"); + this.Add(622901, 622900, "临夏市"); + this.Add(622921, 622900, "临夏县"); + this.Add(622922, 622900, "康乐县"); + this.Add(622923, 622900, "永靖县"); + this.Add(622924, 622900, "广河县"); + this.Add(622925, 622900, "和政县"); + this.Add(622926, 622900, "东乡族自治县"); + this.Add(622927, 622900, "积石山保安族东乡族撒拉族自治县"); + this.Add(623001, 623000, "合作市"); + this.Add(623021, 623000, "临潭县"); + this.Add(623022, 623000, "卓尼县"); + this.Add(623023, 623000, "舟曲县"); + this.Add(623024, 623000, "迭部县"); + this.Add(623025, 623000, "玛曲县"); + this.Add(623026, 623000, "碌曲县"); + this.Add(623027, 623000, "夏河县"); + this.Add(630100, 630000, "西宁市"); + this.Add(630200, 630000, "海东市"); + this.Add(632200, 630000, "海北藏族自治州"); + this.Add(632300, 630000, "黄南藏族自治州"); + this.Add(632500, 630000, "海南藏族自治州"); + this.Add(632600, 630000, "果洛藏族自治州"); + this.Add(632700, 630000, "玉树藏族自治州"); + this.Add(632800, 630000, "海西蒙古族藏族自治州"); + this.Add(630102, 630100, "城东区"); + this.Add(630103, 630100, "城中区"); + this.Add(630104, 630100, "城西区"); + this.Add(630105, 630100, "城北区"); + this.Add(630106, 630100, "湟中区"); + this.Add(630121, 630100, "大通回族土族自治县"); + this.Add(630123, 630100, "湟源县"); + this.Add(630202, 630200, "乐都区"); + this.Add(630203, 630200, "平安区"); + this.Add(630222, 630200, "民和回族土族自治县"); + this.Add(630223, 630200, "互助土族自治县"); + this.Add(630224, 630200, "化隆回族自治县"); + this.Add(630225, 630200, "循化撒拉族自治县"); + this.Add(632221, 632200, "门源回族自治县"); + this.Add(632222, 632200, "祁连县"); + this.Add(632223, 632200, "海晏县"); + this.Add(632224, 632200, "刚察县"); + this.Add(632301, 632300, "同仁市"); + this.Add(632322, 632300, "尖扎县"); + this.Add(632323, 632300, "泽库县"); + this.Add(632324, 632300, "河南蒙古族自治县"); + this.Add(632521, 632500, "共和县"); + this.Add(632522, 632500, "同德县"); + this.Add(632523, 632500, "贵德县"); + this.Add(632524, 632500, "兴海县"); + this.Add(632525, 632500, "贵南县"); + this.Add(632621, 632600, "玛沁县"); + this.Add(632622, 632600, "班玛县"); + this.Add(632623, 632600, "甘德县"); + this.Add(632624, 632600, "达日县"); + this.Add(632625, 632600, "久治县"); + this.Add(632626, 632600, "玛多县"); + this.Add(632701, 632700, "玉树市"); + this.Add(632722, 632700, "杂多县"); + this.Add(632723, 632700, "称多县"); + this.Add(632724, 632700, "治多县"); + this.Add(632725, 632700, "囊谦县"); + this.Add(632726, 632700, "曲麻莱县"); + this.Add(632801, 632800, "格尔木市"); + this.Add(632802, 632800, "德令哈市"); + this.Add(632803, 632800, "茫崖市"); + this.Add(632821, 632800, "乌兰县"); + this.Add(632822, 632800, "都兰县"); + this.Add(632823, 632800, "天峻县"); + this.Add(632825, 632800, "海西蒙古族藏族自治州直辖"); + this.Add(640100, 640000, "银川市"); + this.Add(640200, 640000, "石嘴山市"); + this.Add(640300, 640000, "吴忠市"); + this.Add(640400, 640000, "固原市"); + this.Add(640500, 640000, "中卫市"); + this.Add(640104, 640100, "兴庆区"); + this.Add(640105, 640100, "西夏区"); + this.Add(640106, 640100, "金凤区"); + this.Add(640121, 640100, "永宁县"); + this.Add(640122, 640100, "贺兰县"); + this.Add(640181, 640100, "灵武市"); + this.Add(640202, 640200, "大武口区"); + this.Add(640205, 640200, "惠农区"); + this.Add(640221, 640200, "平罗县"); + this.Add(640302, 640300, "利通区"); + this.Add(640303, 640300, "红寺堡区"); + this.Add(640323, 640300, "盐池县"); + this.Add(640324, 640300, "同心县"); + this.Add(640381, 640300, "青铜峡市"); + this.Add(640402, 640400, "原州区"); + this.Add(640422, 640400, "西吉县"); + this.Add(640423, 640400, "隆德县"); + this.Add(640424, 640400, "泾源县"); + this.Add(640425, 640400, "彭阳县"); + this.Add(640502, 640500, "沙坡头区"); + this.Add(640521, 640500, "中宁县"); + this.Add(640522, 640500, "海原县"); + this.Add(650100, 650000, "乌鲁木齐市"); + this.Add(650200, 650000, "克拉玛依市"); + this.Add(650400, 650000, "吐鲁番市"); + this.Add(650500, 650000, "哈密市"); + this.Add(652300, 650000, "昌吉回族自治州"); + this.Add(652700, 650000, "博尔塔拉蒙古自治州"); + this.Add(652800, 650000, "巴音郭楞蒙古自治州"); + this.Add(652900, 650000, "阿克苏地区"); + this.Add(653000, 650000, "克孜勒苏柯尔克孜自治州"); + this.Add(653100, 650000, "喀什地区"); + this.Add(653200, 650000, "和田地区"); + this.Add(654000, 650000, "伊犁哈萨克自治州"); + this.Add(654200, 650000, "塔城地区"); + this.Add(654300, 650000, "阿勒泰地区"); + this.Add(659001, 650000, "石河子市"); + this.Add(659002, 650000, "阿拉尔市"); + this.Add(659003, 650000, "图木舒克市"); + this.Add(659004, 650000, "五家渠市"); + this.Add(659005, 650000, "北屯市"); + this.Add(659006, 650000, "铁门关市"); + this.Add(659007, 650000, "双河市"); + this.Add(659008, 650000, "可克达拉市"); + this.Add(659009, 650000, "昆玉市"); + this.Add(659010, 650000, "胡杨河市"); + this.Add(650102, 650100, "天山区"); + this.Add(650103, 650100, "沙依巴克区"); + this.Add(650104, 650100, "新市区"); + this.Add(650105, 650100, "水磨沟区"); + this.Add(650106, 650100, "头屯河区"); + this.Add(650107, 650100, "达坂城区"); + this.Add(650109, 650100, "米东区"); + this.Add(650121, 650100, "乌鲁木齐县"); + this.Add(650202, 650200, "独山子区"); + this.Add(650203, 650200, "克拉玛依区"); + this.Add(650204, 650200, "白碱滩区"); + this.Add(650205, 650200, "乌尔禾区"); + this.Add(650402, 650400, "高昌区"); + this.Add(650421, 650400, "鄯善县"); + this.Add(650422, 650400, "托克逊县"); + this.Add(650502, 650500, "伊州区"); + this.Add(650521, 650500, "巴里坤哈萨克自治县"); + this.Add(650522, 650500, "伊吾县"); + this.Add(652301, 652300, "昌吉市"); + this.Add(652302, 652300, "阜康市"); + this.Add(652323, 652300, "呼图壁县"); + this.Add(652324, 652300, "玛纳斯县"); + this.Add(652325, 652300, "奇台县"); + this.Add(652327, 652300, "吉木萨尔县"); + this.Add(652328, 652300, "木垒哈萨克自治县"); + this.Add(652701, 652700, "博乐市"); + this.Add(652702, 652700, "阿拉山口市"); + this.Add(652722, 652700, "精河县"); + this.Add(652723, 652700, "温泉县"); + this.Add(652801, 652800, "库尔勒市"); + this.Add(652822, 652800, "轮台县"); + this.Add(652823, 652800, "尉犁县"); + this.Add(652824, 652800, "若羌县"); + this.Add(652825, 652800, "且末县"); + this.Add(652826, 652800, "焉耆回族自治县"); + this.Add(652827, 652800, "和静县"); + this.Add(652828, 652800, "和硕县"); + this.Add(652829, 652800, "博湖县"); + this.Add(652901, 652900, "阿克苏市"); + this.Add(652902, 652900, "库车市"); + this.Add(652922, 652900, "温宿县"); + this.Add(652924, 652900, "沙雅县"); + this.Add(652925, 652900, "新和县"); + this.Add(652926, 652900, "拜城县"); + this.Add(652927, 652900, "乌什县"); + this.Add(652928, 652900, "阿瓦提县"); + this.Add(652929, 652900, "柯坪县"); + this.Add(653001, 653000, "阿图什市"); + this.Add(653022, 653000, "阿克陶县"); + this.Add(653023, 653000, "阿合奇县"); + this.Add(653024, 653000, "乌恰县"); + this.Add(653101, 653100, "喀什市"); + this.Add(653121, 653100, "疏附县"); + this.Add(653122, 653100, "疏勒县"); + this.Add(653123, 653100, "英吉沙县"); + this.Add(653124, 653100, "泽普县"); + this.Add(653125, 653100, "莎车县"); + this.Add(653126, 653100, "叶城县"); + this.Add(653127, 653100, "麦盖提县"); + this.Add(653128, 653100, "岳普湖县"); + this.Add(653129, 653100, "伽师县"); + this.Add(653130, 653100, "巴楚县"); + this.Add(653131, 653100, "塔什库尔干塔吉克自治县"); + this.Add(653201, 653200, "和田市"); + this.Add(653221, 653200, "和田县"); + this.Add(653222, 653200, "墨玉县"); + this.Add(653223, 653200, "皮山县"); + this.Add(653224, 653200, "洛浦县"); + this.Add(653225, 653200, "策勒县"); + this.Add(653226, 653200, "于田县"); + this.Add(653227, 653200, "民丰县"); + this.Add(654002, 654000, "伊宁市"); + this.Add(654003, 654000, "奎屯市"); + this.Add(654004, 654000, "霍尔果斯市"); + this.Add(654021, 654000, "伊宁县"); + this.Add(654022, 654000, "察布查尔锡伯自治县"); + this.Add(654023, 654000, "霍城县"); + this.Add(654024, 654000, "巩留县"); + this.Add(654025, 654000, "新源县"); + this.Add(654026, 654000, "昭苏县"); + this.Add(654027, 654000, "特克斯县"); + this.Add(654028, 654000, "尼勒克县"); + this.Add(654201, 654200, "塔城市"); + this.Add(654202, 654200, "乌苏市"); + this.Add(654221, 654200, "额敏县"); + this.Add(654223, 654200, "沙湾县"); + this.Add(654224, 654200, "托里县"); + this.Add(654225, 654200, "裕民县"); + this.Add(654226, 654200, "和布克赛尔蒙古自治县"); + this.Add(654301, 654300, "阿勒泰市"); + this.Add(654321, 654300, "布尔津县"); + this.Add(654322, 654300, "富蕴县"); + this.Add(654323, 654300, "福海县"); + this.Add(654324, 654300, "哈巴河县"); + this.Add(654325, 654300, "青河县"); + this.Add(654326, 654300, "吉木乃县"); + this.Add(810001, 810000, "中西区"); + this.Add(810002, 810000, "湾仔区"); + this.Add(810003, 810000, "东区"); + this.Add(810004, 810000, "南区"); + this.Add(810005, 810000, "油尖旺区"); + this.Add(810006, 810000, "深水埗区"); + this.Add(810007, 810000, "九龙城区"); + this.Add(810008, 810000, "黄大仙区"); + this.Add(810009, 810000, "观塘区"); + this.Add(810010, 810000, "荃湾区"); + this.Add(810011, 810000, "屯门区"); + this.Add(810012, 810000, "元朗区"); + this.Add(810013, 810000, "北区"); + this.Add(810014, 810000, "大埔区"); + this.Add(810015, 810000, "西贡区"); + this.Add(810016, 810000, "沙田区"); + this.Add(810017, 810000, "葵青区"); + this.Add(810018, 810000, "离岛区"); + this.Add(820001, 820000, "花地玛堂区"); + this.Add(820002, 820000, "花王堂区"); + this.Add(820003, 820000, "望德堂区"); + this.Add(820004, 820000, "大堂区"); + this.Add(820005, 820000, "风顺堂区"); + this.Add(820006, 820000, "嘉模堂区"); + this.Add(820007, 820000, "路凼填海区"); + this.Add(820008, 820000, "圣方济各堂区"); +} \ No newline at end of file