diff --git a/pom.xml b/pom.xml
index 7782ff8..dea4a92 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,6 +73,21 @@
mybatis
${mybatis.version}
+
+ org.mybatis
+ mybatis-spring
+ 1.2.3
+
+
+ com.alibaba
+ druid
+ 1.0.29
+
+
+ org.postgresql
+ postgresql
+ 42.1.4
+
org.springframework
spring-beans
diff --git a/src/main/java/com/gis3c/ol/entity/Map.java b/src/main/java/com/gis3c/ol/entity/Map.java
new file mode 100644
index 0000000..c773cf5
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/Map.java
@@ -0,0 +1,88 @@
+package com.gis3c.ol.entity;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class Map {
+ private String mapId;
+ private String mapName;
+ private String[] controls;
+ private Integer pixelRatio;
+ private String[] interactions;
+ private String view;
+ private String[] layers;
+ private Boolean logo = Boolean.FALSE;
+ private String description;
+
+ public String getMapId() {
+ return mapId;
+ }
+
+ public void setMapId(String mapId) {
+ this.mapId = mapId;
+ }
+
+ public String getMapName() {
+ return mapName;
+ }
+
+ public void setMapName(String mapName) {
+ this.mapName = mapName;
+ }
+
+ public String[] getControls() {
+ return controls;
+ }
+
+ public void setControls(String[] controls) {
+ this.controls = controls;
+ }
+
+ public Integer getPixelRatio() {
+ return pixelRatio;
+ }
+
+ public void setPixelRatio(Integer pixelRatio) {
+ this.pixelRatio = pixelRatio;
+ }
+
+ public String[] getInteractions() {
+ return interactions;
+ }
+
+ public void setInteractions(String[] interactions) {
+ this.interactions = interactions;
+ }
+
+ public String getView() {
+ return view;
+ }
+
+ public void setView(String view) {
+ this.view = view;
+ }
+
+ public String[] getLayers() {
+ return layers;
+ }
+
+ public void setLayers(String[] layers) {
+ this.layers = layers;
+ }
+
+ public Boolean getLogo() {
+ return logo;
+ }
+
+ public void setLogo(Boolean logo) {
+ this.logo = logo;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/src/main/java/com/gis3c/ol/entity/View.java b/src/main/java/com/gis3c/ol/entity/View.java
new file mode 100644
index 0000000..76524c9
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/View.java
@@ -0,0 +1,133 @@
+package com.gis3c.ol.entity;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class View {
+ private String viewId;
+ private String viewName;
+ private Double[] center;
+ private Double[] extent;
+ private Double maxResolution;
+ private Double minResolution;
+ private Integer maxZoom;
+ private Integer minZoom;
+ private Integer zoom;
+ private String projection;
+ private Double resolution;
+ private Double resolutions;
+ private Double rotation;
+ private String description;
+
+ public String getViewId() {
+ return viewId;
+ }
+
+ public void setViewId(String viewId) {
+ this.viewId = viewId;
+ }
+
+ public String getViewName() {
+ return viewName;
+ }
+
+ public void setViewName(String viewName) {
+ this.viewName = viewName;
+ }
+
+ public Double[] getCenter() {
+ return center;
+ }
+
+ public void setCenter(Double[] center) {
+ this.center = center;
+ }
+
+ public Double[] getExtent() {
+ return extent;
+ }
+
+ public void setExtent(Double[] extent) {
+ this.extent = extent;
+ }
+
+ public Double getMaxResolution() {
+ return maxResolution;
+ }
+
+ public void setMaxResolution(Double maxResolution) {
+ this.maxResolution = maxResolution;
+ }
+
+ public Double getMinResolution() {
+ return minResolution;
+ }
+
+ public void setMinResolution(Double minResolution) {
+ this.minResolution = minResolution;
+ }
+
+ public Integer getMaxZoom() {
+ return maxZoom;
+ }
+
+ public void setMaxZoom(Integer maxZoom) {
+ this.maxZoom = maxZoom;
+ }
+
+ public Integer getMinZoom() {
+ return minZoom;
+ }
+
+ public void setMinZoom(Integer minZoom) {
+ this.minZoom = minZoom;
+ }
+
+ public Integer getZoom() {
+ return zoom;
+ }
+
+ public void setZoom(Integer zoom) {
+ this.zoom = zoom;
+ }
+
+ public String getProjection() {
+ return projection;
+ }
+
+ public void setProjection(String projection) {
+ this.projection = projection;
+ }
+
+ public Double getResolution() {
+ return resolution;
+ }
+
+ public void setResolution(Double resolution) {
+ this.resolution = resolution;
+ }
+
+ public Double getResolutions() {
+ return resolutions;
+ }
+
+ public void setResolutions(Double resolutions) {
+ this.resolutions = resolutions;
+ }
+
+ public Double getRotation() {
+ return rotation;
+ }
+
+ public void setRotation(Double rotation) {
+ this.rotation = rotation;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/src/main/java/com/gis3c/ol/entity/layer/BaseLayer.java b/src/main/java/com/gis3c/ol/entity/layer/BaseLayer.java
new file mode 100644
index 0000000..a4781fe
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/layer/BaseLayer.java
@@ -0,0 +1,88 @@
+package com.gis3c.ol.entity.layer;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public abstract class BaseLayer {
+ private String layerId;
+ private String layerName;
+ private Double opacity;
+ private Boolean visible = Boolean.TRUE;
+ private Double[] extent;
+ private Integer zIndex;
+ private Double maxResolution;
+ private Double minResolution;
+ private String description;
+
+ public String getLayerId() {
+ return layerId;
+ }
+
+ public void setLayerId(String layerId) {
+ this.layerId = layerId;
+ }
+
+ public String getLayerName() {
+ return layerName;
+ }
+
+ public void setLayerName(String layerName) {
+ this.layerName = layerName;
+ }
+
+ public Double getOpacity() {
+ return opacity;
+ }
+
+ public void setOpacity(Double opacity) {
+ this.opacity = opacity;
+ }
+
+ public Boolean getVisible() {
+ return visible;
+ }
+
+ public void setVisible(Boolean visible) {
+ this.visible = visible;
+ }
+
+ public Double[] getExtent() {
+ return extent;
+ }
+
+ public void setExtent(Double[] extent) {
+ this.extent = extent;
+ }
+
+ public Integer getzIndex() {
+ return zIndex;
+ }
+
+ public void setzIndex(Integer zIndex) {
+ this.zIndex = zIndex;
+ }
+
+ public Double getMaxResolution() {
+ return maxResolution;
+ }
+
+ public void setMaxResolution(Double maxResolution) {
+ this.maxResolution = maxResolution;
+ }
+
+ public Double getMinResolution() {
+ return minResolution;
+ }
+
+ public void setMinResolution(Double minResolution) {
+ this.minResolution = minResolution;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/src/main/java/com/gis3c/ol/entity/layer/TileLayer.java b/src/main/java/com/gis3c/ol/entity/layer/TileLayer.java
new file mode 100644
index 0000000..fbe004e
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/layer/TileLayer.java
@@ -0,0 +1,16 @@
+package com.gis3c.ol.entity.layer;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class TileLayer extends BaseLayer {
+ private String source;
+
+ public String getSource() {
+ return source;
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+}
diff --git a/src/main/java/com/gis3c/ol/entity/layer/VectorLayer.java b/src/main/java/com/gis3c/ol/entity/layer/VectorLayer.java
new file mode 100644
index 0000000..c70854d
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/layer/VectorLayer.java
@@ -0,0 +1,34 @@
+package com.gis3c.ol.entity.layer;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class VectorLayer extends BaseLayer {
+ private String source;
+ private String styleType;
+ private String styleValue;
+
+ public String getSource() {
+ return source;
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ public String getStyleType() {
+ return styleType;
+ }
+
+ public void setStyleType(String styleType) {
+ this.styleType = styleType;
+ }
+
+ public String getStyleValue() {
+ return styleValue;
+ }
+
+ public void setStyleValue(String styleValue) {
+ this.styleValue = styleValue;
+ }
+}
diff --git a/src/main/java/com/gis3c/ol/entity/source/TileArcGISRest.java b/src/main/java/com/gis3c/ol/entity/source/TileArcGISRest.java
new file mode 100644
index 0000000..b1262d1
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/source/TileArcGISRest.java
@@ -0,0 +1,70 @@
+package com.gis3c.ol.entity.source;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class TileArcGISRest {
+ private String sourceId;
+ private String sourceName;
+ private String crossOrigin;
+ private String projection;
+ private String url;
+ private Boolean wrapX;
+ private String description;
+
+ public String getSourceId() {
+ return sourceId;
+ }
+
+ public void setSourceId(String sourceId) {
+ this.sourceId = sourceId;
+ }
+
+ public String getSourceName() {
+ return sourceName;
+ }
+
+ public void setSourceName(String sourceName) {
+ this.sourceName = sourceName;
+ }
+
+ public String getCrossOrigin() {
+ return crossOrigin;
+ }
+
+ public void setCrossOrigin(String crossOrigin) {
+ this.crossOrigin = crossOrigin;
+ }
+
+ public String getProjection() {
+ return projection;
+ }
+
+ public void setProjection(String projection) {
+ this.projection = projection;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public Boolean getWrapX() {
+ return wrapX;
+ }
+
+ public void setWrapX(Boolean wrapX) {
+ this.wrapX = wrapX;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/src/main/java/com/gis3c/ol/entity/source/TileSuperMapRest.java b/src/main/java/com/gis3c/ol/entity/source/TileSuperMapRest.java
new file mode 100644
index 0000000..5c7df07
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/source/TileSuperMapRest.java
@@ -0,0 +1,61 @@
+package com.gis3c.ol.entity.source;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class TileSuperMapRest {
+ private String sourceId;
+ private String sourceName;
+ private String url;
+ private Boolean wrapX;
+ private Boolean opaque;
+ private String description;
+
+ public String getSourceId() {
+ return sourceId;
+ }
+
+ public void setSourceId(String sourceId) {
+ this.sourceId = sourceId;
+ }
+
+ public String getSourceName() {
+ return sourceName;
+ }
+
+ public void setSourceName(String sourceName) {
+ this.sourceName = sourceName;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public Boolean getWrapX() {
+ return wrapX;
+ }
+
+ public void setWrapX(Boolean wrapX) {
+ this.wrapX = wrapX;
+ }
+
+ public Boolean getOpaque() {
+ return opaque;
+ }
+
+ public void setOpaque(Boolean opaque) {
+ this.opaque = opaque;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/src/main/java/com/gis3c/ol/entity/source/Vector.java b/src/main/java/com/gis3c/ol/entity/source/Vector.java
new file mode 100644
index 0000000..257059f
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/source/Vector.java
@@ -0,0 +1,72 @@
+package com.gis3c.ol.entity.source;
+
+import com.sun.org.apache.xpath.internal.operations.Bool;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class Vector {
+ private String sourceId;
+ private String sourceName;
+ private Boolean logo;
+ private String url;
+ private Boolean useSpatialIndex;
+ private Boolean wrapX;
+ private String description;
+
+ public String getSourceId() {
+ return sourceId;
+ }
+
+ public void setSourceId(String sourceId) {
+ this.sourceId = sourceId;
+ }
+
+ public String getSourceName() {
+ return sourceName;
+ }
+
+ public void setSourceName(String sourceName) {
+ this.sourceName = sourceName;
+ }
+
+ public Boolean getLogo() {
+ return logo;
+ }
+
+ public void setLogo(Boolean logo) {
+ this.logo = logo;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public Boolean getUseSpatialIndex() {
+ return useSpatialIndex;
+ }
+
+ public void setUseSpatialIndex(Boolean useSpatialIndex) {
+ this.useSpatialIndex = useSpatialIndex;
+ }
+
+ public Boolean getWrapX() {
+ return wrapX;
+ }
+
+ public void setWrapX(Boolean wrapX) {
+ this.wrapX = wrapX;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/src/main/java/com/gis3c/ol/entity/source/Wmts.java b/src/main/java/com/gis3c/ol/entity/source/Wmts.java
new file mode 100644
index 0000000..ea18a9f
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/source/Wmts.java
@@ -0,0 +1,79 @@
+package com.gis3c.ol.entity.source;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class Wmts {
+ private String sourceId;
+ private String sourceName;
+ private String url;
+ private String layer;
+ private String style;
+ private String format;
+ private String matrixSet;
+ private String description;
+
+ public String getSourceId() {
+ return sourceId;
+ }
+
+ public void setSourceId(String sourceId) {
+ this.sourceId = sourceId;
+ }
+
+ public String getSourceName() {
+ return sourceName;
+ }
+
+ public void setSourceName(String sourceName) {
+ this.sourceName = sourceName;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getLayer() {
+ return layer;
+ }
+
+ public void setLayer(String layer) {
+ this.layer = layer;
+ }
+
+ public String getStyle() {
+ return style;
+ }
+
+ public void setStyle(String style) {
+ this.style = style;
+ }
+
+ public String getFormat() {
+ return format;
+ }
+
+ public void setFormat(String format) {
+ this.format = format;
+ }
+
+ public String getMatrixSet() {
+ return matrixSet;
+ }
+
+ public void setMatrixSet(String matrixSet) {
+ this.matrixSet = matrixSet;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/src/main/java/com/gis3c/ol/entity/style/Circle.java b/src/main/java/com/gis3c/ol/entity/style/Circle.java
new file mode 100644
index 0000000..7916b1a
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/style/Circle.java
@@ -0,0 +1,7 @@
+package com.gis3c.ol.entity.style;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class Circle {
+}
diff --git a/src/main/java/com/gis3c/ol/entity/style/Fill.java b/src/main/java/com/gis3c/ol/entity/style/Fill.java
new file mode 100644
index 0000000..abed0fe
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/style/Fill.java
@@ -0,0 +1,7 @@
+package com.gis3c.ol.entity.style;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class Fill {
+}
diff --git a/src/main/java/com/gis3c/ol/entity/style/Icon.java b/src/main/java/com/gis3c/ol/entity/style/Icon.java
new file mode 100644
index 0000000..7575d7a
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/style/Icon.java
@@ -0,0 +1,7 @@
+package com.gis3c.ol.entity.style;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class Icon {
+}
diff --git a/src/main/java/com/gis3c/ol/entity/style/RegularShape.java b/src/main/java/com/gis3c/ol/entity/style/RegularShape.java
new file mode 100644
index 0000000..b631d77
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/style/RegularShape.java
@@ -0,0 +1,7 @@
+package com.gis3c.ol.entity.style;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class RegularShape {
+}
diff --git a/src/main/java/com/gis3c/ol/entity/style/Stroke.java b/src/main/java/com/gis3c/ol/entity/style/Stroke.java
new file mode 100644
index 0000000..64e40ae
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/style/Stroke.java
@@ -0,0 +1,7 @@
+package com.gis3c.ol.entity.style;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class Stroke {
+}
diff --git a/src/main/java/com/gis3c/ol/entity/style/Style.java b/src/main/java/com/gis3c/ol/entity/style/Style.java
new file mode 100644
index 0000000..0b9ccad
--- /dev/null
+++ b/src/main/java/com/gis3c/ol/entity/style/Style.java
@@ -0,0 +1,61 @@
+package com.gis3c.ol.entity.style;
+
+/**
+ * Created by hukekuan on 2017/12/14.
+ */
+public class Style {
+ private String styleId;
+ private String getStyleName;
+ private String fill;
+ private String image;
+ private String stroke;
+ private String text;
+
+ public String getStyleId() {
+ return styleId;
+ }
+
+ public void setStyleId(String styleId) {
+ this.styleId = styleId;
+ }
+
+ public String getGetStyleName() {
+ return getStyleName;
+ }
+
+ public void setGetStyleName(String getStyleName) {
+ this.getStyleName = getStyleName;
+ }
+
+ public String getFill() {
+ return fill;
+ }
+
+ public void setFill(String fill) {
+ this.fill = fill;
+ }
+
+ public String getImage() {
+ return image;
+ }
+
+ public void setImage(String image) {
+ this.image = image;
+ }
+
+ public String getStroke() {
+ return stroke;
+ }
+
+ public void setStroke(String stroke) {
+ this.stroke = stroke;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+}
diff --git a/src/main/resources/init.sql b/src/main/resources/init.sql
index ddcc40a..61fb7b2 100644
--- a/src/main/resources/init.sql
+++ b/src/main/resources/init.sql
@@ -5,13 +5,30 @@ create table c3gis_ol_map(
view varchar(50) not null,
controls varchar(50) ARRAY,
pixelRatio integer,
- interactions varchar(50) ARRAY,,
+ interactions varchar(50) ARRAY,
layers varchar(50) ARRAY,
logo boolean,
overlays varchar(50) ARRAY,
description varchar(50)
);
+--视图图层
+create table c3gis_ol_view(
+ viewid varchar(50) not null PRIMARY KEY,
+ viewname varchar(50) not null,
+ center decimal ARRAY[2],
+ extent decimal ARRAY[4],
+ maxresolution decimal,
+ minresolution decimal,
+ maxzoom int,
+ minzoom int,
+ zoom int,
+ projection varchar(50),
+ resolution decimal,
+ resolutions decimal ARRAY,
+ rotation decimal,
+ description varchar(50)
+);
--样式类型枚举值
CREATE TYPE c3gis_ol_vectorstyletype AS ENUM('entity', 'function');
@@ -71,10 +88,12 @@ create table c3gis_ol_source_tilesupermaprest(
);
--矢量数据
-create table c3gis_ol_source_tilearcgisrest(
+create table c3gis_ol_source_vector(
sourceid varchar(50) not null PRIMARY KEY,
sourcename varchar(50) not null,
- url varchar(50) not null,
+ logo boolean,
+ url varchar(50),
+ useSpatialIndex boolean,
wrapX boolean,
description varchar(50)
);
diff --git a/src/main/resources/resources.properties b/src/main/resources/resources.properties
index aa53626..4c6c3a4 100644
--- a/src/main/resources/resources.properties
+++ b/src/main/resources/resources.properties
@@ -1,10 +1,5 @@
-gis.driverClassName=oracle.jdbc.driver.OracleDriver
-gis.url=jdbc:oracle:thin:@172.16.6.13:1521:orcl
-gis.username=spatial
-gis.password=spatial
-
-postgis.driverClassName=org.postgresql.Driver
-postgis.url=jdbc:postgresql://localhost:5432/gisdb
-postgis.username=postgres
-postgis.password=postgres
\ No newline at end of file
+sys.driverClassName=org.postgresql.Driver
+sys.url=jdbc:postgresql:gisdata
+sys.username=gis
+sys.password=gis
\ No newline at end of file
diff --git a/src/main/resources/spring-config.xml b/src/main/resources/spring-config.xml
index e56d7df..1f519ae 100644
--- a/src/main/resources/spring-config.xml
+++ b/src/main/resources/spring-config.xml
@@ -27,4 +27,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/sql-map-config-mybatis.xml b/src/main/resources/sql-map-config-mybatis.xml
new file mode 100644
index 0000000..a2da2c6
--- /dev/null
+++ b/src/main/resources/sql-map-config-mybatis.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file