瀏覽代碼

农业详情修改

wang_xy 2 年之前
父節點
當前提交
d6f43c3194
共有 100 個文件被更改,包括 14770 次插入0 次删除
  1. 100 0
      public/supermap/examples/openlayers/01_layerService.html
  2. 74 0
      public/supermap/examples/openlayers/01_mapQueryByBounds.html
  3. 75 0
      public/supermap/examples/openlayers/01_mapQueryByDistance.html
  4. 74 0
      public/supermap/examples/openlayers/01_mapQueryByGeometry.html
  5. 57 0
      public/supermap/examples/openlayers/01_mapQueryBySQL.html
  6. 103 0
      public/supermap/examples/openlayers/01_mapService.html
  7. 58 0
      public/supermap/examples/openlayers/01_measure_area.html
  8. 62 0
      public/supermap/examples/openlayers/01_measure_distance.html
  9. 38 0
      public/supermap/examples/openlayers/01_tiledMapLayer3857.html
  10. 38 0
      public/supermap/examples/openlayers/01_tiledMapLayer4326.html
  11. 48 0
      public/supermap/examples/openlayers/01_tiledMapLayerNoProj.html
  12. 47 0
      public/supermap/examples/openlayers/01_tiledMapLayerOverlapped.html
  13. 40 0
      public/supermap/examples/openlayers/01_tiledmaplayer_rasterfunction.html
  14. 193 0
      public/supermap/examples/openlayers/02_datasetService.html
  15. 178 0
      public/supermap/examples/openlayers/02_datasourceService.html
  16. 357 0
      public/supermap/examples/openlayers/02_editFeatures.html
  17. 153 0
      public/supermap/examples/openlayers/02_fieldStatistics.html
  18. 101 0
      public/supermap/examples/openlayers/02_fieldsService.html
  19. 76 0
      public/supermap/examples/openlayers/02_getFeatureByBounds.html
  20. 77 0
      public/supermap/examples/openlayers/02_getFeatureByBuffer.html
  21. 86 0
      public/supermap/examples/openlayers/02_getFeatureByGeometry.html
  22. 57 0
      public/supermap/examples/openlayers/02_getFeatureByIDs.html
  23. 60 0
      public/supermap/examples/openlayers/02_getFeatureBySQL.html
  24. 114 0
      public/supermap/examples/openlayers/02_getGridCellInfos.html
  25. 72 0
      public/supermap/examples/openlayers/03_themeDotDensity.html
  26. 77 0
      public/supermap/examples/openlayers/03_themeGraduatedSymbol.html
  27. 110 0
      public/supermap/examples/openlayers/03_themeGraph.html
  28. 166 0
      public/supermap/examples/openlayers/03_themeGridRange.html
  29. 155 0
      public/supermap/examples/openlayers/03_themeGridUnique.html
  30. 145 0
      public/supermap/examples/openlayers/03_themeLabel.html
  31. 99 0
      public/supermap/examples/openlayers/03_themeRange.html
  32. 232 0
      public/supermap/examples/openlayers/03_themeUnique.html
  33. 104 0
      public/supermap/examples/openlayers/04_bufferAnalystService.html
  34. 181 0
      public/supermap/examples/openlayers/04_bufferAnalystService_geometry.html
  35. 141 0
      public/supermap/examples/openlayers/04_densityKernelAnalystService.html
  36. 140 0
      public/supermap/examples/openlayers/04_generateSpatialDataService.html
  37. 292 0
      public/supermap/examples/openlayers/04_geometryBatchAnalystService.html
  38. 214 0
      public/supermap/examples/openlayers/04_geometryOverlayBatchAnalystService.html
  39. 242 0
      public/supermap/examples/openlayers/04_interpolationAnalystService_Density.html
  40. 248 0
      public/supermap/examples/openlayers/04_interpolationAnalystService_IDW_dataset.html
  41. 283 0
      public/supermap/examples/openlayers/04_interpolationAnalystService_IDW_geometry.html
  42. 247 0
      public/supermap/examples/openlayers/04_interpolationAnalystService_Kriging.html
  43. 258 0
      public/supermap/examples/openlayers/04_interpolationAnalystService_KrigingUniversal.html
  44. 245 0
      public/supermap/examples/openlayers/04_interpolationAnalystService_RBF.html
  45. 132 0
      public/supermap/examples/openlayers/04_mathExpressionAnalysisService.html
  46. 67 0
      public/supermap/examples/openlayers/04_overlayAnalystService.html
  47. 162 0
      public/supermap/examples/openlayers/04_routeCalculateMeasureService.html
  48. 114 0
      public/supermap/examples/openlayers/04_routeLocatorService_line.html
  49. 160 0
      public/supermap/examples/openlayers/04_routeLocatorService_point.html
  50. 92 0
      public/supermap/examples/openlayers/04_surfaceAnalystService.html
  51. 127 0
      public/supermap/examples/openlayers/04_terrainCurvatureCalculationService.html
  52. 70 0
      public/supermap/examples/openlayers/04_thiessenAnalystService_datasets.html
  53. 85 0
      public/supermap/examples/openlayers/04_thiessenAnalystService_geometry.html
  54. 134 0
      public/supermap/examples/openlayers/05_findClosestFacilitiesService.html
  55. 180 0
      public/supermap/examples/openlayers/05_findLocationService.html
  56. 135 0
      public/supermap/examples/openlayers/05_findMTSPPathsService.html
  57. 139 0
      public/supermap/examples/openlayers/05_findPathService.html
  58. 95 0
      public/supermap/examples/openlayers/05_findServiceAreas.html
  59. 123 0
      public/supermap/examples/openlayers/05_findTSPPathsService.html
  60. 393 0
      public/supermap/examples/openlayers/06_trafficTransferAnalystService.html
  61. 90 0
      public/supermap/examples/openlayers/07_AnimationFeature.html
  62. 99 0
      public/supermap/examples/openlayers/07_Cluster.html
  63. 54 0
      public/supermap/examples/openlayers/07_HeatMap.html
  64. 169 0
      public/supermap/examples/openlayers/07_graphiclayer_canvas.html
  65. 155 0
      public/supermap/examples/openlayers/07_graphiclayer_circle.html
  66. 168 0
      public/supermap/examples/openlayers/07_graphiclayer_clover.html
  67. 82 0
      public/supermap/examples/openlayers/07_graphiclayer_image.html
  68. 155 0
      public/supermap/examples/openlayers/07_graphiclayer_webgl.html
  69. 213 0
      public/supermap/examples/openlayers/07_graphiclayer_webgl2.html
  70. 203 0
      public/supermap/examples/openlayers/SummaryMeshJobService.html
  71. 275 0
      public/supermap/examples/openlayers/SummaryRegionJobService.html
  72. 45 0
      public/supermap/examples/openlayers/WMSLayer.html
  73. 50 0
      public/supermap/examples/openlayers/WMTSLayer.html
  74. 319 0
      public/supermap/examples/openlayers/addressMatchService.html
  75. 32 0
      public/supermap/examples/openlayers/baiduLayer.html
  76. 168 0
      public/supermap/examples/openlayers/buffersAnalystJobService.html
  77. 134 0
      public/supermap/examples/openlayers/cartoCSS_boundryStyle.html
  78. 134 0
      public/supermap/examples/openlayers/cartoCSS_darkBlue.html
  79. 153 0
      public/supermap/examples/openlayers/cartoCSS_helloKitty.html
  80. 134 0
      public/supermap/examples/openlayers/cartoCSS_naturalStyle.html
  81. 134 0
      public/supermap/examples/openlayers/cartoCSS_nightStyle.html
  82. 47 0
      public/supermap/examples/openlayers/changeTileVersion.html
  83. 1223 0
      public/supermap/examples/openlayers/config.js
  84. 40 0
      public/supermap/examples/openlayers/controler_attribution.html
  85. 68 0
      public/supermap/examples/openlayers/controler_layerswitch.html
  86. 57 0
      public/supermap/examples/openlayers/controler_layerswitcher.html
  87. 54 0
      public/supermap/examples/openlayers/controler_overviewMap.html
  88. 40 0
      public/supermap/examples/openlayers/controler_scaleline.html
  89. 78 0
      public/supermap/examples/openlayers/controler_zoom.html
  90. 164 0
      public/supermap/examples/openlayers/dataFlowService.html
  91. 103 0
      public/supermap/examples/openlayers/dragFeatures.html
  92. 97 0
      public/supermap/examples/openlayers/drawFeatures.html
  93. 86 0
      public/supermap/examples/openlayers/earthquakeHeatMapLayer.html
  94. 131 0
      public/supermap/examples/openlayers/echartsAnimatorCar.html
  95. 162 0
      public/supermap/examples/openlayers/echartsBar.html
  96. 139 0
      public/supermap/examples/openlayers/echartsCellMap.html
  97. 331 0
      public/supermap/examples/openlayers/echartsEarthquake.html
  98. 527 0
      public/supermap/examples/openlayers/echartsEffectScatter.html
  99. 332 0
      public/supermap/examples/openlayers/echartsGeoLines.html
  100. 0 0
      public/supermap/examples/openlayers/echartsHeatmap.html

+ 100 - 0
public/supermap/examples/openlayers/01_layerService.html

@@ -0,0 +1,100 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_layerService"></title>
+    <script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 280px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var container = document.getElementById('popup');
+    var content = document.getElementById('popup-content');
+    var overlay = new ol.Overlay(({
+        element: container,
+        autoPan: true,
+        autoPanAnimation: {
+            duration: 250
+        }
+    }));
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        overlays: [overlay]
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    layerService();
+
+    function layerService() {
+        new ol.supermap.LayerInfoService(url).getLayersInfo(function (serviceResult) {
+            var innerHtml = "";
+            serviceResult.result.subLayers.layers.map(function (layer) {
+                innerHtml += layer.name + "<br>";
+            });
+            content.innerHTML = innerHtml;
+            overlay.setPosition([0, 0]);
+        });
+    }
+</script>
+</body>
+</html>

+ 74 - 0
public/supermap/examples/openlayers/01_mapQueryByBounds.html

@@ -0,0 +1,74 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_mapQueryByBounds"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, polygon, vectorLayer, resultLayer,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 2,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    query();
+
+    function query() {
+        polygon = new ol.geom.Polygon([[[0, 0], [60, 0], [60, 39], [0, 39], [0, 0]]]);
+        var polygonSource = new ol.source.Vector({
+            features: [new ol.Feature(polygon)],
+            wrapX: false
+        });
+        vectorLayer = new ol.layer.Vector({
+            source: polygonSource,
+            style: new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'blue',
+                    width: 3
+                }),
+                fill: new ol.style.Fill({
+                    color: 'rgba(0, 0, 255, 0.1)'
+                })
+            })
+        });
+        map.addLayer(vectorLayer);
+
+        var param = new SuperMap.QueryByBoundsParameters({
+            queryParams: {name: "Capitals@World.1"},
+            bounds: polygon.getExtent()
+        });
+        new ol.supermap.QueryService(url).queryByBounds(param, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.recordsets[0].features),
+                wrapX: false
+            });
+            resultLayer = new ol.layer.Vector({
+                source: vectorSource
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 75 - 0
public/supermap/examples/openlayers/01_mapQueryByDistance.html

@@ -0,0 +1,75 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_mapQueryByDistance"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, point, vectorLayer, resultLayer,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [100, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url,
+            wrapX: true
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    query();
+
+    function query() {
+        //添加查询中心点
+        point = new ol.geom.Point([104, 30]);
+        var iconStyle = new ol.style.Style({
+            image: new ol.style.Icon(({
+                src: '../img/markerbig_select.png'
+            }))
+        });
+        var feature = new ol.Feature(point);
+        feature.setStyle(iconStyle);
+        var pointSource = new ol.source.Vector({
+            features: [feature],
+            wrapX: false
+        });
+        vectorLayer = new ol.layer.Vector({
+            source: pointSource
+        });
+        map.addLayer(vectorLayer);
+        var param = new SuperMap.QueryByDistanceParameters({
+            queryParams: {name: "Capitals@World.1"},
+            distance: 10,
+            geometry: point
+        });
+        //创建距离查询实例
+        new ol.supermap.QueryService(url).queryByDistance(param, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.recordsets[0].features),
+                wrapX: false
+            });
+            resultLayer = new ol.layer.Vector({
+                source: vectorSource
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 74 - 0
public/supermap/examples/openlayers/01_mapQueryByGeometry.html

@@ -0,0 +1,74 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_mapQueryByGeometry"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, vectorLayer, resultLayer,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    query();
+
+    function query() {
+        var polygon = new ol.geom.Polygon([[[0, 0], [-30, 0], [-10, 30], [0, 0]]]);
+        var polygonSource = new ol.source.Vector({
+            features: [new ol.Feature(polygon)],
+            wrapX: false
+        });
+        vectorLayer = new ol.layer.Vector({
+            source: polygonSource,
+            style: new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'red',
+                    width: 3
+                }),
+                fill: new ol.style.Fill({
+                    color: 'rgba(0, 0, 255, 0.1)'
+                })
+            })
+        });
+        map.addLayer(vectorLayer);
+
+        var param = new SuperMap.QueryByGeometryParameters({
+            queryParams: {name: "Capitals@World.1"},
+            geometry: polygon
+        });
+        new ol.supermap.QueryService(url).queryByGeometry(param, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.recordsets[0].features),
+                wrapX: false
+            });
+            resultLayer = new ol.layer.Vector({
+                source: vectorSource
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 57 - 0
public/supermap/examples/openlayers/01_mapQueryBySQL.html

@@ -0,0 +1,57 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_mapQueryBySQL"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, resultLayer,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 2,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    query();
+
+    function query() {
+        var param = new SuperMap.QueryBySQLParameters({
+            queryParams: {
+                name: "Capitals@World.1",
+                attributeFilter: "SMID < 10"
+            }
+        });
+        new ol.supermap.QueryService(url).queryBySQL(param, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.recordsets[0].features),
+                wrapX: false
+            });
+            resultLayer = new ol.layer.Vector({
+                source: vectorSource
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 103 - 0
public/supermap/examples/openlayers/01_mapService.html

@@ -0,0 +1,103 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_mapService"></title>
+    <script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 380px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var container = document.getElementById('popup');
+    var content = document.getElementById('popup-content');
+    var overlay = new ol.Overlay(({
+        element: container,
+        autoPan: true,
+        autoPanAnimation: {
+            duration: 250
+        }
+    }));
+    var map,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 2,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        overlays: [overlay]
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    mapService();
+
+    function mapService() {
+        new ol.supermap.MapService(url, {
+            "projection": "4326"
+        }).getMapInfo(function (serviceResult) {
+            var innerHTML = "(" + resources.text_mapInfoPrint + ")" + "<br><br>";
+            innerHTML += resources.text_mapName + ":" + JSON.stringify(serviceResult.result.name, null, 2) + "<br>";
+            innerHTML += resources.text_center + ":" + JSON.stringify(serviceResult.result.center, null, 2) + "<br>";
+            innerHTML += "Bounds:" + JSON.stringify(serviceResult.result.bounds, null, 2) + "<br>";
+            content.innerHTML = innerHTML;
+            overlay.setPosition([0, 0]);
+        });
+    }
+</script>
+</body>
+</html>

+ 58 - 0
public/supermap/examples/openlayers/01_measure_area.html

@@ -0,0 +1,58 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_measureArea"></title>
+    <script type="text/javascript" include="bootstrap,jquery,widgets.alert" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, interaction, vectorLayer, feature,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    var source = new ol.source.Vector({wrapX: false});
+    vectorLayer = new ol.layer.Vector({
+        source: source
+    });
+    map.addLayer(vectorLayer);
+    interaction = new ol.interaction.Draw({
+        source: source,
+        type: "Polygon",
+    });
+    interaction.on('drawstart', function (evt) {
+        feature = evt.feature;
+    });
+    interaction.on('drawend', function () {
+        var areaMeasureParam = new SuperMap.MeasureParameters(feature.getGeometry());
+        new ol.supermap.MeasureService(url).measureArea(areaMeasureParam, function (serviceResult) {
+            widgets.alert.showAlert(serviceResult.result.area + resources.msg_sqm, true);
+        });
+    });
+
+    map.addInteraction(interaction);
+
+</script>
+</body>
+</html>

+ 62 - 0
public/supermap/examples/openlayers/01_measure_distance.html

@@ -0,0 +1,62 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_measureDistance"></title>
+    <script type="text/javascript" include="bootstrap,jquery,widgets.alert" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, interaction, vectorLayer, feature,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
+
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+
+
+    var source = new ol.source.Vector({wrapX: false});
+    vectorLayer = new ol.layer.Vector({
+        source: source
+    });
+    map.addLayer(vectorLayer);
+    interaction = new ol.interaction.Draw({
+        source: source,
+        type: "LineString"
+    });
+    interaction.on('drawstart', function (evt) {
+        feature = evt.feature;
+    });
+    interaction.on('drawend', function () {
+        var distanceMeasureParam = new SuperMap.MeasureParameters(feature.getGeometry());
+        new ol.supermap.MeasureService(url, {measureMode: ""}).measureDistance(distanceMeasureParam, function (serviceResult) {
+            widgets.alert.showAlert(serviceResult.result.distance + resources.msg_m, true);
+        });
+    });
+
+    map.addInteraction(interaction);
+
+
+</script>
+</body>
+</html>

+ 38 - 0
public/supermap/examples/openlayers/01_tiledMapLayer3857.html

@@ -0,0 +1,38 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_tiledMapLayer3857"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 1,
+            projection: 'EPSG:3857',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url,
+            wrapX: true
+        }),
+        projection: 'EPSG:3857'
+    });
+    map.addLayer(layer);
+    map.addControl(new ol.supermap.control.ScaleLine());
+</script>
+</body>
+</html>

+ 38 - 0
public/supermap/examples/openlayers/01_tiledMapLayer4326.html

@@ -0,0 +1,38 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_tiledMapLayer4326"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 2,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url,
+            wrapX: true
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    map.addControl(new ol.supermap.control.ScaleLine());
+</script>
+</body>
+</html>

+ 48 - 0
public/supermap/examples/openlayers/01_tiledMapLayerNoProj.html

@@ -0,0 +1,48 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_tiledMapLayerNoProj"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm',
+        getPointResolution:function(resolution, point){
+            return resolution
+        }
+    });
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [5105, -3375],
+                zoom: 1,
+                projection: projection,
+                origin: [48.4, -55.58],
+                multiWorld: true
+            })
+        });
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj))
+        });
+        map.addLayer(layer);
+        map.addControl(new ol.supermap.control.ScaleLine());
+    });
+
+</script>
+</body>
+</html>

+ 47 - 0
public/supermap/examples/openlayers/01_tiledMapLayerOverlapped.html

@@ -0,0 +1,47 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.text_mapOverlay"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, urlWorld = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World",
+        urlJinjing = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-jingjin/rest/maps/京津地区人口分布图_专题图";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [116.85, 39.79],
+            zoom: 7,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var worldLayer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: urlWorld
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(worldLayer);
+    var jinJingLayer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: urlJinjing,
+            origin: [-180, 90],
+            transparent: true
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(jinJingLayer);
+
+</script>
+</body>
+</html>

+ 40 - 0
public/supermap/examples/openlayers/01_tiledmaplayer_rasterfunction.html

@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="UTF-8" />
+    <title data-i18n="resources.title_tiledMapLayer_rasterfunction"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+  </head>
+  <body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+    <div id="map" style="width: 100%;height:100%"></div>
+    <script type="text/javascript">
+      var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+      var map,
+        url = host + '/iserver/services/map-ndvi/rest/maps/ndvi';
+      map = new ol.Map({
+        target: 'map',
+        controls: ol.control
+          .defaults({ attributionOptions: { collapsed: false } })
+          .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+          center: [15600549.07, 4306191.95],
+          zoom: 12,
+          maxZoom: 12,
+          projection: 'EPSG:3857',
+          multiWorld: true
+        })
+      });
+      var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+          url: url,
+          rasterfunction: new SuperMap.NDVIParameter({ redIndex: 0, nirIndex: 2 }),
+          cacheEnabled: false
+        }),
+        projection: 'EPSG:3857'
+      });
+      map.addLayer(layer);
+      map.addControl(new ol.supermap.control.ScaleLine());
+    </script>
+  </body>
+</html>

+ 193 - 0
public/supermap/examples/openlayers/02_datasetService.html

@@ -0,0 +1,193 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_DatasetInfo"></title>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        body {
+            margin: 0;
+            overflow: hidden;
+            background: #fff;
+            width: 100%;
+            height: 100%
+        }
+
+        #map {
+            position: absolute;
+            width: 100%;
+            height: 100%;
+        }
+
+        #toolbar {
+            position: absolute;
+            top: 50px;
+            right: 10px;
+            width: 300px;
+            text-align: center;
+            z-index: 100;
+            border-radius: 4px;
+        }
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 280px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+
+        .ol-popup-closer {
+            text-decoration: none;
+            position: absolute;
+            top: 2px;
+            right: 8px;
+            }
+
+        .ol-popup-closer:after {
+            content: "✖";
+        }
+
+    </style>
+</head>
+<body>
+    <div id="toolbar" class="panel panel-primary">
+        <div class='panel-heading'>
+            <h5 class='panel-title text-center' data-i18n="resources.title_DatasetInfo"></h5></div>
+        <div class='panel-body content'>
+            <div class='panel'>
+                <div class='input-group'>
+                    <span class='input-group-addon' data-i18n ="resources.text_Datasources"></span>
+                    <select id='datasourcesSelect' class='form-control'></select>
+                </div>
+            </div>
+            <div class='panel'>
+                <div class='input-group'>
+                    <span class='input-group-addon' data-i18n ="resources.text_dataset"></span>
+                    <select id='datasetsSelect' class='form-control'></select>
+                </div>
+            </div>
+            <input type="button" class="btn btn-default" data-i18n ="[value]resources.btn_query" 
+            onclick="datasetsPrint()"/>
+        </div>
+    </div>
+    <div id="map"></div>
+    <div id="popup" class="ol-popup">
+        <a href="#" id="popup-closer" class="ol-popup-closer"></a>
+        <div id="popup-content"></div>
+    </div>
+<script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+<script type="text/javascript">
+    let map, 
+        datasourcesSelect,
+        datasetsSelect,
+        datasourceName,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World",
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/data-world/rest/data";
+    let container = document.getElementById('popup');
+    let content = document.getElementById('popup-content');
+    let closer = document.getElementById('popup-closer');
+    let overlay = new ol.Overlay(({
+        element: container,
+        autoPan: true,
+        autoPanAnimation: {
+            duration: 250
+        }
+    }));
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        overlays: [overlay]
+    });
+    let layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl,
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    dataSetService();
+
+    function dataSetService() {
+        new ol.supermap.DatasourceService(url).getDatasources(function (serviceResult) {
+        datasourcesSelect = document.getElementById("datasourcesSelect");
+        const datasourceNames = serviceResult.result.datasourceNames;
+        for (let i = 0,len = datasourceNames.length; i < len; i++) {
+            datasourcesSelect.options[i] = new Option(datasourceNames[i], datasourceNames[i]);
+        }
+        datasourceName = datasourcesSelect.value;
+        datasetsService(datasourceName)
+        })
+    }
+    //数据集信息
+    function datasetsService(datasourceName){
+         new ol.supermap.DatasetService(url).getDatasets(datasourceName,function (serviceResult) {
+            const datasetNames = serviceResult.result.datasetNames;
+            datasetsSelect = document.getElementById("datasetsSelect");
+        for (let i = 0,len = datasetNames.length; i < len; i++) {
+            datasetsSelect.options[i] = new Option(datasetNames[i], datasetNames[i]);
+            }
+        }); 
+    }
+
+    function datasetsPrint(){
+        datasourceName = datasourcesSelect.value;
+        const datasetName = datasetsSelect.value;
+        new ol.supermap.DatasetService(url).getDataset(datasourceName, datasetName, function (serviceResult) {
+            let innerHTML = "(" + resources.text_datasetInfoPrint + ")" + "<br><br>";
+            innerHTML += "dataSourceName:" + JSON.stringify(serviceResult.result.datasetInfo.dataSourceName, null, 2) + "<br>";
+            innerHTML += "description:" + JSON.stringify(serviceResult.result.datasetInfo.description, null, 2) + "<br>";
+            innerHTML += "isFileCache:" + JSON.stringify(serviceResult.result.datasetInfo.isFileCache, null, 2) + "<br>";
+            innerHTML += "name:" + JSON.stringify(serviceResult.result.datasetInfo.name, null, 2) + "<br>";
+            innerHTML += "prjCoordSys:" + "(...)" + "<br>";
+            content.innerHTML = innerHTML;
+            overlay.setPosition([0, 0])
+    });
+}
+    //关闭弹窗
+    closer.onclick = function () {
+        overlay.setPosition(undefined);
+        closer.blur();
+        return false;
+    };
+</script>
+</body>
+</html>

+ 178 - 0
public/supermap/examples/openlayers/02_datasourceService.html

@@ -0,0 +1,178 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_DatasourceInfo"></title>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        body {
+            margin: 0;
+            overflow: hidden;
+            background: #fff;
+            width: 100%;
+            height: 100%
+        }
+
+        #map {
+            position: absolute;
+            width: 100%;
+            height: 100%;
+        }
+
+        #toolbar {
+            position: absolute;
+            top: 50px;
+            right: 10px;
+            width: 300px;
+            text-align: center;
+            z-index: 100;
+            border-radius: 4px;
+        }
+
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 280px;
+        }
+
+        .ol-popup:after,
+        .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+
+        .ol-popup-closer {
+            text-decoration: none;
+            position: absolute;
+            top: 2px;
+            right: 8px;
+        }
+
+        .ol-popup-closer:after {
+            content: "✖";
+        }
+    </style>
+</head>
+
+<body>
+    <div id="toolbar" class="panel panel-primary">
+        <div class='panel-heading'>
+            <h5 class='panel-title text-center' data-i18n="resources.title_DatasourceInfo"></h5>
+        </div>
+        <div class='panel-body content'>
+            <div class='panel'>
+                <div class='input-group'>
+                    <span class='input-group-addon' data-i18n="resources.text_Datasources"></span>
+                    <select id='datasourcesSelect' class='form-control'></select>
+                </div>
+            </div>
+            <input type="button" class="btn btn-default" data-i18n="[value]resources.btn_query"
+                onclick="datasourcesPrint()" />
+        </div>
+    </div>
+    <div id="map"></div>
+    <div id="popup" class="ol-popup">
+        <a href="#" id="popup-closer" class="ol-popup-closer"></a>
+        <div id="popup-content"></div>
+    </div>
+    <script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+    <script type="text/javascript">
+        let map,
+            datasourcesSelect,
+            baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World",
+            url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/data-world/rest/data";
+        let container = document.getElementById('popup');
+        let content = document.getElementById('popup-content');
+        let closer = document.getElementById('popup-closer');
+        let overlay = new ol.Overlay(({
+            element: container,
+            autoPan: true,
+            autoPanAnimation: {
+                duration: 250
+            }
+        }));
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({ attributionOptions: { collapsed: false } })
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [0, 0],
+                zoom: 3,
+                projection: 'EPSG:4326',
+                multiWorld: true
+            }),
+            overlays: [overlay]
+        });
+        let layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest({
+                url: baseUrl,
+            }),
+            projection: 'EPSG:4326'
+        });
+        map.addLayer(layer);
+        dataSourcesService();
+
+        function dataSourcesService() {
+            new ol.supermap.DatasourceService(url).getDatasources(function (serviceResult) {
+                datasourcesSelect = document.getElementById("datasourcesSelect");
+                const datasourceNames = serviceResult.result.datasourceNames;
+                for (let i = 0, len = serviceResult.result.datasourceNames.length; i < len; i++) {
+                    datasourcesSelect.options[i] = new Option(datasourceNames[i], datasourceNames[i]);
+                }
+            });
+        }
+        //打印数据源信息
+        function datasourcesPrint() {
+            const datasourceName = datasourcesSelect.value;
+            new ol.supermap.DatasourceService(url).getDatasource(datasourceName, function (serviceResult) {
+                let innerHTML = "(" + resources.text_datasourceInfoPrint + ")" + "<br><br>";
+                innerHTML += "coordUnit:" + JSON.stringify(serviceResult.result.datasourceInfo.coordUnit, null, 2) + "<br>";
+                innerHTML += "description:" + JSON.stringify(serviceResult.result.datasourceInfo.description, null, 2) + "<br>";
+                innerHTML += "distanceUnit:" + JSON.stringify(serviceResult.result.datasourceInfo.distanceUnit, null, 2) + "<br>";
+                innerHTML += "engineType:" + JSON.stringify(serviceResult.result.datasourceInfo.engineType, null, 2) + "<br>";
+                innerHTML += "name:" + JSON.stringify(serviceResult.result.datasourceInfo.name, null, 2) + "<br>";
+                innerHTML += "prjCoordSys:" + "(...)" + "<br>";
+                content.innerHTML = innerHTML;
+                overlay.setPosition([0, 0])
+            });
+        }
+        //关闭弹窗
+        closer.onclick = function () {
+            overlay.setPosition(undefined);
+            closer.blur();
+            return false
+        };
+    </script>
+</body>
+
+</html>

+ 357 - 0
public/supermap/examples/openlayers/02_editFeatures.html

@@ -0,0 +1,357 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_editFeature"></title>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .editPane {
+            position: absolute;
+            right: 65px;
+            top: 8px;
+            text-align: center;
+            background: #FFF;
+            z-index: 1000;
+            border-radius: 4px;
+        }
+
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 120px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+
+        .tooltip {
+            position: relative;
+            background: rgba(0, 0, 0, 0.5);
+            border-radius: 4px;
+            color: white;
+            padding: 4px 8px;
+            opacity: 0.7;
+            white-space: nowrap;
+        }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<div>
+    <div class="panel panel-primary editPane" id="editPane">
+        <div class='panel-heading'>
+            <h5 class='panel-title text-center' data-i18n="resources.text_editSingle"></h5></div>
+        <div class='panel-body content'>
+            <input type='button' class='btn btn-default' data-i18n="[value]resources.btn_addMarker"
+                   onclick='addMarker()'/>&nbsp;
+            <input type='button' class='btn btn-default' data-i18n="[value]resources.btn_undoAdd"
+                   onclick='revocationMarker()'/>
+            <input type='button' class='btn btn-default' data-i18n="[value]resources.text_input_value_submit"
+                   onclick='commit()'/>&nbsp;
+            <input type='button' class='btn btn-default' data-i18n="[value]resources.text_input_value_clear"
+                   onclick='clearLayer()'/>
+        </div>
+    </div>
+</div>
+<script type="text/javascript" include="bootstrap,widgets.alert" src="../js/include-web.js"></script>
+<script type="text/javascript">
+    var map, id = [], pointFeature, vectorSource, resultLayer, editFeaturesService, alertDiv,
+        addPointsSource, addPointsLayer,
+        host = window.isLocal ? window.server : "https://iserver.supermap.io",
+        baseUrl = host + "/iserver/services/map-world/rest/maps/World",
+        url = host + "/iserver/services/data-world/rest/data",
+        container = document.getElementById('popup'),
+        content = document.getElementById('popup-content'),
+        overlay = new ol.Overlay(({
+            element: container,
+            autoPan: true,
+            autoPanAnimation: {
+                duration: 250
+            },
+            offset: [0, -20]
+        })),
+
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [0, 0],
+                zoom: 3,
+                projection: 'EPSG:4326',
+                multiWorld: true
+            }),
+        });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+
+    //创建鼠标操作提示:
+    var helpTooltipElement, helpTooltip, isclearPoint;
+
+    createHelpTooltip();
+
+    function createHelpTooltip() {
+        if (helpTooltipElement) {
+            helpTooltipElement.parentNode.removeChild(helpTooltipElement);
+        }
+        helpTooltipElement = document.createElement('div');
+        helpTooltipElement.className = 'tooltip hidden';
+        helpTooltip = new ol.Overlay({
+            element: helpTooltipElement,
+            offset: [15, 0],
+            positioning: 'center-left'
+        });
+    }
+
+    initFeature();
+    loadLayer();
+
+    function loadLayer() {
+        //添加查询结果图层
+        vectorSource = new ol.source.Vector({
+            wrapX: false
+        });
+        resultLayer = new ol.layer.Vector({
+            source: vectorSource,
+        });
+
+        //添加点图层
+        addPointsSource = new ol.source.Vector({
+            wrapX: false
+        });
+        addPointsLayer = new ol.layer.Vector({
+            source: addPointsSource,
+        });
+
+        map.addLayer(addPointsLayer);
+        map.addLayer(resultLayer);
+    }
+
+    editFeaturesService = new ol.supermap.FeatureService(url);
+
+    function initFeature() {
+        var polygon = new ol.geom.Polygon([[[118, 20], [120, 20], [120, 50], [-120, 50], [118, 20]]]);
+        var featureService = new ol.supermap.FeatureService(url);
+        var getFeatureParams = new SuperMap.GetFeaturesByGeometryParameters({
+            toIndex: -1,
+            datasetNames: ["World:Capitals"],
+            geometry: polygon,
+            spatialQueryMode: "INTERSECT"
+        });
+        featureService.getFeaturesByGeometry(getFeatureParams, function (serviceResult) {
+            var features = (new ol.format.GeoJSON()).readFeatures(serviceResult.result.features);
+            for (var i = 0; i < features.length; i++) {
+                features[i].setStyle(new ol.style.Style({
+                    image: new ol.style.Icon(({
+                        anchor: [0.5, 0.9],
+                        src: '../img/markerbig_select.png'
+                    }))
+                }));
+            }
+
+            //避免重复添加图层,只对一个图层进行数据更新操作:
+            if (vectorSource.getFeatures().length > 0) {
+                vectorSource.clear();
+            }
+            vectorSource.addFeatures(features);
+
+            map.on('pointermove', pointermoveLinstener);
+        });
+    }
+
+    function pointermoveLinstener(e) {
+        var select = false;
+        map.forEachFeatureAtPixel(e.pixel, function (feature) {
+            if (feature.getProperties().CAPITAL) {
+                map.getTargetElement().style.cursor = 'pointer';
+                var contentHTML = feature.getProperties().CAPITAL;
+                content.innerHTML = contentHTML;
+                overlay.setPosition(feature.getGeometry().getCoordinates());
+                map.addOverlay(overlay);
+                select = true
+            }
+        }, {
+            hitTolerance: 10
+        });
+        if (!select) {
+            map.getTargetElement().style.cursor = '';
+            overlay.setPosition(undefined);
+            map.removeOverlay(overlay);
+        }
+        if (isclearPoint) {
+            helpTooltipElement.innerHTML = resources.text_selectMarkerToDelete;
+            helpTooltip.setPosition(e.coordinate);
+            helpTooltipElement.classList.remove('hidden');
+            map.addOverlay(helpTooltip);
+        } else {
+            helpTooltip.setPosition(undefined);
+            helpTooltipElement.classList.add('hidden');
+        }
+    }
+
+    function addMarker() {
+        if (isclearPoint) {
+            closeSelectListener();
+        }
+        widgets.alert.clearAlert();
+        var xmax = 120, xmin = 100, ymax = 50, ymin = 20,
+            point = [Math.floor(Math.random() * (xmax - xmin + 1) + xmin), Math.floor(Math.random() * (ymax - ymin + 1) + ymin)];
+        if (!pointFeature) {
+            ceateMarker(point)
+        } else {
+            addPointsSource.clear();
+            ceateMarker(point)
+        }
+
+        function ceateMarker(point) {
+            pointFeature = new ol.Feature(new ol.geom.Point(point));
+            pointFeature.setStyle(new ol.style.Style({
+                image: new ol.style.Circle({
+                    fill: new ol.style.Fill({
+                        color: [255, 0, 0, 0.5]
+                    }),
+                    stroke: new ol.style.Stroke({
+                        color: 'red',
+                        width: 2
+                    }),
+                    radius: 8
+                })
+            }));
+            pointFeature.setProperties({POP: 1, CAPITAL: 'test'});
+            //判断添加点图层已添加到地图,避免重复添加图层,只对一个图层进行数据更新操作:
+            addPointsSource.addFeature(pointFeature);
+            map.getView().animate({
+                duration: 850,
+                zoom: 5,
+                center: point,
+            });
+        }
+    }
+
+    function revocationMarker() {
+        if (isclearPoint) {
+            closeSelectListener();
+        }
+        if (pointFeature) {
+            addPointsSource.clear();
+            pointFeature = null;
+        } else {
+            widgets.alert.showAlert(resources.msg_noRevocableMarker, false);
+        }
+    }
+
+    function commit() {
+        widgets.alert.clearAlert();
+        if (isclearPoint) {
+            closeSelectListener();
+        }
+        if (pointFeature) {
+            var addFeatureParams = new SuperMap.EditFeaturesParameters({
+                features: pointFeature,
+                dataSourceName: "World",
+                dataSetName: "Capitals",
+                editType: "add",
+                returnContent: true
+            });
+            editFeaturesService.editFeatures(addFeatureParams, function (serviceResult) {
+                if (serviceResult.result.succeed) {
+                    id.push(serviceResult.result[0]);
+                    addPointsSource.clear();
+                    vectorSource.clear();
+                    pointFeature = null;
+                    initFeature();
+                    widgets.alert.showAlert(resources.msg_submitSuccess, true);
+                }
+            });
+        } else {
+            widgets.alert.showAlert(resources.msg_noMarkerToSubmit, false);
+        }
+    }
+
+    function clearLayer() {
+        widgets.alert.clearAlert();
+        isclearPoint = true;
+        map.on('click', selectListener);
+    }
+
+    function selectListener(e) {
+        var deletedId = null;
+        map.forEachFeatureAtPixel(e.pixel, function (feature) {
+            //只删选中第一个要素:
+            if (!deletedId) {
+                deletedId = feature.getId();
+                var deleteParams = new SuperMap.EditFeaturesParameters({
+                    dataSourceName: "World",
+                    dataSetName: "Capitals",
+                    IDs: [deletedId],
+                    editType: "delete"
+                });
+
+                editFeaturesService.editFeatures(deleteParams, function (serviceResult) {
+                    if (serviceResult.result.succeed) {
+                        initFeature();
+                        vectorSource.clear();
+                        isclearPoint = false;
+                        closeSelectListener();
+                        widgets.alert.showAlert(resources.text_deleteSuccess, true);
+                    } else {
+                        widgets.alert.showAlert(resources.msg_deleteFailed, false)
+                    }
+                });
+            }
+        }, {
+            hitTolerance: 1
+        });
+
+    }
+
+    function closeSelectListener() {
+        isclearPoint = false;
+        map.un('click', selectListener);
+        helpTooltip.setPosition(undefined);
+        map.removeOverlay(helpTooltip);
+        helpTooltipElement.classList.add('hidden');
+    }
+
+</script>
+</body>
+</html>

+ 153 - 0
public/supermap/examples/openlayers/02_fieldStatistics.html

@@ -0,0 +1,153 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_fieldStatistics"></title>
+    <script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 10px;
+            border-radius: 5px;
+            border: 1px solid #cccccc;
+            bottom: 10px;
+            left: 10px;
+            min-width: 280px;
+        }
+
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var container, content, info;
+    var map, currentData, layersName = [],
+        mapURL = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World",
+        dataURL = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/data-world/rest/data";
+
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: mapURL
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    initResultInfoWin();
+    showLayersInfo();
+
+    function initResultInfoWin() {
+        container = document.getElementById('popup');
+        content = document.getElementById('popup-content');
+        info = new ol.control.Control({element: container});
+        info.setMap(map);
+        map.addControl(info);
+    }
+
+    //获取子图层信息
+    function showLayersInfo() {
+        var subLayer;
+        new ol.supermap.LayerInfoService(mapURL).getLayersInfo(function (serviceResult) {
+            var layers = serviceResult.result.subLayers.layers;
+            if (!layers) return;
+            for (var i = 0, len = layers.length; i < len; i++) {
+                subLayer = layers[i];
+                if ("UGC" == subLayer.type) {
+                    //记录数据源,数据集信息供字段查询统计使用
+                    if (subLayer.datasetInfo.name && subLayer.datasetInfo.dataSourceName) {
+                        layersName[i] = {
+                            dataSetName: subLayer.datasetInfo.name,
+                            dataSourceName: subLayer.datasetInfo.dataSourceName,
+                            layerName: subLayer.name
+                        };
+                    }
+                }
+            }
+            getFields();
+        });
+    }
+
+    function getFields() {
+        var name = 'continent_T@World';
+        var dataInfo;
+        for (var i = 0; i < layersName.length; i++) {
+            dataInfo = layersName[i];
+            if (dataInfo.layerName == name) {
+                //设置数据集,数据源,查询fields信息
+                currentData = dataInfo;
+                var param = new SuperMap.FieldParameters({
+                    datasource: dataInfo.dataSourceName,
+                    dataset: dataInfo.dataSetName
+                });
+                new ol.supermap.FieldService(dataURL).getFields(param, function (serviceResult) {
+                    fieldStatistic();
+                });
+            }
+        }
+    }
+
+    function fieldStatistic() {
+        var fieldName = 'SmID';
+        var param = new SuperMap.FieldStatisticsParameters({
+            datasource: currentData.dataSourceName,
+            dataset: currentData.dataSetName,
+            fieldName: fieldName,
+            statisticMode: [
+                SuperMap.StatisticMode.MAX,
+                SuperMap.StatisticMode.MIN,
+                SuperMap.StatisticMode.SUM,
+                SuperMap.StatisticMode.AVERAGE,
+                SuperMap.StatisticMode.STDDEVIATION,
+                SuperMap.StatisticMode.VARIANCE
+            ]
+        });
+        if (currentData) {
+            new ol.supermap.FieldService(dataURL).getFieldStatisticsInfo(param, function (serviceResult) {
+                showResult(serviceResult.result);
+            });
+        }
+    }
+
+    function showResult(serviceResult) {
+        if (!serviceResult) {
+            return;
+        }
+        var innerHTMLStr = '<div style="line-height: 35px;">'
+            + '<strong>' + resources.text_layer + '</strong>(continent_T@World)&nbsp;&nbsp;&nbsp;<strong>' + resources.text_field + '</strong>(' + serviceResult.fieldName + ')<div>';
+        innerHTMLStr += '<div style="line-height: 35px;">'
+            + '<strong>' + resources.text_statisticResult + '</strong><div>';
+        var keys = ["AVERAGE", "MAX", "MIN", "STDDEVIATION", "SUM", "VARIANCE"];
+        var tableStr = "<table id='trafficRes' class='table table-bordered'><tr><td>" + resources.text_averageValue + "</td><td>" + resources.text_maxValue + "</td><td>" + resources.text_minValue + "</td>"
+            + "<td>" + resources.text_standardDeviation + "</td><td>" + resources.text_sum + "</td><td>" + resources.text_variance + "</td></tr>";
+        var resultTR = "<tr>";
+        for (var i = 0; i < keys.length; i++) {
+            resultTR += "<td>" + serviceResult[keys[i]] + "</td>";
+        }
+        resultTR += "</tr>";
+        tableStr += resultTR + "</table>";
+        innerHTMLStr += tableStr;
+        content.innerHTML = innerHTMLStr;
+        map.addControl(info);
+    }
+</script>
+</body>
+</html>

+ 101 - 0
public/supermap/examples/openlayers/02_fieldsService.html

@@ -0,0 +1,101 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_fieldService"></title>
+    <script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 280px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var map, baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World",
+            url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/data-world/rest/data";
+    var container = document.getElementById('popup');
+    var content = document.getElementById('popup-content');
+    var overlay = new ol.Overlay(({
+        element: container,
+        autoPan: true,
+        autoPanAnimation: {
+            duration: 250
+        }
+    }));
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 2,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        overlays: [overlay]
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl,
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    mapService();
+
+    function mapService() {
+        var param = new SuperMap.FieldParameters({
+            datasource: "World",
+            dataset: "continent_T"
+        });
+        new ol.supermap.FieldService(url).getFields(param,function (serviceResult) {
+            content.innerHTML = serviceResult.result.fieldNames.join(', ');
+            overlay.setPosition([0, 0]);
+        });
+    }
+</script>
+</body>
+</html>

+ 76 - 0
public/supermap/examples/openlayers/02_getFeatureByBounds.html

@@ -0,0 +1,76 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_getFeatureByBounds"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, vectorLayer, resultLayer,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World",
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/data-world/rest/data";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [-10, 15],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    query();
+
+    function query() {
+        //添加查询区域
+        var polygon = new ol.geom.Polygon([[[-20, 20], [-20, -20], [20, -20], [20, 20], [-20, 20]]]);
+        var polygonSource = new ol.source.Vector({
+            features: [new ol.Feature(polygon)],
+            wrapX: false
+        });
+        vectorLayer = new ol.layer.Vector({
+            source: polygonSource,
+            style: new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'red',
+                    width: 3
+                }),
+                fill: new ol.style.Fill({
+                    color: 'rgba(0, 0, 255, 0.1)'
+                })
+            })
+        });
+        map.addLayer(vectorLayer);
+        //创建集Bounds查询服务
+        var boundsParam = new SuperMap.GetFeaturesByBoundsParameters({
+            datasetNames: ["World:Capitals"],
+            bounds: polygon.getExtent()
+        });
+        new ol.supermap.FeatureService(url).getFeaturesByBounds(boundsParam, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.features),
+                wrapX: false
+            });
+            resultLayer = new ol.layer.Vector({
+                source: vectorSource
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 77 - 0
public/supermap/examples/openlayers/02_getFeatureByBuffer.html

@@ -0,0 +1,77 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_getFeatureByBuffer"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, vectorLayer, resultLayer,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World",
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/data-world/rest/data";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [-10, 15],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    query();
+
+    function query() {
+        var polygon = new ol.geom.Polygon([[[-20, 20], [-20, -20], [20, -20], [20, 20], [-20, 20]]]);
+        var polygonSource = new ol.source.Vector({
+            features: [new ol.Feature(polygon)],
+            wrapX: false
+        });
+        vectorLayer = new ol.layer.Vector({
+            source: polygonSource,
+            style: new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'red',
+                    width: 3
+                }),
+                fill: new ol.style.Fill({
+                    color: 'rgba(0, 0, 255, 0.1)'
+                })
+            })
+        });
+        map.addLayer(vectorLayer);
+
+        var bufferParam = new SuperMap.GetFeaturesByBufferParameters({
+            datasetNames: ["World:Capitals"],
+            bufferDistance: 30,
+            geometry: polygon
+        });
+        new ol.supermap.FeatureService(url).getFeaturesByBuffer(bufferParam, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.features),
+                wrapX: false
+            });
+            resultLayer = new ol.layer.Vector({
+                source: vectorSource
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+
+</script>
+</body>
+</html>

+ 86 - 0
public/supermap/examples/openlayers/02_getFeatureByGeometry.html

@@ -0,0 +1,86 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_getFeatureByGeometry"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, vectorLayer, resultLayer,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World",
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/data-world/rest/data";
+
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    query();
+
+    function query() {
+        var polygon = new ol.geom.Polygon([[[0, 0], [-10, 30], [-30, 0], [0, 0]]]);
+        var polygonSource = new ol.source.Vector({
+            features: [new ol.Feature(polygon)],
+            wrapX: false
+        });
+        vectorLayer = new ol.layer.Vector({
+            source: polygonSource,
+            style: new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'red',
+                    width: 3
+                }),
+                fill: new ol.style.Fill({
+                    color: 'rgba(0, 0, 255, 0.1)'
+                })
+            })
+        });
+        map.addLayer(vectorLayer);
+
+        var geometryParam = new SuperMap.GetFeaturesByGeometryParameters({
+            datasetNames: ["World:Countries"],
+            geometry: polygon,
+            spatialQueryMode: "INTERSECT"
+        });
+        new ol.supermap.FeatureService(url).getFeaturesByGeometry(geometryParam, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.features),
+                wrapX: false
+            });
+            resultLayer = new ol.layer.Vector({
+                source: vectorSource,
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+
+    function clearLayer() {
+        if (vectorLayer) {
+            map.removeLayer(vectorLayer);
+        }
+        if (resultLayer) {
+            map.removeLayer(resultLayer);
+        }
+    }
+</script>
+</body>
+</html>

+ 57 - 0
public/supermap/examples/openlayers/02_getFeatureByIDs.html

@@ -0,0 +1,57 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_getFeatureByIDs"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, resultLayer,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World",
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/data-world/rest/data";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [100, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl,
+            wrapX: true
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    query();
+
+    function query() {
+        var idsParam = new SuperMap.GetFeaturesByIDsParameters({
+            IDs: [246, 247],
+            datasetNames: ["World:Countries"]
+        });
+        new ol.supermap.FeatureService(url).getFeaturesByIDs(idsParam, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.features),
+                wrapX: false
+            });
+            resultLayer = new ol.layer.Vector({
+                source: vectorSource
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 60 - 0
public/supermap/examples/openlayers/02_getFeatureBySQL.html

@@ -0,0 +1,60 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_getFeatureBySQL"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, resultLayer,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World",
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/data-world/rest/data";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [100, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl,
+            wrapX: true
+        }),
+        projection: 'EPSG:4326'
+    })
+    map.addLayer(layer);
+    query();
+
+    function query() {
+        var sqlParam = new SuperMap.GetFeaturesBySQLParameters({
+            queryParameter: {
+                name: "Countries@World",
+                attributeFilter: "SMID = 247"
+            },
+            datasetNames: ["World:Countries"]
+        });
+        new ol.supermap.FeatureService(url).getFeaturesBySQL(sqlParam, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.features),
+                wrapX: false
+            });
+            resultLayer = new ol.layer.Vector({
+                source: vectorSource
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 114 - 0
public/supermap/examples/openlayers/02_getGridCellInfos.html

@@ -0,0 +1,114 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_getGridCellInfos"></title>
+    <script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 280px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var container = document.getElementById('popup');
+    var content = document.getElementById('popup-content');
+    var overlay = new ol.Overlay(({
+        element: container,
+        autoPan: true,
+        autoPanAnimation: {
+            duration: 250
+        }
+    }));
+    var map, baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/世界地图_Day",
+            url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/data-world/rest/data";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        overlays: [overlay]
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+
+    map.on("click", function (evt) {
+        var x = evt.coordinate[0];
+        var y = evt.coordinate[1];
+        if (x < -180.0 || x > 180.0 || y < -90 || y > 90) {
+            return;
+        }
+        var getGridCellInfosParam = new SuperMap.GetGridCellInfosParameters({
+            dataSourceName: "World",
+            datasetName: "WorldEarth",
+            X: x,
+            Y: y
+        });
+
+        new ol.supermap.GridCellInfosService(url).getGridCellInfos(getGridCellInfosParam, function (serviceResult) {
+            if (!serviceResult.result) {
+                return;
+            }
+            var result = serviceResult.result;
+            var innerHTML = resources.text_gridQueryResult + "<br>" + "column: " + result.column + "<br>";
+            innerHTML += "row: " + result.row + "<br>";
+            innerHTML += "value: " + result.value + "<br>";
+            content.innerHTML = innerHTML;
+            overlay.setPosition([evt.coordinate[0], evt.coordinate[1]]);
+        });
+    });
+</script>
+</body>
+</html>

+ 72 - 0
public/supermap/examples/openlayers/03_themeDotDensity.html

@@ -0,0 +1,72 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_themeDotDensity"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, themeLayer, options,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
+    var mapService = new ol.supermap.MapService(url);
+    mapService.getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [0, 0],
+                zoom: 2,
+                projection: "EPSG:4326",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        createTheme();
+    });
+
+    function createTheme() {
+        var themeDotDensity = new SuperMap.ThemeDotDensity({
+            dotExpression: "Pop_1994",
+            value: 5000000,
+            style: new SuperMap.ServerStyle({
+                markerSize: 3,
+                markerSymbolID: 12
+            })
+        });
+        var themeParameters = new SuperMap.ThemeParameters({
+            themes: [themeDotDensity],
+            datasetNames: ["Countries"],
+            dataSourceNames: ["World"]
+        });
+        new ol.supermap.ThemeService(url).getThemeInfo(themeParameters, function (serviceResult) {
+            var result = serviceResult.result;
+            if (result && result.newResourceID) {
+                themeLayer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest({
+                        url: url,
+                        noWrap: true,
+                        cacheEnabled: false,
+                        transparent: true,
+                        layersID: result.newResourceID,
+                        transparent: true
+                    })
+                });
+                map.addLayer(themeLayer);
+            }
+        })
+    }
+</script>
+</body>
+</html>

+ 77 - 0
public/supermap/examples/openlayers/03_themeGraduatedSymbol.html

@@ -0,0 +1,77 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.text_graduatedSymbol"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>      
+<script type="text/javascript">
+    var map, themeLayer, options,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China";
+    var mapService = new ol.supermap.MapService(url);
+    mapService.getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [12406035, 4304933],
+                zoom: 4,
+                projection: "EPSG:3857",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        createTheme();
+    });
+
+    function createTheme() {
+        var themeGraduatedSymbol = new SuperMap.ThemeGraduatedSymbol({
+            expression: "SMAREA",
+            baseValue: 3000000000000,
+            graduatedMode: SuperMap.GraduatedMode.CONSTANT,
+            style: new SuperMap.ThemeGraduatedSymbolStyle({
+                positiveStyle: new SuperMap.ServerStyle({
+                    markerSize: 50,
+                    markerSymbolID: 0,
+                    lineColor: new SuperMap.ServerColor(255, 165, 0),
+                    fillBackColor: new SuperMap.ServerColor(255, 0, 0)
+                })
+            })
+        });
+        var themeParameters = new SuperMap.ThemeParameters({
+            themes: [themeGraduatedSymbol],
+            datasetNames: ["China_Province_pg"],
+            dataSourceNames: ["China"]
+        });
+        new ol.supermap.ThemeService(url).getThemeInfo(themeParameters, function (serviceResult) {
+            var result = serviceResult.result;
+            if (result && result.newResourceID) {
+                themeLayer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest({
+                        url: url,
+                        noWrap: true,
+                        cacheEnabled: false,
+                        transparent: true,
+                        layersID: result.newResourceID,
+                        transparent: true
+                    })
+                });
+                map.addLayer(themeLayer);
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 110 - 0
public/supermap/examples/openlayers/03_themeGraph.html

@@ -0,0 +1,110 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_themeGraph"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, themeLayer, options,
+        host = (window.isLocal ? window.server : "https://iserver.supermap.io"),
+        mapUrl = host + "/iserver/services/map-jingjin/rest/maps/京津地区地图",
+        url = host + "/iserver/services/map-jingjin/rest/maps/京津地区人口分布图_专题图";
+    var mapService = new ol.supermap.MapService(url);
+    mapService.getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [117, 40],
+                zoom: 7,
+                projection: "EPSG:4326",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(mapUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer)
+        createTheme();
+    });
+
+    function createTheme() {
+        var themeGraph = new SuperMap.ThemeGraph({
+            items: [
+                new SuperMap.ThemeGraphItem({
+                    caption: "1992-1995人口增长率",
+                    graphExpression: "Pop_Rate95",
+                    uniformStyle: new SuperMap.ServerStyle({
+                        fillForeColor: new SuperMap.ServerColor(92, 73, 234),
+                        lineWidth: 0.1
+                    })
+                }),
+                new SuperMap.ThemeGraphItem({
+                    caption: "1995-1999人口增长率",
+                    graphExpression: "Pop_Rate99",
+                    uniformStyle: new SuperMap.ServerStyle({
+                        fillForeColor: new SuperMap.ServerColor(211, 111, 240),
+                        lineWidth: 0.1
+                    })
+                })
+            ],
+            barWidth: 0.03,
+            graduatedMode: SuperMap.GraduatedMode.SQUAREROOT,
+            graphAxes: new SuperMap.ThemeGraphAxes({
+                axesDisplayed: true
+            }),
+            graphSize: new SuperMap.ThemeGraphSize({
+                maxGraphSize: 1,
+                minGraphSize: 0.35
+            }),
+            graphText: new SuperMap.ThemeGraphText({
+                graphTextDisplayed: true,
+                graphTextFormat: SuperMap.ThemeGraphTextFormat.VALUE,
+                graphTextStyle: new SuperMap.ServerTextStyle({
+                    sizeFixed: true,
+                    fontHeight: 9,
+                    fontWidth: 5
+                })
+            }),
+            graphType: SuperMap.ThemeGraphType.BAR3D
+        });
+        var themeParameters = new SuperMap.ThemeParameters({
+            themes: [themeGraph],
+            dataSourceNames: ["Jingjin"],
+            datasetNames: ["BaseMap_R"]
+        });
+
+        var extent = [114.59, 37.76, 119.51, 42.31];
+        new ol.supermap.ThemeService(url).getThemeInfo(themeParameters, function (serviceResult) {
+            var result = serviceResult.result;
+            if (result && result.newResourceID) {
+                themeLayer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest({
+                        url: url,
+                        noWrap: true,
+                        cacheEnabled: false,
+                        tileGrid: new ol.tilegrid.TileGrid({
+                            extent: extent,
+                            resolutions: options.tileGrid.getResolutions()
+                        }),
+                        layersID: result.newResourceID,
+                        transparent: true
+                    })
+                });
+                map.addLayer(themeLayer);
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 166 - 0
public/supermap/examples/openlayers/03_themeGridRange.html

@@ -0,0 +1,166 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_themeGridRange"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, themeLayer, options,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-jingjin/rest/maps/京津地区人口分布图_专题图";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [117, 40],
+                zoom: 7,
+                projection: "EPSG:4326",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        createTheme();
+    });
+
+    function createTheme() {
+        var themeGridRangeItem1 = new SuperMap.ThemeGridRangeItem({
+                start: -4,
+                end: 120,
+                color: new SuperMap.ServerColor(198, 244, 240)
+            }),
+
+            themeGridRangeItem2 = new SuperMap.ThemeGridRangeItem({
+                start: 120,
+                end: 240,
+                color: new SuperMap.ServerColor(176, 244, 188)
+            }),
+            themeGridRangeItem3 = new SuperMap.ThemeGridRangeItem({
+                start: 240,
+                end: 360,
+                color: new SuperMap.ServerColor(218, 251, 178)
+            }),
+            themeGridRangeItem4 = new SuperMap.ThemeGridRangeItem({
+                start: 360,
+                end: 480,
+                color: new SuperMap.ServerColor(220, 236, 145)
+            }),
+            themeGridRangeItem5 = new SuperMap.ThemeGridRangeItem({
+                start: 480,
+                end: 600,
+                color: new SuperMap.ServerColor(96, 198, 66)
+            }),
+            themeGridRangeItem6 = new SuperMap.ThemeGridRangeItem({
+                start: 600,
+                end: 720,
+                color: new SuperMap.ServerColor(20, 142, 53)
+            }),
+            themeGridRangeItem7 = new SuperMap.ThemeGridRangeItem({
+                start: 720,
+                end: 840,
+                color: new SuperMap.ServerColor(85, 144, 55)
+            }),
+
+            themeGridRangeItem8 = new SuperMap.ThemeGridRangeItem({
+                start: 840,
+                end: 960,
+                color: new SuperMap.ServerColor(171, 168, 38)
+            }),
+            themeGridRangeItem9 = new SuperMap.ThemeGridRangeItem({
+                start: 960,
+                end: 1100,
+                color: new SuperMap.ServerColor(235, 165, 9)
+            }),
+            themeGridRangeItem10 = new SuperMap.ThemeGridRangeItem({
+                start: 1100,
+                end: 1220,
+                color: new SuperMap.ServerColor(203, 89, 2)
+            }),
+            themeGridRangeItem11 = new SuperMap.ThemeGridRangeItem({
+                start: 1220,
+                end: 1340,
+                color: new SuperMap.ServerColor(157, 25, 1)
+            }),
+            themeGridRangeItem12 = new SuperMap.ThemeGridRangeItem({
+                start: 1340,
+                end: 1460,
+                color: new SuperMap.ServerColor(118, 15, 3)
+            }),
+            themeGridRangeItem13 = new SuperMap.ThemeGridRangeItem({
+                start: 1460,
+                end: 1600,
+                color: new SuperMap.ServerColor(112, 32, 7)
+            }),
+
+            themeGridRangeItem14 = new SuperMap.ThemeGridRangeItem({
+                start: 1600,
+                end: 1800,
+                color: new SuperMap.ServerColor(106, 45, 12)
+            }),
+            themeGridRangeItem15 = new SuperMap.ThemeGridRangeItem({
+                start: 1800,
+                end: 2000,
+                color: new SuperMap.ServerColor(129, 80, 50)
+            }),
+            themeGridRangeItem16 = new SuperMap.ThemeGridRangeItem({
+                start: 2000,
+                end: 2167,
+                color: new SuperMap.ServerColor(160, 154, 146)
+            });
+        var themeGridRange = new SuperMap.ThemeGridRange({
+            reverseColor: false,
+            rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+            items: [
+                themeGridRangeItem1, themeGridRangeItem2,
+                themeGridRangeItem3, themeGridRangeItem4,
+                themeGridRangeItem5, themeGridRangeItem6,
+                themeGridRangeItem7, themeGridRangeItem8,
+                themeGridRangeItem9, themeGridRangeItem10,
+                themeGridRangeItem11, themeGridRangeItem12,
+                themeGridRangeItem13, themeGridRangeItem14,
+                themeGridRangeItem15, themeGridRangeItem16
+            ]
+        });
+        var themeParameters = new SuperMap.ThemeParameters({
+            datasetNames: ["JingjinTerrain"],
+            dataSourceNames: ["Jingjin"],
+            joinItems: null,
+            themes: [themeGridRange]
+        });
+
+        var extent = [114.59, 37.76, 119.51, 42.31];
+        new ol.supermap.ThemeService(url).getThemeInfo(themeParameters, function (serviceResult) {
+            var result = serviceResult.result;
+            if (result && result.newResourceID) {
+                themeLayer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest({
+                        url: url,
+                        noWrap: true,
+                        cacheEnabled: false,
+                        layersID: result.newResourceID,
+                        tileGrid: new ol.tilegrid.TileGrid({
+                            extent: extent,
+                            resolutions: options.tileGrid.getResolutions()
+                        }),
+                        transparent: true,
+                    })
+                });
+                map.addLayer(themeLayer);
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 155 - 0
public/supermap/examples/openlayers/03_themeGridUnique.html

@@ -0,0 +1,155 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_themeGridUnique"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, themeLayer, options,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-jingjin/rest/maps/京津地区地图";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [117, 40],
+                zoom: 7,
+                projection: "EPSG:4326",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        createTheme();
+    });
+
+    function setItems() {
+        var items = [],
+            color0 = new SuperMap.ServerColor(198, 244, 240),
+            color1 = new SuperMap.ServerColor(176, 244, 188),
+            color2 = new SuperMap.ServerColor(218, 251, 178),
+            color3 = new SuperMap.ServerColor(220, 236, 145),
+            color4 = new SuperMap.ServerColor(96, 198, 66),
+            color5 = new SuperMap.ServerColor(20, 142, 53),
+            color6 = new SuperMap.ServerColor(85, 144, 55),
+            color7 = new SuperMap.ServerColor(171, 168, 38),
+            color8 = new SuperMap.ServerColor(235, 165, 9),
+            color9 = new SuperMap.ServerColor(203, 89, 2),
+            color10 = new SuperMap.ServerColor(157, 25, 1),
+            color11 = new SuperMap.ServerColor(118, 15, 3),
+            color12 = new SuperMap.ServerColor(112, 32, 7),
+            color13 = new SuperMap.ServerColor(106, 45, 12),
+            color14 = new SuperMap.ServerColor(129, 80, 50),
+            color15 = new SuperMap.ServerColor(160, 154, 146);
+        for (var i = -4; i < 2197; i++) {
+            var num = parseInt(i / 135);
+            var item = new SuperMap.ThemeGridUniqueItem();
+            item.caption = 1;
+            item.unique = i;
+            item.visible = true;
+            switch (num) {
+                case 0:
+                    item.color = color0;
+                    break;
+                case 1:
+                    item.color = color1;
+                    break;
+                case 2:
+                    item.color = color2;
+                    break;
+                case 3:
+                    item.color = color3;
+                    break;
+                case 4:
+                    item.color = color4;
+                    break;
+                case 5:
+                    item.color = color5;
+                    break;
+                case 6:
+                    item.color = color6;
+                    break;
+                case 7:
+                    item.color = color7;
+                    break;
+                case 8:
+                    item.color = color8;
+                    break;
+                case 9:
+                    item.color = color9;
+                    break;
+                case 10:
+                    item.color = color10;
+                    break;
+                case 11:
+                    item.color = color11;
+                    break;
+                case 12:
+                    item.color = color12;
+                    break;
+                case 13:
+                    item.color = color13;
+                    break;
+                case 14:
+                    item.color = color14;
+                    break;
+                case 15:
+                    item.color = color15;
+                    break;
+                default:
+                    item.color = color0;
+                    break;
+            }
+            items.push(item);
+        }
+        return items;
+    }
+
+    function createTheme() {
+        var themeGridUnique = new SuperMap.ThemeGridUnique({
+            defaultcolor: new SuperMap.ServerColor(0, 0, 0),
+            items: setItems()
+        });
+        var themeParameters = new SuperMap.ThemeParameters({
+            datasetNames: ["JingjinTerrain"],
+            dataSourceNames: ["Jingjin"],
+            themes: [themeGridUnique]
+        });
+
+        var extent = [114.59, 37.76, 119.51, 42.31];
+        new ol.supermap.ThemeService(url).getThemeInfo(themeParameters, function (serviceResult) {
+            var result = serviceResult.result;
+            if (result && result.newResourceID) {
+                themeLayer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest({
+                        url: url,
+                        noWrap: true,
+                        cacheEnabled: false,
+                        transparent: true,
+                        layersID: result.newResourceID,
+                        tileGrid: new ol.tilegrid.TileGrid({
+                            extent: extent,
+                            resolutions: options.tileGrid.getResolutions()
+                        }),
+                        transparent: true
+                    })
+                });
+                map.addLayer(themeLayer);
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 145 - 0
public/supermap/examples/openlayers/03_themeLabel.html

@@ -0,0 +1,145 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_themeLabel"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, themeLayer, options
+    url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [0, 0],
+                zoom: 2,
+                projection: "EPSG:4326",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        createTheme();
+    });
+
+    function createTheme() {
+        var style1, style2, style3;
+        style1 = new SuperMap.ServerTextStyle({
+            fontHeight: 4,
+            foreColor: new SuperMap.ServerColor(100, 20, 50),
+            sizeFixed: true,
+            bold: true
+
+        });
+        style2 = new SuperMap.ServerTextStyle({
+            fontHeight: 4,
+            foreColor: new SuperMap.ServerColor(250, 0, 0),
+            sizeFixed: true,
+            bold: true
+        });
+        style3 = new SuperMap.ServerTextStyle({
+            fontHeight: 4,
+            foreColor: new SuperMap.ServerColor(93, 95, 255),
+            sizeFixed: true,
+            bold: true
+        });
+        var themeLabelItem1, themeLabelItem2, themeLabelItem3, themeLabelItem4, themeLabelItem5, themeLabelItem6;
+        themeLabelItem1 = new SuperMap.ThemeLabelItem({
+            start: 0.0,
+            end: 7800000,
+            style: style1
+        });
+        themeLabelItem2 = new SuperMap.ThemeLabelItem({
+            start: 7800000,
+            end: 15000000,
+            style: style2
+        });
+        themeLabelItem3 = new SuperMap.ThemeLabelItem({
+            start: 15000000,
+            end: 30000000,
+            style: style3
+        });
+        themeLabelItem4 = new SuperMap.ThemeLabelItem({
+            start: 0.0,
+            end: 55,
+            style: style1
+        });
+        themeLabelItem5 = new SuperMap.ThemeLabelItem({
+            start: 55,
+            end: 109,
+            style: style2
+        });
+        themeLabelItem6 = new SuperMap.ThemeLabelItem({
+            start: 109,
+            end: 300,
+            style: style3
+        });
+
+        var themeLabel = new SuperMap.ThemeLabel({
+            matrixCells: [
+                [new SuperMap.LabelThemeCell({
+                    themeLabel: new SuperMap.ThemeLabel({
+                        labelExpression: "CAPITAL",
+                        rangeExpression: "SmID",
+                        numericPrecision: 0,
+                        items: [themeLabelItem4, themeLabelItem5, themeLabelItem6]
+                    })
+                })],
+                [new SuperMap.LabelThemeCell({
+                    themeLabel: new SuperMap.ThemeLabel({
+                        labelExpression: "CAP_POP",
+                        rangeExpression: "CAP_POP",
+                        numericPrecision: 0,
+                        items: [themeLabelItem1, themeLabelItem2, themeLabelItem3]
+                    })
+                })]
+            ],
+            background: new SuperMap.ThemeLabelBackground({
+                backStyle: new SuperMap.ServerStyle({
+                    fillForeColor: new SuperMap.ServerColor(179, 209, 193),
+                    fillOpaqueRate: 60,
+                    lineWidth: 0.1
+                }),
+                labelBackShape: "RECT"
+            })
+        });
+        var themeParameters = new SuperMap.ThemeParameters({
+            themes: [themeLabel],
+            datasetNames: ["Capitals"],
+            dataSourceNames: ["World"]
+        });
+
+        new ol.supermap.ThemeService(url).getThemeInfo(themeParameters, function (serviceResult) {
+            var result = serviceResult.result;
+            if (result && result.newResourceID) {
+                themeLayer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest({
+                        url: url,
+                        noWrap: true,
+                        cacheEnabled: false,
+                        transparent: true,
+                        layersID: result.newResourceID,
+                        transparent: true
+                    })
+                });
+                map.addLayer(themeLayer);
+            }
+        });
+    }
+
+</script>
+</body>
+</html>

+ 99 - 0
public/supermap/examples/openlayers/03_themeRange.html

@@ -0,0 +1,99 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_themeRange"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, themeLayer, options
+    url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [12406035, 4304933],
+                zoom: 4,
+                projection: "EPSG:3857",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        createTheme();
+    });
+
+    function createTheme() {
+        var themeRangeItem1, themeRangeItem2,
+            themeRangeItem3, themeRange;
+        themeRangeItem1 = new SuperMap.ThemeRangeItem({
+            start: 0,
+            end: 500000000000,
+            style: new SuperMap.ServerStyle({
+                fillForeColor: new SuperMap.ServerColor(211, 255, 250),
+                lineColor: new SuperMap.ServerColor(179, 209, 193),
+                lineWidth: 0.1
+            })
+        });
+        themeRangeItem2 = new SuperMap.ThemeRangeItem({
+            start: 500000000000,
+            end: 1000000000000,
+            style: new SuperMap.ServerStyle({
+                fillForeColor: new SuperMap.ServerColor(178, 218, 199),
+                lineColor: new SuperMap.ServerColor(179, 209, 193),
+                lineWidth: 0.1
+            })
+        });
+        themeRangeItem3 = new SuperMap.ThemeRangeItem({
+            start: 1000000000000,
+            end: 3000000000000,
+            style: new SuperMap.ServerStyle({
+                fillForeColor: new SuperMap.ServerColor(58, 178, 166),
+                lineColor: new SuperMap.ServerColor(179, 209, 193),
+                lineWidth: 0.1
+            })
+        });
+        themeRange = new SuperMap.ThemeRange({
+            rangeExpression: "SMAREA",
+            rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+            items: [themeRangeItem1, themeRangeItem2, themeRangeItem3]
+        });
+        var themeParameters = new SuperMap.ThemeParameters({
+            datasetNames: ["China_Province_pg"],
+            dataSourceNames: ["China"],
+            joinItems: null,
+            themes: [themeRange]
+        });
+
+        new ol.supermap.ThemeService(url).getThemeInfo(themeParameters, function (serviceResult) {
+            var result = serviceResult.result;
+            if (result && result.newResourceID) {
+                themeLayer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest({
+                        url: url,
+                        noWrap: true,
+                        cacheEnabled: false,
+                        transparent: true,
+                        layersID: result.newResourceID,
+                        transparent: true
+                    })
+                });
+                map.addLayer(themeLayer);
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 232 - 0
public/supermap/examples/openlayers/03_themeUnique.html

@@ -0,0 +1,232 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_themeUnique"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, themeLayer, options,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [12406035, 4304933],
+                zoom: 4,
+                projection: "EPSG:3857",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        createTheme();
+    });
+
+    function createTheme() {
+        var style1, style2, style3, style4, style5, style6;
+        style1 = new SuperMap.ServerStyle({
+            fillForeColor: new SuperMap.ServerColor(248, 203, 249),
+            lineColor: new SuperMap.ServerColor(255, 255, 255),
+            lineWidth: 0.1
+        });
+        style2 = new SuperMap.ServerStyle({
+            fillForeColor: new SuperMap.ServerColor(196, 255, 189),
+            lineColor: new SuperMap.ServerColor(255, 255, 255),
+            lineWidth: 0.1
+        });
+        style3 = new SuperMap.ServerStyle({
+            fillForeColor: new SuperMap.ServerColor(255, 173, 173),
+            lineColor: new SuperMap.ServerColor(255, 255, 255),
+            lineWidth: 0.1
+        });
+        style4 = new SuperMap.ServerStyle({
+            fillForeColor: new SuperMap.ServerColor(255, 239, 168),
+            lineColor: new SuperMap.ServerColor(255, 255, 255),
+            lineWidth: 0.1
+        });
+        style5 = new SuperMap.ServerStyle({
+            fillForeColor: new SuperMap.ServerColor(173, 209, 255),
+            lineColor: new SuperMap.ServerColor(255, 255, 255),
+            lineWidth: 0.1
+        });
+        style6 = new SuperMap.ServerStyle({
+            fillForeColor: new SuperMap.ServerColor(132, 164, 232),
+            lineColor: new SuperMap.ServerColor(255, 255, 255),
+            lineWidth: 0.1
+        });
+
+        var themeUniqueIteme1 = new SuperMap.ThemeUniqueItem({
+                unique: "黑龙江省",
+                style: style1
+            }),
+            themeUniqueIteme2 = new SuperMap.ThemeUniqueItem({
+                unique: "湖北省",
+                style: style2
+            }),
+            themeUniqueIteme3 = new SuperMap.ThemeUniqueItem({
+                unique: "吉林省",
+                style: style3
+            }),
+            themeUniqueIteme4 = new SuperMap.ThemeUniqueItem({
+                unique: "内蒙古自治区",
+                style: style4
+            }),
+            themeUniqueIteme5 = new SuperMap.ThemeUniqueItem({
+                unique: "青海省",
+                style: style5
+            }),
+            themeUniqueIteme6 = new SuperMap.ThemeUniqueItem({
+                unique: "新疆维吾尔自治区",
+                style: style6
+            }),
+            themeUniqueIteme7 = new SuperMap.ThemeUniqueItem({
+                unique: "云南省",
+                style: style1
+            }),
+            themeUniqueIteme8 = new SuperMap.ThemeUniqueItem({
+                unique: "四川省",
+                style: style4
+            }),
+            themeUniqueIteme9 = new SuperMap.ThemeUniqueItem({
+                unique: "贵州省",
+                style: style3
+            }),
+            themeUniqueIteme10 = new SuperMap.ThemeUniqueItem({
+                unique: "甘肃省",
+                style: style3
+            }),
+            themeUniqueIteme11 = new SuperMap.ThemeUniqueItem({
+                unique: "宁夏回族自治区",
+                style: style5
+            }),
+            themeUniqueIteme12 = new SuperMap.ThemeUniqueItem({
+                unique: "重庆市",
+                style: style6
+            }),
+            themeUniqueIteme13 = new SuperMap.ThemeUniqueItem({
+                unique: "山东省",
+                style: style1
+            }),
+            themeUniqueIteme14 = new SuperMap.ThemeUniqueItem({
+                unique: "安徽省",
+                style: style2
+            }),
+            themeUniqueIteme15 = new SuperMap.ThemeUniqueItem({
+                unique: "江西省",
+                style: style3
+            }),
+            themeUniqueIteme16 = new SuperMap.ThemeUniqueItem({
+                unique: "浙江省",
+                style: style4
+            }),
+            themeUniqueIteme17 = new SuperMap.ThemeUniqueItem({
+                unique: "台湾省",
+                style: style2
+            }),
+            themeUniqueIteme18 = new SuperMap.ThemeUniqueItem({
+                unique: "江苏省",
+                style: style6
+            }),
+            themeUniqueIteme19 = new SuperMap.ThemeUniqueItem({
+                unique: "湖南省",
+                style: style5
+            }),
+            themeUniqueIteme20 = new SuperMap.ThemeUniqueItem({
+                unique: "河南省",
+                style: style4
+            }),
+            themeUniqueIteme21 = new SuperMap.ThemeUniqueItem({
+                unique: "河北省",
+                style: style3
+            }),
+            themeUniqueIteme22 = new SuperMap.ThemeUniqueItem({
+                unique: "福建省",
+                style: style5
+            }),
+            themeUniqueIteme23 = new SuperMap.ThemeUniqueItem({
+                unique: "广西壮族自治区",
+                style: style6
+            }),
+            themeUniqueIteme24 = new SuperMap.ThemeUniqueItem({
+                unique: "西藏自治区",
+                style: style2
+            }),
+            themeUniqueIteme25 = new SuperMap.ThemeUniqueItem({
+                unique: "广东省",
+                style: style4
+            }),
+            themeUniqueIteme26 = new SuperMap.ThemeUniqueItem({
+                unique: "山西省",
+                style: style2
+            }),
+            themeUniqueIteme27 = new SuperMap.ThemeUniqueItem({
+                unique: "陕西省",
+                style: style1
+            }),
+            themeUniqueIteme28 = new SuperMap.ThemeUniqueItem({
+                unique: "天津市",
+                style: style5
+            }),
+            themeUniqueIteme29 = new SuperMap.ThemeUniqueItem({
+                unique: "北京市",
+                style: style2
+            }),
+
+            themeUniqueIteme30 = new SuperMap.ThemeUniqueItem({
+                unique: "辽宁省",
+                style: style1
+            });
+
+        var themeUniqueItemes = [
+            themeUniqueIteme1, themeUniqueIteme2, themeUniqueIteme3, themeUniqueIteme4, themeUniqueIteme5,
+            themeUniqueIteme6, themeUniqueIteme7, themeUniqueIteme8, themeUniqueIteme9, themeUniqueIteme10,
+            themeUniqueIteme11, themeUniqueIteme12, themeUniqueIteme13, themeUniqueIteme14, themeUniqueIteme15,
+            themeUniqueIteme16, themeUniqueIteme17, themeUniqueIteme18, themeUniqueIteme19, themeUniqueIteme20,
+            themeUniqueIteme21, themeUniqueIteme22, themeUniqueIteme23, themeUniqueIteme24, themeUniqueIteme25,
+            themeUniqueIteme26, themeUniqueIteme27, themeUniqueIteme28, themeUniqueIteme29, themeUniqueIteme30
+        ];
+
+        var themeUnique = new SuperMap.ThemeUnique({
+            uniqueExpression: "Name",
+            items: themeUniqueItemes,
+            defaultStyle: style1
+        });
+        var themeParameters = new SuperMap.ThemeParameters({
+            datasetNames: ["China_Province_pg"],
+            dataSourceNames: ["China"],
+            themes: [themeUnique]
+        });
+
+        new ol.supermap.ThemeService(url).getThemeInfo(themeParameters, function (serviceResult) {
+            var result = serviceResult.result;
+            if (result && result.newResourceID) {
+                themeLayer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest({
+                        url: url,
+                        noWrap: true,
+                        cacheEnabled: false,
+                        transparent: true,
+                        layersID: result.newResourceID,
+                        transparent: true
+                    })
+                });
+                map.addLayer(themeLayer);
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 104 - 0
public/supermap/examples/openlayers/04_bufferAnalystService.html

@@ -0,0 +1,104 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_bufferAnalystService"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, roadLine,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [5105, -3375],
+                zoom: 6,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj))
+        });
+        map.addLayer(layer);
+
+        roadLine = new ol.geom.LineString([
+            [5305.19551436013, -3376.9669111768926],
+            [5075.3145648369318, -3378.0037556404409],
+            [5006.0235999418364, -3358.8890067038628],
+            [4960.9674060199022, -3349.3316322355736],
+            [4933.319287022352, -3337.3849141502124]
+        ]);
+
+        var vectorSource = new ol.source.Vector({
+            features: [new ol.Feature(roadLine)]
+        });
+        var vectorLayer = new ol.layer.Vector({
+            source: vectorSource,
+            style: new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'blue',
+                    width: 3
+                }),
+                fill: new ol.style.Fill({
+                    color: 'rgba(0, 0, 255, 0.1)'
+                })
+            })
+        });
+        map.addLayer(vectorLayer);
+        bufferAnalystProcess();
+    });
+
+    function bufferAnalystProcess() {
+        var dsBufferAnalystParameters = new SuperMap.DatasetBufferAnalystParameters({
+            dataset: "RoadLine2@Changchun",
+            filterQueryParameter: new SuperMap.FilterParameter({
+                attributeFilter: "NAME='团结路'"
+            }),
+            bufferSetting: new SuperMap.BufferSetting({
+                endType: SuperMap.BufferEndType.ROUND,
+                leftDistance: {value: 10},
+                rightDistance: {value: 10},
+                semicircleLineSegment: 10
+            })
+        });
+        new ol.supermap.SpatialAnalystService(serviceUrl).bufferAnalysis(dsBufferAnalystParameters, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.recordset.features)
+            });
+            var resultLayer = new ol.layer.Vector({
+                source: vectorSource,
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'red',
+                        width: 1
+                    }),
+                    fill: new ol.style.Fill({
+                        color: 'rgba(255, 0, 0, 0.1)'
+                    })
+                })
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 181 - 0
public/supermap/examples/openlayers/04_bufferAnalystService_geometry.html

@@ -0,0 +1,181 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_bufferAnalystServiceGeometry"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [5100, -3861.911472192499],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        geoBufferAnalystProcess();
+    });
+
+    function geoBufferAnalystProcess() {
+        var pointsList = [
+            [2823.940, -4690.000],
+            [3448.940, -4690.301],
+            [3816.561, -3810.125],
+            [3917.383, -3609.158],
+            [3976.983, -3490.291],
+            [4020.004, -4377.027],
+            [4076.265, -4382.939],
+            [4215.049, -4382.333],
+            [4428.156, -4382.285],
+            [4647.579, -4383.017],
+            [4679.707, -4382.898],
+            [4917.462, -4382.635],
+            [5074.019, -4381.833],
+            [5257.042, -4381.031],
+            [5363.785, -4380.717],
+            [5671.717, -4378.794],
+            [5847.521, -4377.970],
+            [5990.637, -4303.528],
+            [6055.343, -4270.072],
+            [6168.913, -4382.389],
+            [6214.183, -4209.927],
+            [6377.789, -4209.142],
+            [6393.692, -4210.142],
+            [6693.989, -4207.450],
+            [6788.392, -4208.450],
+            [6984.304, -4207.210],
+            [7189.183, -4208.296],
+            [7300.505, -4208.296],
+            [7573.056, -4208.803],
+            [7680.977, -4208.804],
+            [7850.593, -4208.393],
+            [8182.656, -4210.533],
+            [8554.893, -4261.485]
+        ];
+        //在所有离散gps信号点添加到地图上
+        for (i = 0; i < pointsList.length; i++) {
+            var point = new ol.Feature({
+                geometry: new ol.geom.Point(pointsList[i])
+            });
+            var pointLayer = new ol.layer.Vector({
+                source: new ol.source.Vector({
+                    features: [point]
+                }),
+                style: new ol.style.Style({
+                    image: new ol.style.Circle({
+                        radius: 4,
+                        fill: new ol.style.Fill({
+                            color: 'black'
+                        })
+                    })
+                })
+            });
+            map.addLayer(pointLayer);
+        }
+        //将由离散gps信号点生成的线路添加到地图上
+        var roadLine = new ol.geom.LineString(pointsList);
+        var roadLineSource = new ol.source.Vector({
+            features: [new ol.Feature(roadLine)]
+        });
+        var roadLineLayer = new ol.layer.Vector({
+            source: roadLineSource,
+            style: new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'red',
+                    width: 3
+                })
+            })
+        });
+        map.addLayer(roadLineLayer);
+        //创建缓冲区分析服务参数
+        geoBufferAnalystParams = new SuperMap.GeometryBufferAnalystParameters({
+            sourceGeometry: roadLine,
+            bufferSetting: new SuperMap.BufferSetting({
+                endType: SuperMap.BufferEndType.ROUND,
+                leftDistance: new SuperMap.BufferDistance({value: 250}),
+                rightDistance: new SuperMap.BufferDistance({value: 250}),
+                semicircleLineSegment: 10
+            })
+        });
+        //向iServer发送请求并返回结果
+        new ol.supermap.SpatialAnalystService(serviceUrl).bufferAnalysis(geoBufferAnalystParams, function (serviceResult) {
+            var bufferSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.resultGeometry)
+            });
+            var resultLayer = new ol.layer.Vector({
+                source: bufferSource,
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'blue',
+                        width: 1
+                    }),
+                    fill: new ol.style.Fill({
+                        color: 'rgba(255, 0, 0, 0.1)'
+                    })
+                })
+            });
+            map.addLayer(resultLayer);
+
+            //将组成缓冲区的边界点提出来,为了构造下面查询服务的geometry
+            var bufferPoints = [];
+            var coordinate = serviceResult.result.resultGeometry.geometry.coordinates[0][0];
+            for (var i = 0; i < coordinate.length; i++) {
+                bufferPoints.push([coordinate[i][0], coordinate[i][1]]);
+            }
+            var geometry = new ol.geom.Polygon([bufferPoints]);
+            queryByGeometryParameters = new SuperMap.QueryByGeometryParameters({
+                queryParams: [new SuperMap.FilterParameter({name: "Company@Changchun.2"})],
+                geometry: geometry,
+                spatialQueryMode: SuperMap.SpatialQueryMode.INTERSECT
+            });
+
+            new ol.supermap.QueryService(baseUrl).queryByGeometry(queryByGeometryParameters, function (serviceResult) {
+                var features = (new ol.format.GeoJSON()).readFeatures(serviceResult.result.recordsets[0].features);
+                var iconStyle = new ol.style.Style({
+                    image: new ol.style.Icon(({
+                        anchor: [0.5, 1],
+                        src: '../img/marker-gold.png'
+                    }))
+                });
+                for (var i = 0; i < features.length; i++) {
+                    features[i].setStyle(iconStyle);
+                }
+                var vectorSource = new ol.source.Vector({
+                    features: features
+                });
+                var resultLayer1 = new ol.layer.Vector({
+                    source: vectorSource
+                });
+                map.addLayer(resultLayer1);
+            });
+        });
+    }
+</script>
+</body>
+</html>

+ 141 - 0
public/supermap/examples/openlayers/04_densityKernelAnalystService.html

@@ -0,0 +1,141 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_densityAnalystService"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, densityAnalystResult,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [5000, -3700],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        densityAnalystProcess();
+    });
+
+    function densityAnalystProcess() {
+        //创建点密度插值分析参数实例
+        var densityAnalystParameters = new SuperMap.DensityKernelAnalystParameters({
+            //指定数据集
+            dataset: "Railway@Changchun",
+            //指定范围
+            bounds: [3800, -3800, 8200, -2200],
+            //指定数据集中用于核密度分析的字段
+            fieldName: "SmLength",
+            searchRadius: 50, //Railway@Changchun的单位是米
+            // 结果数据集名称
+            resultGridName: "KernelDensity_Result",
+            deleteExistResultDataset: true
+        });
+        new ol.supermap.SpatialAnalystService(serviceUrl).densityAnalysis(densityAnalystParameters, function (serviceResult) {
+            densityAnalystResult = serviceResult.result;
+            //用栅格专题图展示分析结果
+            showAnalysisResult_ThemeGridRange();
+        });
+
+        //构造栅格专题图
+        function showAnalysisResult_ThemeGridRange() {
+            var color1 = new SuperMap.ServerColor(255, 212, 170),
+                color2 = new SuperMap.ServerColor(255, 127, 0),
+                color3 = new SuperMap.ServerColor(191, 95, 0),
+                color4 = new SuperMap.ServerColor(255, 0, 0),
+                color5 = new SuperMap.ServerColor(191, 0, 0);
+            var themeGridRangeIteme1 = new SuperMap.ThemeGridRangeItem({
+                    start: 0,
+                    end: 0.05,
+                    color: color1
+                }),
+                themeGridRangeIteme2 = new SuperMap.ThemeGridRangeItem({
+                    start: 0.05,
+                    end: 5,
+                    color: color2
+                }),
+                themeGridRangeIteme3 = new SuperMap.ThemeGridRangeItem({
+                    start: 5,
+                    end: 10,
+                    color: color3
+                }),
+                themeGridRangeIteme4 = new SuperMap.ThemeGridRangeItem({
+                    start: 10,
+                    end: 100,
+                    color: color4
+                }),
+                themeGridRangeIteme5 = new SuperMap.ThemeGridRangeItem({
+                    start: 100,
+                    end: 360,
+                    color: color5
+                });
+            var themeGridRange = new SuperMap.ThemeGridRange({
+                reverseColor: false,
+                rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+                //栅格分段专题图子项数组
+                items: [themeGridRangeIteme1,
+                    themeGridRangeIteme2,
+                    themeGridRangeIteme3,
+                    themeGridRangeIteme4,
+                    themeGridRangeIteme5
+                ]
+            });
+
+            var themeParameters = new SuperMap.ThemeParameters({
+                //制作专题图的数据集
+                datasetNames: [densityAnalystResult.dataset.split('@')[0]],
+                dataSourceNames: ["Changchun"],
+                joinItems: null,
+                themes: [themeGridRange]
+            });
+
+            new ol.supermap.ThemeService(baseUrl).getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            transparent: true,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                            transparent: true
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            });
+        }
+    }
+</script>
+</body>
+</html>

+ 140 - 0
public/supermap/examples/openlayers/04_generateSpatialDataService.html

@@ -0,0 +1,140 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_dynamicSegmentation"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [4503.62, -3861.91],
+                zoom: 1,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        generateSpatialDataAnalystProcess();
+    });
+
+    function generateSpatialDataAnalystProcess() {
+        //配置动态分段Parameters
+        var generateSpatialDataParameters = new SuperMap.GenerateSpatialDataParameters({
+            routeTable: "RouteDT_road@Changchun",
+            routeIDField: "RouteID",
+            eventTable: "LinearEventTabDT@Changchun",
+            eventRouteIDField: "RouteID",
+            measureField: "",
+            measureStartField: "LineMeasureFrom",
+            measureEndField: "LineMeasureTo",
+            measureOffsetField: "",
+            errorInfoField: "",
+            dataReturnOption: new SuperMap.DataReturnOption({
+                expectCount: 1000,
+                dataset: "generateSpatialData@Changchun",
+                deleteExistResultDataset: true,
+                dataReturnMode: SuperMap.DataReturnMode.DATASET_ONLY
+            })
+        });
+        new ol.supermap.SpatialAnalystService(serviceUrl).generateSpatialData(generateSpatialDataParameters, function (serviceResult) {
+            var a = serviceResult.result;
+            //用专题图展示分析结果
+            showAnalysisResult_ThemeGridUnique();
+        });
+
+        //构造专题图
+        function showAnalysisResult_ThemeGridUnique() {
+            //配置专题样式
+            var style1, style2, style3;
+            style1 = new SuperMap.ServerStyle({
+                fillForeColor: new SuperMap.ServerColor(242, 48, 48),
+                lineColor: new SuperMap.ServerColor(242, 48, 48),
+                lineWidth: 1
+            });
+            style2 = new SuperMap.ServerStyle({
+                fillForeColor: new SuperMap.ServerColor(255, 159, 25),
+                lineColor: new SuperMap.ServerColor(255, 159, 25),
+                lineWidth: 1
+            });
+            style3 = new SuperMap.ServerStyle({
+                fillForeColor: new SuperMap.ServerColor(91, 195, 69),
+                lineColor: new SuperMap.ServerColor(91, 195, 69),
+                lineWidth: 1
+            });
+            //配置专题项
+            var themeUniqueIteme1, themeUniqueIteme2, themeUniqueIteme3;
+            themeUniqueIteme1 = new SuperMap.ThemeUniqueItem({
+                unique: "拥挤",
+                style: style1
+            });
+            themeUniqueIteme2 = new SuperMap.ThemeUniqueItem({
+                unique: "缓行",
+                style: style2
+            });
+            themeUniqueIteme3 = new SuperMap.ThemeUniqueItem({
+                unique: "畅通",
+                style: style3
+            });
+            var themeUnique = new SuperMap.ThemeUnique({
+                uniqueExpression: "TrafficStatus",
+                defaultStyle: new SuperMap.ServerStyle({
+                    fillForeColor: new SuperMap.ServerColor(48, 89, 14),
+                    lineColor: new SuperMap.ServerColor(48, 89, 14)
+                }),
+                items: [themeUniqueIteme1, themeUniqueIteme2, themeUniqueIteme3]
+            });
+            var themeParameters = new SuperMap.ThemeParameters({
+                themes: [themeUnique],
+                datasetNames: ["generateSpatialData"],
+                dataSourceNames: ["Changchun"]
+            });
+            new ol.supermap.ThemeService(baseUrl).getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            transparent: true,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                            transparent: true
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            })
+        }
+    }
+</script>
+</body>
+</html>

+ 292 - 0
public/supermap/examples/openlayers/04_geometryBatchAnalystService.html

@@ -0,0 +1,292 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_geometryBatchAnalystService"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 120px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+    </style>
+</head>
+<body style="margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+    var map,
+        baseUrl = host + "/iserver/services/map-jingjin/rest/maps/京津地区地图",
+        serviceUrl = host + "/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [104.07, 30.54, 119.51, 42.31],
+        container = document.getElementById('popup'),
+        content = document.getElementById('popup-content'),
+        overlay = new ol.Overlay(({
+            element: container,
+            autoPan: true,
+            autoPanAnimation: {
+                duration: 250
+            },
+            offset: [0, -5]
+        }));
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [116.85, 39.79],
+                zoom: 9,
+                projection: "EPSG:4326",
+                multiWorld: true
+            }),
+            overlays: [overlay]
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        batchAnalystFromGeometry();
+    });
+
+    function batchAnalystFromGeometry() {
+        //缓冲区分析数据:
+        var bufferLine = {
+            "type": "Feature",
+            "geometry": {
+                "type": "LineString",
+                "coordinates": [[117, 40.50], [118, 40]]
+            }
+        };
+        var bufferPoint = {
+            "type": "Feature",
+            "geometry": {
+                "type": "Point",
+                "coordinates": [117, 40]
+            }
+        };
+        //叠加分析数据:
+        var sourceGeometry = {
+            "type": "Feature",
+            "geometry": {
+                "type": "Polygon",
+                "coordinates": [[[116, 39.75],
+                    [116, 39.15],
+                    [117, 39.15],
+                    [117, 39.85],
+                    [116, 39.85]]]
+            }
+        };
+        var operateGeometry = {
+            "type": "Feature",
+            "geometry": {
+                "type": "Polygon",
+                "coordinates": [[[116.25, 40.5],
+                    [116.25, 38.5],
+                    [116.75, 38.5],
+                    [116.75, 40.5],
+                    [116.25, 40.5]]]
+            }
+        };
+
+        //数据加载到地图:
+        var geojsonFeature = {
+            "type": "FeatureCollection",
+            "features": [bufferLine, bufferPoint, sourceGeometry, operateGeometry]
+        };
+        var styles = {
+            'Point': new ol.style.Style({
+                image: new ol.style.Circle({
+                    radius: 4,
+                    fill: new ol.style.Fill({
+                        color: 'rgba(0,0,255)'
+                    }),
+                    stroke: new ol.style.Stroke({color: 'blue', width: 1.5})
+                })
+            }),
+            'Polygon': new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'blue',
+                    width: 1
+                }),
+                fill: new ol.style.Fill({
+                    color: 'rgba(174, 238, 238, 0.3)'
+                })
+            }),
+            'LineString': new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'blue',
+                    width: 1.5
+                })
+            })
+        };
+
+        var styleFunction = function (feature) {
+            return styles[feature.getGeometry().getType()];
+        };
+        var overlaySource = new ol.source.Vector({
+            features: (new ol.format.GeoJSON()).readFeatures(geojsonFeature)
+        });
+
+        var overlayLayer = new ol.layer.Vector({
+            source: overlaySource,
+            style: styleFunction
+        });
+        map.addLayer(overlayLayer);
+
+        //缓冲区分析参数
+        var geoBufferAnalystParams = {
+            analystName: "buffer",
+            param: new SuperMap.GeometryBufferAnalystParameters({
+                sourceGeometry: bufferLine,
+                sourceGeometrySRID: 4326,
+                bufferSetting: new SuperMap.BufferSetting({
+                    endType: SuperMap.BufferEndType.ROUND,
+                    leftDistance: new SuperMap.BufferDistance({value: 5000}),
+                    rightDistance: new SuperMap.BufferDistance({value: 5000}),
+                    semicircleLineSegment: 10
+                })
+
+            })
+        };
+        var geoBufferAnalystParams_Point = {
+            analystName: "buffer",
+            param: new SuperMap.GeometryBufferAnalystParameters({
+                sourceGeometry: bufferPoint,
+                sourceGeometrySRID: 4326,
+                bufferSetting: new SuperMap.BufferSetting({
+                    endType: SuperMap.BufferEndType.ROUND,
+                    leftDistance: new SuperMap.BufferDistance({value: 5000}),
+                    rightDistance: new SuperMap.BufferDistance({value: 5000}),
+                    radiusUnit: "METER",
+                    semicircleLineSegment: 10
+                })
+
+            })
+        };
+
+        //叠加分析参数
+        var OverlayBatchAnalystParameters = {
+            analystName: "overlay",
+            param: new SuperMap.GeometryOverlayAnalystParameters({
+                sourceGeometry: sourceGeometry,
+                operateGeometry: operateGeometry,
+                operation: SuperMap.OverlayOperationType.CLIP
+            })
+        };
+
+        //批量分析参数
+        var paramter = [geoBufferAnalystParams, OverlayBatchAnalystParameters, geoBufferAnalystParams_Point];
+
+        //批量分析
+        new ol.supermap.SpatialAnalystService(serviceUrl).geometrybatchAnalysis(paramter, function (serviceResult) {
+            //结果展示
+            serviceResult.result[0].resultGeometry.properties.analystType = "buffer_line";
+            serviceResult.result[1].resultGeometry.properties.analystType = "overlay";
+            serviceResult.result[2].resultGeometry.properties.analystType = "buffer_point";
+            var results = [];
+            serviceResult.result.map(function (itme) {
+                results.push(itme.resultGeometry)
+            });
+            var resultSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures({
+                    "type": "FeatureCollection",
+                    "features": results
+                })
+            });
+            var resultLayer = new ol.layer.Vector({
+                source: resultSource,
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'red',
+                        width: 1.5
+                    }),
+                    fill: new ol.style.Fill({
+                        color: 'rgba(255, 0, 0, 0.3)'
+                    })
+                })
+            });
+            map.addLayer(resultLayer);
+            map.on('pointermove', function (e) {
+                var coordinates = e.coordinate;
+                var isShowPop = false;
+                map.forEachFeatureAtPixel(e.pixel, function (feature) {
+                    if (feature.getProperties().analystType === "buffer_line") {
+                        map.getTargetElement().style.cursor = 'pointer';
+                        var contentHTML = resources.text_bufferAnalystResult;
+                        content.innerHTML = contentHTML;
+                        overlay.setPosition([117.5, 40.25]);
+                        map.addOverlay(overlay);
+                        isShowPop = true;
+                    } else if (feature.getProperties().analystType === "buffer_point") {
+                        map.getTargetElement().style.cursor = 'pointer';
+                        var contentHTML = resources.text_bufferAnalystResult;
+                        content.innerHTML = contentHTML;
+                        overlay.setPosition([117, 40]);
+                        map.addOverlay(overlay);
+                        isShowPop = true;
+                    } else if (feature.getProperties().analystType === "overlay") {
+                        map.getTargetElement().style.cursor = 'pointer';
+                        var contentHTML = resources.text_overlayAnalystResult;
+                        content.innerHTML = contentHTML;
+                        overlay.setPosition([116.5, 39.5]);
+                        map.addOverlay(overlay);
+                        isShowPop = true;
+                    }
+                }, {
+                    hitTolerance: 10
+                });
+                if (isShowPop) {
+                    return;
+                } else {
+                    map.getTargetElement().style.cursor = '';
+                    overlay.setPosition(undefined);
+                    map.removeOverlay(overlay);
+                }
+            });
+        });
+    }
+</script>
+</body>
+</html>

+ 214 - 0
public/supermap/examples/openlayers/04_geometryOverlayBatchAnalystService.html

@@ -0,0 +1,214 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_geometryOverlayBatchAnalystService"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 130px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+    </style>
+</head>
+<body style="margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+    var map,
+        baseUrl = host + "/iserver/services/map-jingjin/rest/maps/京津地区地图",
+        serviceUrl = host + "/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [104.07, 30.54, 119.51, 42.31],
+        container = document.getElementById('popup'),
+        content = document.getElementById('popup-content'),
+        overlay = new ol.Overlay(({
+            element: container,
+            autoPan: true,
+            autoPanAnimation: {
+                duration: 250
+            },
+            offset: [0, -5]
+        }));
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [116.85, 39.79],
+                zoom: 9,
+                projection: "EPSG:4326",
+                multiWorld: true
+            }),
+            overlays: [overlay]
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        overlayerBatchAnalystFromGeometry();
+    });
+
+    function overlayerBatchAnalystFromGeometry() {
+        //叠加分析数据:
+        var sourceGeometry1 = {
+            "type": "Feature",
+            "geometry": {
+                "type": "Polygon",
+                "coordinates": [[[116.25, 40.25],
+                    [116.25, 39.75],
+                    [117.25, 39.75],
+                    [117.25, 40.25],
+                    [116.25, 40.25]]]
+            }
+        };
+        var sourceGeometry2 = {
+            "type": "Feature",
+            "geometry": {
+                "type": "Polygon",
+                "coordinates": [[[116.75, 40.25],
+                    [116.75, 39.75],
+                    [117.75, 39.75],
+                    [117.75, 40.25],
+                    [116.75, 40.25]]]
+            }
+        };
+        var operateGeometry1 = {
+            "type": "Feature",
+            "geometry": {
+                "type": "Polygon",
+                "coordinates": [[[116.75, 39.75],
+                    [117.25, 39.75],
+                    [117.25, 40.75],
+                    [116.75, 40.75],
+                    [116.75, 39.75]]]
+            }
+        };
+
+        var operateGeometry2 = {
+            "type": "Feature",
+            "geometry": {
+                "type": "Polygon",
+                "coordinates": [[[116.75, 40.25],
+                    [116.75, 39.25],
+                    [117.25, 39.25],
+                    [117.25, 40.25],
+                    [116.75, 40.25]]]
+            }
+        };
+
+        //数据加载到地图:
+        var geojsonFeature = {
+            "type": "FeatureCollection",
+            "features": [sourceGeometry1, sourceGeometry2, operateGeometry1, operateGeometry2]
+        };
+        var overlaySource = new ol.source.Vector({
+            features: (new ol.format.GeoJSON()).readFeatures(geojsonFeature)
+        });
+        var overlayLayer = new ol.layer.Vector({
+            source: overlaySource,
+            style: new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'blue',
+                    width: 1
+                }),
+                fill: new ol.style.Fill({
+                    color: 'rgba(174, 238, 238, 0.3)'
+                })
+            })
+        });
+        map.addLayer(overlayLayer);
+
+        var OverlayBatchAnalystParameters = new SuperMap.GeometryOverlayAnalystParameters({
+            sourceGeometries: [sourceGeometry1, sourceGeometry2],
+            operateGeometries: [operateGeometry1, operateGeometry2],
+            operation: SuperMap.OverlayOperationType.INTERSECT
+        });
+
+        new ol.supermap.SpatialAnalystService(serviceUrl).overlayAnalysis(OverlayBatchAnalystParameters, function (serviceResult) {
+            serviceResult.result[0].resultGeometry.properties.isResultLayer = true;
+            var resultSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result[0].resultGeometry)
+            });
+            var resultLayer = new ol.layer.Vector({
+                source: resultSource,
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'red',
+                        width: 1.5
+                    }),
+                    fill: new ol.style.Fill({
+                        color: 'rgba(255, 0, 0, 0.3)'
+                    })
+                })
+            });
+            map.addLayer(resultLayer);
+            map.on('pointermove', function (e) {
+                var coordinates = e.coordinate;
+                var isShowPop = false;
+                map.forEachFeatureAtPixel(e.pixel, function (feature) {
+                    if (feature.getProperties().isResultLayer) {
+                        map.getTargetElement().style.cursor = 'pointer';
+                        var contentHTML = resources.text_overlayBatchAnalystResult;
+                        content.innerHTML = contentHTML;
+                        overlay.setPosition([117,40]);
+                        map.addOverlay(overlay);
+                        isShowPop = true;
+                    }
+                }, {
+                    hitTolerance: 10
+                });
+                if (isShowPop) {
+                    return;
+                } else {
+                    map.getTargetElement().style.cursor = '';
+                    overlay.setPosition(undefined);
+                    map.removeOverlay(overlay);
+                }
+            });
+        });
+    }
+</script>
+</body>
+</html>

+ 242 - 0
public/supermap/examples/openlayers/04_interpolationAnalystService_Density.html

@@ -0,0 +1,242 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_interpolationAnalystByDen"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, interpolationAnalystResult,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-temperature/rest/maps/全国温度变化图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [-2640403.63, 1873792.1, 3247669.39, 5921501.4];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [531762, 3580330],
+                zoom: 1,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        options.layersID = "[0,1,2]";
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        interpolationAnalystProcess();
+    });
+
+    function interpolationAnalystProcess() {
+        //创建点密度插值分析参数实例
+        var interpolationAnalystParameters = new SuperMap.InterpolationDensityAnalystParameters({
+            //用于做插值分析的数据源中数据集的名称
+            dataset: "SamplesP@Interpolation",
+            //插值分析结果数据集的名称
+            outputDatasetName: "Density_Result",
+            //插值分析结果数据源的名称
+            outputDatasourceName: "Interpolation",
+            //结果栅格数据集存储的像素格式
+            pixelFormat: SuperMap.PixelFormat.DOUBLE,
+            //插值结果栅格数据集的分辨率
+            resolution: 9000,
+            // 存储用于进行插值分析的字段名称
+            zValueFieldName: "AVG_TMP",
+            //结果栅格数据集的范围(生效)
+            bounds: [-2640403.63, 1873792.1, 3247669.39, 5921501.4]
+        });
+        new ol.supermap.SpatialAnalystService(serviceUrl).interpolationAnalysis(interpolationAnalystParameters, function (serviceResult) {
+            interpolationAnalystResult = serviceResult.result;
+            //用栅格专题图展示分析结果
+            showAnalysisResult_ThemeGridRange();
+        });
+
+        //构造栅格专题图
+        function showAnalysisResult_ThemeGridRange() {
+            var color1 = new SuperMap.ServerColor(170, 240, 233),
+                color2 = new SuperMap.ServerColor(176, 244, 188),
+                color3 = new SuperMap.ServerColor(218, 251, 178),
+                color4 = new SuperMap.ServerColor(220, 236, 145),
+                color5 = new SuperMap.ServerColor(96, 198, 66),
+                color6 = new SuperMap.ServerColor(20, 142, 53),
+                color7 = new SuperMap.ServerColor(85, 144, 55),
+                color8 = new SuperMap.ServerColor(171, 168, 38),
+                color9 = new SuperMap.ServerColor(235, 165, 9),
+                color10 = new SuperMap.ServerColor(203, 89, 2),
+                color11 = new SuperMap.ServerColor(157, 25, 1),
+                color12 = new SuperMap.ServerColor(118, 15, 3),
+                color13 = new SuperMap.ServerColor(112, 32, 7),
+                color14 = new SuperMap.ServerColor(106, 45, 12),
+                color15 = new SuperMap.ServerColor(129, 80, 50),
+                color16 = new SuperMap.ServerColor(160, 154, 146),
+                color17 = new SuperMap.ServerColor(107, 47, 14),
+                color18 = new SuperMap.ServerColor(125, 75, 44),
+                color19 = new SuperMap.ServerColor(146, 110, 88),
+                color20 = new SuperMap.ServerColor(166, 153, 146);
+
+            var themeGridRangeItem1 = new SuperMap.ThemeGridRangeItem({
+                    start: -5,
+                    end: -3.4,
+                    color: color1
+                }),
+                themeGridRangeItem2 = new SuperMap.ThemeGridRangeItem({
+                    start: -3.4,
+                    end: -1.8,
+                    color: color2
+                }),
+                themeGridRangeItem3 = new SuperMap.ThemeGridRangeItem({
+                    start: -1.8,
+                    end: -0.2,
+                    color: color3
+                }),
+                themeGridRangeItem4 = new SuperMap.ThemeGridRangeItem({
+                    start: -0.2,
+                    end: 1.4,
+                    color: color4
+                }),
+                themeGridRangeItem5 = new SuperMap.ThemeGridRangeItem({
+                    start: 1.4,
+                    end: 3,
+                    color: color5
+                }),
+                themeGridRangeItem6 = new SuperMap.ThemeGridRangeItem({
+                    start: 3,
+                    end: 4.6,
+                    color: color6
+                }),
+                themeGridRangeItem7 = new SuperMap.ThemeGridRangeItem({
+                    start: 4.6,
+                    end: 6.2,
+                    color: color7
+                }),
+                themeGridRangeItem8 = new SuperMap.ThemeGridRangeItem({
+                    start: 6.2,
+                    end: 7.8,
+                    color: color8
+                }),
+                themeGridRangeItem9 = new SuperMap.ThemeGridRangeItem({
+                    start: 7.8,
+                    end: 9.4,
+                    color: color9
+                }),
+                themeGridRangeItem10 = new SuperMap.ThemeGridRangeItem({
+                    start: 9.4,
+                    end: 11,
+                    color: color10
+                }),
+                themeGridRangeItem11 = new SuperMap.ThemeGridRangeItem({
+                    start: 11,
+                    end: 12.6,
+                    color: color11
+                }),
+                themeGridRangeItem12 = new SuperMap.ThemeGridRangeItem({
+                    start: 12.6,
+                    end: 14.2,
+                    color: color12
+                }),
+                themeGridRangeItem13 = new SuperMap.ThemeGridRangeItem({
+                    start: 14.2,
+                    end: 35.8,
+                    color: color13
+                }),
+                themeGridRangeItem14 = new SuperMap.ThemeGridRangeItem({
+                    start: 35.8,
+                    end: 57.4,
+                    color: color14
+                }),
+                themeGridRangeItem15 = new SuperMap.ThemeGridRangeItem({
+                    start: 57.4,
+                    end: 79,
+                    color: color15
+                }),
+                themeGridRangeItem16 = new SuperMap.ThemeGridRangeItem({
+                    start: 79,
+                    end: 90.6,
+                    color: color16
+                }),
+                themeGridRangeItem17 = new SuperMap.ThemeGridRangeItem({
+                    start: 90.6,
+                    end: 112.2,
+                    color: color17
+                }),
+                themeGridRangeItem18 = new SuperMap.ThemeGridRangeItem({
+                    start: 112.2,
+                    end: 123.8,
+                    color: color18
+                }),
+                themeGridRangeItem19 = new SuperMap.ThemeGridRangeItem({
+                    start: 123.8,
+                    end: 125.4,
+                    color: color19
+                }),
+                themeGridRangeItem20 = new SuperMap.ThemeGridRangeItem({
+                    start: 125.4,
+                    end: 135,
+                    color: color20
+                });
+
+            var themeGridRange = new SuperMap.ThemeGridRange({
+                reverseColor: false,
+                rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+                //栅格分段专题图子项数组
+                items: [themeGridRangeItem1, themeGridRangeItem2,
+                    themeGridRangeItem3, themeGridRangeItem4,
+                    themeGridRangeItem5, themeGridRangeItem6,
+                    themeGridRangeItem7, themeGridRangeItem8,
+                    themeGridRangeItem9, themeGridRangeItem10,
+                    themeGridRangeItem11, themeGridRangeItem12,
+                    themeGridRangeItem13, themeGridRangeItem14,
+                    themeGridRangeItem15, themeGridRangeItem16,
+                    themeGridRangeItem17, themeGridRangeItem18,
+                    themeGridRangeItem19, themeGridRangeItem20
+                ]
+            });
+
+            var themeParameters = new SuperMap.ThemeParameters({
+                //制作专题图的数据集
+                datasetNames: [interpolationAnalystResult.dataset.split('@')[0]],
+                dataSourceNames: ["Interpolation"],
+                joinItems: null,
+                themes: [themeGridRange]
+            });
+
+            new ol.supermap.ThemeService(baseUrl).getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                            transparent: true
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            });
+        }
+    }
+</script>
+</body>
+</html>

+ 248 - 0
public/supermap/examples/openlayers/04_interpolationAnalystService_IDW_dataset.html

@@ -0,0 +1,248 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_interpolationAnalystByIDW"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, interpolationAnalystResult,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-temperature/rest/maps/全国温度变化图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [-2640403.63, 1873792.1, 3247669.39, 5921501.4];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [531762, 3580330],
+                zoom: 1,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        options.layersID = "[0,1,2]";
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        interpolationAnalystProcess();
+    });
+
+    function interpolationAnalystProcess() {
+        //创建反距离加权插值分析参数实例
+        var interpolationAnalystParameters = new SuperMap.InterpolationIDWAnalystParameters({
+            //用于做插值分析的数据源中数据集的名称
+            dataset: "SamplesP@Interpolation",
+            //插值分析结果数据集的名称
+            outputDatasetName: "IDW_result",
+            //插值分析结果数据源的名称
+            outputDatasourceName: "Interpolation",
+            //结果栅格数据集存储的像素格式
+            pixelFormat: SuperMap.PixelFormat.DOUBLE,
+            // 属性过滤条件
+            //            filterQueryParameter: {
+            //                attributeFilter: ""
+            //            },
+            //存储用于进行插值分析的字段名称
+            zValueFieldName: "AVG_TMP",
+            resolution: 7923.84989108,
+            //采取固定点数查找参与运算点的方式
+            searchMode: "KDTREE_FIXED_COUNT",
+            //固定点数查找方式下,参与差值运算的点数默认为12。
+            expectedCount: 12,
+            bounds: [-2640403.63, 1873792.1, 3247669.39, 5921501.4]
+        });
+        new ol.supermap.SpatialAnalystService(serviceUrl).interpolationAnalysis(interpolationAnalystParameters, function (serviceResult) {
+            interpolationAnalystResult = serviceResult.result;
+            //用栅格专题图展示分析结果
+            showAnalysisResult_ThemeGridRange();
+        });
+
+        //构造栅格专题图
+        function showAnalysisResult_ThemeGridRange() {
+            var color1 = new SuperMap.ServerColor(170, 240, 233),
+                color2 = new SuperMap.ServerColor(176, 244, 188),
+                color3 = new SuperMap.ServerColor(218, 251, 178),
+                color4 = new SuperMap.ServerColor(220, 236, 145),
+                color5 = new SuperMap.ServerColor(96, 198, 66),
+                color6 = new SuperMap.ServerColor(20, 142, 53),
+                color7 = new SuperMap.ServerColor(85, 144, 55),
+                color8 = new SuperMap.ServerColor(171, 168, 38),
+                color9 = new SuperMap.ServerColor(235, 165, 9),
+                color10 = new SuperMap.ServerColor(203, 89, 2),
+                color11 = new SuperMap.ServerColor(157, 25, 1),
+                color12 = new SuperMap.ServerColor(118, 15, 3),
+                color13 = new SuperMap.ServerColor(112, 32, 7),
+                color14 = new SuperMap.ServerColor(106, 45, 12),
+                color15 = new SuperMap.ServerColor(129, 80, 50),
+                color16 = new SuperMap.ServerColor(160, 154, 146),
+                color17 = new SuperMap.ServerColor(107, 47, 14),
+                color18 = new SuperMap.ServerColor(125, 75, 44),
+                color19 = new SuperMap.ServerColor(146, 110, 88),
+                color20 = new SuperMap.ServerColor(166, 153, 146);
+
+            var themeGridRangeIteme1 = new SuperMap.ThemeGridRangeItem({
+                    start: -5,
+                    end: -3.4,
+                    color: color1
+                }),
+                themeGridRangeIteme2 = new SuperMap.ThemeGridRangeItem({
+                    start: -3.4,
+                    end: -1.8,
+                    color: color2
+                }),
+                themeGridRangeIteme3 = new SuperMap.ThemeGridRangeItem({
+                    start: -1.8,
+                    end: -0.2,
+                    color: color3
+                }),
+                themeGridRangeIteme4 = new SuperMap.ThemeGridRangeItem({
+                    start: -0.2,
+                    end: 1.4,
+                    color: color4
+                }),
+                themeGridRangeIteme5 = new SuperMap.ThemeGridRangeItem({
+                    start: 1.4,
+                    end: 3,
+                    color: color5
+                }),
+                themeGridRangeIteme6 = new SuperMap.ThemeGridRangeItem({
+                    start: 3,
+                    end: 4.6,
+                    color: color6
+                }),
+                themeGridRangeIteme7 = new SuperMap.ThemeGridRangeItem({
+                    start: 4.6,
+                    end: 6.2,
+                    color: color7
+                }),
+                themeGridRangeIteme8 = new SuperMap.ThemeGridRangeItem({
+                    start: 6.2,
+                    end: 7.8,
+                    color: color8
+                }),
+                themeGridRangeIteme9 = new SuperMap.ThemeGridRangeItem({
+                    start: 7.8,
+                    end: 9.4,
+                    color: color9
+                }),
+                themeGridRangeIteme10 = new SuperMap.ThemeGridRangeItem({
+                    start: 9.4,
+                    end: 11,
+                    color: color10
+                }),
+                themeGridRangeIteme11 = new SuperMap.ThemeGridRangeItem({
+                    start: 11,
+                    end: 12.6,
+                    color: color11
+                }),
+                themeGridRangeIteme12 = new SuperMap.ThemeGridRangeItem({
+                    start: 12.6,
+                    end: 14.2,
+                    color: color12
+                }),
+                themeGridRangeIteme13 = new SuperMap.ThemeGridRangeItem({
+                    start: 14.2,
+                    end: 15.8,
+                    color: color13
+                }),
+                themeGridRangeIteme14 = new SuperMap.ThemeGridRangeItem({
+                    start: 15.8,
+                    end: 17.4,
+                    color: color14
+                }),
+                themeGridRangeIteme15 = new SuperMap.ThemeGridRangeItem({
+                    start: 17.4,
+                    end: 19,
+                    color: color15
+                }),
+                themeGridRangeIteme16 = new SuperMap.ThemeGridRangeItem({
+                    start: 19,
+                    end: 20.6,
+                    color: color16
+                }),
+                themeGridRangeIteme17 = new SuperMap.ThemeGridRangeItem({
+                    start: 20.6,
+                    end: 22.2,
+                    color: color17
+                }),
+                themeGridRangeIteme18 = new SuperMap.ThemeGridRangeItem({
+                    start: 22.2,
+                    end: 23.8,
+                    color: color18
+                }),
+                themeGridRangeIteme19 = new SuperMap.ThemeGridRangeItem({
+                    start: 23.8,
+                    end: 25.4,
+                    color: color19
+                }),
+                themeGridRangeIteme20 = new SuperMap.ThemeGridRangeItem({
+                    start: 25.4,
+                    end: 27,
+                    color: color20
+                });
+
+            var themeGridRange = new SuperMap.ThemeGridRange({
+                reverseColor: false,
+                rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+                //栅格分段专题图子项数组
+                items: [themeGridRangeIteme1, themeGridRangeIteme2,
+                    themeGridRangeIteme3, themeGridRangeIteme4,
+                    themeGridRangeIteme5, themeGridRangeIteme6,
+                    themeGridRangeIteme7, themeGridRangeIteme8,
+                    themeGridRangeIteme9, themeGridRangeIteme10,
+                    themeGridRangeIteme11, themeGridRangeIteme12,
+                    themeGridRangeIteme13, themeGridRangeIteme14,
+                    themeGridRangeIteme15, themeGridRangeIteme16,
+                    themeGridRangeIteme17, themeGridRangeIteme18,
+                    themeGridRangeIteme19, themeGridRangeIteme20
+                ]
+            });
+
+            var themeParameters = new SuperMap.ThemeParameters({
+                //制作专题图的数据集
+                datasetNames: [interpolationAnalystResult.dataset.split('@')[0]],
+                dataSourceNames: ["Interpolation"],
+                joinItems: null,
+                themes: [themeGridRange]
+            });
+
+            new ol.supermap.ThemeService(baseUrl).getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                            transparent: true
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            });
+        }
+    }
+</script>
+</body>
+</html>

+ 283 - 0
public/supermap/examples/openlayers/04_interpolationAnalystService_IDW_geometry.html

@@ -0,0 +1,283 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_interpolationAnalystByGeo"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, interpolationAnalystService, interpolationAnalystParameters, interpolationAnalystResult, points,
+        themeService, themeGridRange, themeParameters,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-temperature/rest/maps/全国温度变化图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var mapService = new ol.supermap.MapService(baseUrl);
+    var extent = [-2640403.63, 1873792.1, 3247669.39, 5921501.4];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    mapService.getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [531762, 3580330],
+                zoom: 1,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        options.layersID = "[0,1,2]";
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        interpolationAnalystProcess();
+    });
+
+    function interpolationAnalystProcess() {
+        //通过SQL查询的方法获取用于插值分析的geometry
+        var queryBySQLParams, queryBySQLService;
+        queryBySQLService = new ol.supermap.QueryService(baseUrl);
+        queryBySQLParams = new SuperMap.QueryBySQLParameters({
+            queryParams: [
+                new SuperMap.FilterParameter({
+                    name: "SamplesP@Interpolation",
+                    attributeFilter: "SMID>0"
+                })
+            ]
+        });
+        queryBySQLService.queryBySQL(queryBySQLParams, function (serviceResult) {
+            var result = serviceResult.result;
+            var z;
+            var zMin = parseFloat(-5), zMax = parseFloat(28);
+            points = [];
+            if (result) {
+                for (var i = 0; i < result.recordsets[0].features.features.length; i++) {
+                    gp = result.recordsets[0].features.features[i].geometry;
+                    var point = new ol.geom.Point([gp.coordinates[0], gp.coordinates[1]]);
+                    //每个插值点在插值过程中的权重值
+                    z = Math.random() * (zMax - zMin) + zMin;
+                    point.tag = z;
+                    points.push(point);
+                }
+            }
+
+            //创建离散点插值分析服务实例
+            interpolationAnalystService = new ol.supermap.SpatialAnalystService(serviceUrl);
+            //创建离散点插值分析参数实例
+            interpolationAnalystParameters = new SuperMap.InterpolationIDWAnalystParameters({
+                // 插值分析类型,geometry类型表示对离散点插值分析,默认为“dataset”
+                InterpolationAnalystType: "geometry",
+                // 插值分析结果数据集的名称
+                outputDatasetName: "IDWcretePoints_result",
+                // 插值分析结果数据源的名称
+                outputDatasourceName: "Interpolation",
+                // 结果栅格数据集存储的像素格式
+                pixelFormat: SuperMap.PixelFormat.BIT16,
+                // 用于做插值分析的离散点集合
+                inputPoints: points,
+                // 属性过滤条件
+                //            filterQueryParameter: {
+                //                attributeFilter: ""
+                //            },
+                // 采取定长查找参与运算点的方式
+                searchMode: "KDTREE_FIXED_RADIUS",
+                // 查找半径,与点数据单位相同
+                searchRadius: 200,
+                resolution: 9000,
+                bounds: [-2640403.63, 1873792.1, 3247669.39, 5921501.4]
+            });
+            interpolationAnalystService.interpolationAnalysis(interpolationAnalystParameters, function (serviceResult) {
+                interpolationAnalystResult = serviceResult.result;
+                //用栅格专题图展示分析结果
+                showAnalysisResult_ThemeGridRange();
+            });
+        });
+
+
+        //构造栅格专题图
+        function showAnalysisResult_ThemeGridRange() {
+            //创建专题图服务实例
+            themeService = new ol.supermap.ThemeService(baseUrl);
+            var color1 = new SuperMap.ServerColor(170, 240, 233),
+                color2 = new SuperMap.ServerColor(176, 244, 188),
+                color3 = new SuperMap.ServerColor(218, 251, 178),
+                color4 = new SuperMap.ServerColor(220, 236, 145),
+                color5 = new SuperMap.ServerColor(96, 198, 66),
+                color6 = new SuperMap.ServerColor(20, 142, 53),
+                color7 = new SuperMap.ServerColor(85, 144, 55),
+                color8 = new SuperMap.ServerColor(171, 168, 38),
+                color9 = new SuperMap.ServerColor(235, 165, 9),
+                color10 = new SuperMap.ServerColor(203, 89, 2),
+                color11 = new SuperMap.ServerColor(157, 25, 1),
+                color12 = new SuperMap.ServerColor(118, 15, 3),
+                color13 = new SuperMap.ServerColor(112, 32, 7),
+                color14 = new SuperMap.ServerColor(106, 45, 12),
+                color15 = new SuperMap.ServerColor(129, 80, 50),
+                color16 = new SuperMap.ServerColor(160, 154, 146),
+                color17 = new SuperMap.ServerColor(107, 47, 14),
+                color18 = new SuperMap.ServerColor(125, 75, 44),
+                color19 = new SuperMap.ServerColor(146, 110, 88),
+                color20 = new SuperMap.ServerColor(166, 153, 146);
+
+            var themeGridRangeItem1 = new SuperMap.ThemeGridRangeItem({
+                    start: -5,
+                    end: -3.4,
+                    color: color1
+                }),
+                themeGridRangeItem2 = new SuperMap.ThemeGridRangeItem({
+                    start: -3.4,
+                    end: -1.8,
+                    color: color2
+                }),
+                themeGridRangeItem3 = new SuperMap.ThemeGridRangeItem({
+                    start: -1.8,
+                    end: -0.2,
+                    color: color3
+                }),
+                themeGridRangeItem4 = new SuperMap.ThemeGridRangeItem({
+                    start: -0.2,
+                    end: 1.4,
+                    color: color4
+                }),
+                themeGridRangeItem5 = new SuperMap.ThemeGridRangeItem({
+                    start: 1.4,
+                    end: 3,
+                    color: color5
+                }),
+                themeGridRangeItem6 = new SuperMap.ThemeGridRangeItem({
+                    start: 3,
+                    end: 4.6,
+                    color: color6
+                }),
+                themeGridRangeItem7 = new SuperMap.ThemeGridRangeItem({
+                    start: 4.6,
+                    end: 6.2,
+                    color: color7
+                }),
+                themeGridRangeItem8 = new SuperMap.ThemeGridRangeItem({
+                    start: 6.2,
+                    end: 7.8,
+                    color: color8
+                }),
+                themeGridRangeItem9 = new SuperMap.ThemeGridRangeItem({
+                    start: 7.8,
+                    end: 9.4,
+                    color: color9
+                }),
+                themeGridRangeItem10 = new SuperMap.ThemeGridRangeItem({
+                    start: 9.4,
+                    end: 11,
+                    color: color10
+                }),
+                themeGridRangeItem11 = new SuperMap.ThemeGridRangeItem({
+                    start: 11,
+                    end: 12.6,
+                    color: color11
+                }),
+                themeGridRangeItem12 = new SuperMap.ThemeGridRangeItem({
+                    start: 12.6,
+                    end: 14.2,
+                    color: color12
+                }),
+                themeGridRangeItem13 = new SuperMap.ThemeGridRangeItem({
+                    start: 14.2,
+                    end: 15.8,
+                    color: color13
+                }),
+                themeGridRangeItem14 = new SuperMap.ThemeGridRangeItem({
+                    start: 15.8,
+                    end: 17.4,
+                    color: color14
+                }),
+                themeGridRangeItem15 = new SuperMap.ThemeGridRangeItem({
+                    start: 17.4,
+                    end: 19,
+                    color: color15
+                }),
+                themeGridRangeItem16 = new SuperMap.ThemeGridRangeItem({
+                    start: 19,
+                    end: 20.6,
+                    color: color16
+                }),
+                themeGridRangeItem17 = new SuperMap.ThemeGridRangeItem({
+                    start: 20.6,
+                    end: 22.2,
+                    color: color17
+                }),
+                themeGridRangeItem18 = new SuperMap.ThemeGridRangeItem({
+                    start: 22.2,
+                    end: 23.8,
+                    color: color18
+                }),
+                themeGridRangeItem19 = new SuperMap.ThemeGridRangeItem({
+                    start: 23.8,
+                    end: 25.4,
+                    color: color19
+                }),
+                themeGridRangeItem20 = new SuperMap.ThemeGridRangeItem({
+                    start: 25.4,
+                    end: 27,
+                    color: color20
+                });
+
+            themeGridRange = new SuperMap.ThemeGridRange({
+                reverseColor: false,
+                rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+                //栅格分段专题图子项数组
+                items: [themeGridRangeItem1, themeGridRangeItem2,
+                    themeGridRangeItem3, themeGridRangeItem4,
+                    themeGridRangeItem5, themeGridRangeItem6,
+                    themeGridRangeItem7, themeGridRangeItem8,
+                    themeGridRangeItem9, themeGridRangeItem10,
+                    themeGridRangeItem11, themeGridRangeItem12,
+                    themeGridRangeItem13, themeGridRangeItem14,
+                    themeGridRangeItem15, themeGridRangeItem16,
+                    themeGridRangeItem17, themeGridRangeItem18,
+                    themeGridRangeItem19, themeGridRangeItem20
+                ]
+            });
+
+            themeParameters = new SuperMap.ThemeParameters({
+                //制作专题图的数据集
+                datasetNames: [interpolationAnalystResult.dataset.split('@')[0]],
+                dataSourceNames: ["Interpolation"],
+                joinItems: null,
+                themes: [themeGridRange]
+            });
+
+            themeService.getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            transparent: true,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            });
+        }
+    }
+</script>
+</body>
+</html>

+ 247 - 0
public/supermap/examples/openlayers/04_interpolationAnalystService_Kriging.html

@@ -0,0 +1,247 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_interpolationAnalystServiceKriging"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, interpolationAnalystResult,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-temperature/rest/maps/全国温度变化图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [-2640403.63, 1873792.1, 3247669.39, 5921501.4];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [531762, 3580330],
+                zoom: 1,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        options.layersID = "[0,1,2]";
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        interpolationAnalystProcess();
+    });
+
+    function interpolationAnalystProcess() {
+        //创建点密度插值分析参数实例
+        var interpolationAnalystParameters = new SuperMap.InterpolationKrigingAnalystParameters({
+            //用于做插值分析的数据源中数据集的名称
+            dataset: "SamplesP@Interpolation",
+            //插值分析结果数据集的名称
+            outputDatasetName: "Kriging_Result",
+            //插值分析结果数据源的名称
+            outputDatasourceName: "Interpolation",
+            //结果栅格数据集存储的像素格式
+            pixelFormat: SuperMap.PixelFormat.DOUBLE,
+            // 属性过滤条件
+            filterQueryParameter: {
+                attributeFilter: ""
+            },
+            //存储用于进行插值分析的字段名称
+            zValueFieldName: "AVG_TMP",
+            searchRadius: "0",
+            //普通克吕金插值的类型
+            type: "KRIGING",
+            searchMode: "KDTREE_FIXED_COUNT",
+            bounds: [-2640403.63, 1873792.1, 3247669.39, 5921501.4]
+        });
+        new ol.supermap.SpatialAnalystService(serviceUrl).interpolationAnalysis(interpolationAnalystParameters, function (serviceResult) {
+            interpolationAnalystResult = serviceResult.result;
+            //用栅格专题图展示分析结果
+            showAnalysisResult_ThemeGridRange();
+        });
+
+        //构造栅格专题图
+        function showAnalysisResult_ThemeGridRange() {
+            var color1 = new SuperMap.ServerColor(170, 240, 233),
+                color2 = new SuperMap.ServerColor(176, 244, 188),
+                color3 = new SuperMap.ServerColor(218, 251, 178),
+                color4 = new SuperMap.ServerColor(220, 236, 145),
+                color5 = new SuperMap.ServerColor(96, 198, 66),
+                color6 = new SuperMap.ServerColor(20, 142, 53),
+                color7 = new SuperMap.ServerColor(85, 144, 55),
+                color8 = new SuperMap.ServerColor(171, 168, 38),
+                color9 = new SuperMap.ServerColor(235, 165, 9),
+                color10 = new SuperMap.ServerColor(203, 89, 2),
+                color11 = new SuperMap.ServerColor(157, 25, 1),
+                color12 = new SuperMap.ServerColor(118, 15, 3),
+                color13 = new SuperMap.ServerColor(112, 32, 7),
+                color14 = new SuperMap.ServerColor(106, 45, 12),
+                color15 = new SuperMap.ServerColor(129, 80, 50),
+                color16 = new SuperMap.ServerColor(160, 154, 146),
+                color17 = new SuperMap.ServerColor(107, 47, 14),
+                color18 = new SuperMap.ServerColor(125, 75, 44),
+                color19 = new SuperMap.ServerColor(146, 110, 88),
+                color20 = new SuperMap.ServerColor(166, 153, 146);
+
+            var themeGridRangeIteme1 = new SuperMap.ThemeGridRangeItem({
+                    start: -5,
+                    end: -3.4,
+                    color: color1
+                }),
+                themeGridRangeIteme2 = new SuperMap.ThemeGridRangeItem({
+                    start: -3.4,
+                    end: -1.8,
+                    color: color2
+                }),
+                themeGridRangeIteme3 = new SuperMap.ThemeGridRangeItem({
+                    start: -1.8,
+                    end: -0.2,
+                    color: color3
+                }),
+                themeGridRangeIteme4 = new SuperMap.ThemeGridRangeItem({
+                    start: -0.2,
+                    end: 1.4,
+                    color: color4
+                }),
+                themeGridRangeIteme5 = new SuperMap.ThemeGridRangeItem({
+                    start: 1.4,
+                    end: 3,
+                    color: color5
+                }),
+                themeGridRangeIteme6 = new SuperMap.ThemeGridRangeItem({
+                    start: 3,
+                    end: 4.6,
+                    color: color6
+                }),
+                themeGridRangeIteme7 = new SuperMap.ThemeGridRangeItem({
+                    start: 4.6,
+                    end: 6.2,
+                    color: color7
+                }),
+                themeGridRangeIteme8 = new SuperMap.ThemeGridRangeItem({
+                    start: 6.2,
+                    end: 7.8,
+                    color: color8
+                }),
+                themeGridRangeIteme9 = new SuperMap.ThemeGridRangeItem({
+                    start: 7.8,
+                    end: 9.4,
+                    color: color9
+                }),
+                themeGridRangeIteme10 = new SuperMap.ThemeGridRangeItem({
+                    start: 9.4,
+                    end: 11,
+                    color: color10
+                }),
+                themeGridRangeIteme11 = new SuperMap.ThemeGridRangeItem({
+                    start: 11,
+                    end: 12.6,
+                    color: color11
+                }),
+                themeGridRangeIteme12 = new SuperMap.ThemeGridRangeItem({
+                    start: 12.6,
+                    end: 14.2,
+                    color: color12
+                }),
+                themeGridRangeIteme13 = new SuperMap.ThemeGridRangeItem({
+                    start: 14.2,
+                    end: 15.8,
+                    color: color13
+                }),
+                themeGridRangeIteme14 = new SuperMap.ThemeGridRangeItem({
+                    start: 15.8,
+                    end: 17.4,
+                    color: color14
+                }),
+                themeGridRangeIteme15 = new SuperMap.ThemeGridRangeItem({
+                    start: 17.4,
+                    end: 19,
+                    color: color15
+                }),
+                themeGridRangeIteme16 = new SuperMap.ThemeGridRangeItem({
+                    start: 19,
+                    end: 20.6,
+                    color: color16
+                }),
+                themeGridRangeIteme17 = new SuperMap.ThemeGridRangeItem({
+                    start: 20.6,
+                    end: 22.2,
+                    color: color17
+                }),
+                themeGridRangeIteme18 = new SuperMap.ThemeGridRangeItem({
+                    start: 22.2,
+                    end: 23.8,
+                    color: color18
+                }),
+                themeGridRangeIteme19 = new SuperMap.ThemeGridRangeItem({
+                    start: 23.8,
+                    end: 25.4,
+                    color: color19
+                }),
+                themeGridRangeIteme20 = new SuperMap.ThemeGridRangeItem({
+                    start: 25.4,
+                    end: 27,
+                    color: color20
+                });
+
+            var themeGridRange = new SuperMap.ThemeGridRange({
+                reverseColor: false,
+                rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+                //栅格分段专题图子项数组
+                items: [themeGridRangeIteme1, themeGridRangeIteme2,
+                    themeGridRangeIteme3, themeGridRangeIteme4,
+                    themeGridRangeIteme5, themeGridRangeIteme6,
+                    themeGridRangeIteme7, themeGridRangeIteme8,
+                    themeGridRangeIteme9, themeGridRangeIteme10,
+                    themeGridRangeIteme11, themeGridRangeIteme12,
+                    themeGridRangeIteme13, themeGridRangeIteme14,
+                    themeGridRangeIteme15, themeGridRangeIteme16,
+                    themeGridRangeIteme17, themeGridRangeIteme18,
+                    themeGridRangeIteme19, themeGridRangeIteme20
+                ]
+            });
+
+            var themeParameters = new SuperMap.ThemeParameters({
+                //制作专题图的数据集
+                datasetNames: [interpolationAnalystResult.dataset.split('@')[0]],
+                dataSourceNames: ["Interpolation"],
+                joinItems: null,
+                themes: [themeGridRange]
+            });
+
+            new ol.supermap.ThemeService(baseUrl).getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                            transparent: true
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            });
+        }
+    }
+</script>
+</body>
+</html>

+ 258 - 0
public/supermap/examples/openlayers/04_interpolationAnalystService_KrigingUniversal.html

@@ -0,0 +1,258 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_interpolationAnalystServiceKrigingUniversal"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, interpolationAnalystResult,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-temperature/rest/maps/全国温度变化图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [-2640403.63, 1873792.1, 3247669.39, 5921501.4];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [531762, 3580330],
+                zoom: 1,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        options.layersID = "[0,1,2]";
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        interpolationAnalystProcess();
+    });
+
+    function interpolationAnalystProcess() {
+        //创建点密度插值分析参数实例
+        var interpolationAnalystParameters = new SuperMap.InterpolationKrigingAnalystParameters({
+            // 用于做插值分析的数据源中数据集的名称
+            dataset: "SamplesP@Interpolation",
+            // 插值分析结果数据集的名称
+            outputDatasetName: "UniversalKriging_Result",
+            // 插值分析结果数据源的名称
+            outputDatasourceName: "Interpolation",
+            // 结果栅格数据集存储的像素格式
+            pixelFormat: SuperMap.PixelFormat.DOUBLE,
+            // 属性过滤条件
+            filterQueryParameter: {
+                attributeFilter: ""
+            },
+            //存储用于进行插值分析的字段名称
+            zValueFieldName: "AVG_TMP",
+            searchRadius: "0",
+            //克吕金插值的类型
+            type: "UniversalKriging",
+            //克吕金类型中旋转角度值
+            angle: 0,
+            //克吕金类型中块金效应值
+            nugget: 0,
+            //克吕金类型中自相关阈值,单位与原数据集单位相同
+            range: 0,
+            //克吕金类型中基台值
+            sill: 0,
+            //克吕金插值时的半变函数类型
+            variogramMode: "SPHERICAL",
+            searchMode: "KDTREE_FIXED_COUNT",
+            bounds: [-2640403.63, 1873792.1, 3247669.39, 5921501.4]
+        });
+
+        new ol.supermap.SpatialAnalystService(serviceUrl).interpolationAnalysis(interpolationAnalystParameters, function (serviceResult) {
+            interpolationAnalystResult = serviceResult.result;
+            //用栅格专题图展示分析结果
+            showAnalysisResult_ThemeGridRange();
+        });
+
+        //构造栅格专题图
+        function showAnalysisResult_ThemeGridRange() {
+            var color1 = new SuperMap.ServerColor(170, 240, 233),
+                color2 = new SuperMap.ServerColor(176, 244, 188),
+                color3 = new SuperMap.ServerColor(218, 251, 178),
+                color4 = new SuperMap.ServerColor(220, 236, 145),
+                color5 = new SuperMap.ServerColor(96, 198, 66),
+                color6 = new SuperMap.ServerColor(20, 142, 53),
+                color7 = new SuperMap.ServerColor(85, 144, 55),
+                color8 = new SuperMap.ServerColor(171, 168, 38),
+                color9 = new SuperMap.ServerColor(235, 165, 9),
+                color10 = new SuperMap.ServerColor(203, 89, 2),
+                color11 = new SuperMap.ServerColor(157, 25, 1),
+                color12 = new SuperMap.ServerColor(118, 15, 3),
+                color13 = new SuperMap.ServerColor(112, 32, 7),
+                color14 = new SuperMap.ServerColor(106, 45, 12),
+                color15 = new SuperMap.ServerColor(129, 80, 50),
+                color16 = new SuperMap.ServerColor(160, 154, 146),
+                color17 = new SuperMap.ServerColor(107, 47, 14),
+                color18 = new SuperMap.ServerColor(125, 75, 44),
+                color19 = new SuperMap.ServerColor(146, 110, 88),
+                color20 = new SuperMap.ServerColor(166, 153, 146);
+
+            var themeGridRangeIteme1 = new SuperMap.ThemeGridRangeItem({
+                    start: -5,
+                    end: -3.4,
+                    color: color1
+                }),
+                themeGridRangeIteme2 = new SuperMap.ThemeGridRangeItem({
+                    start: -3.4,
+                    end: -1.8,
+                    color: color2
+                }),
+                themeGridRangeIteme3 = new SuperMap.ThemeGridRangeItem({
+                    start: -1.8,
+                    end: -0.2,
+                    color: color3
+                }),
+                themeGridRangeIteme4 = new SuperMap.ThemeGridRangeItem({
+                    start: -0.2,
+                    end: 1.4,
+                    color: color4
+                }),
+                themeGridRangeIteme5 = new SuperMap.ThemeGridRangeItem({
+                    start: 1.4,
+                    end: 3,
+                    color: color5
+                }),
+                themeGridRangeIteme6 = new SuperMap.ThemeGridRangeItem({
+                    start: 3,
+                    end: 4.6,
+                    color: color6
+                }),
+                themeGridRangeIteme7 = new SuperMap.ThemeGridRangeItem({
+                    start: 4.6,
+                    end: 6.2,
+                    color: color7
+                }),
+                themeGridRangeIteme8 = new SuperMap.ThemeGridRangeItem({
+                    start: 6.2,
+                    end: 7.8,
+                    color: color8
+                }),
+                themeGridRangeIteme9 = new SuperMap.ThemeGridRangeItem({
+                    start: 7.8,
+                    end: 9.4,
+                    color: color9
+                }),
+                themeGridRangeIteme10 = new SuperMap.ThemeGridRangeItem({
+                    start: 9.4,
+                    end: 11,
+                    color: color10
+                }),
+                themeGridRangeIteme11 = new SuperMap.ThemeGridRangeItem({
+                    start: 11,
+                    end: 12.6,
+                    color: color11
+                }),
+                themeGridRangeIteme12 = new SuperMap.ThemeGridRangeItem({
+                    start: 12.6,
+                    end: 14.2,
+                    color: color12
+                }),
+                themeGridRangeIteme13 = new SuperMap.ThemeGridRangeItem({
+                    start: 14.2,
+                    end: 15.8,
+                    color: color13
+                }),
+                themeGridRangeIteme14 = new SuperMap.ThemeGridRangeItem({
+                    start: 15.8,
+                    end: 17.4,
+                    color: color14
+                }),
+                themeGridRangeIteme15 = new SuperMap.ThemeGridRangeItem({
+                    start: 17.4,
+                    end: 19,
+                    color: color15
+                }),
+                themeGridRangeIteme16 = new SuperMap.ThemeGridRangeItem({
+                    start: 19,
+                    end: 20.6,
+                    color: color16
+                }),
+                themeGridRangeIteme17 = new SuperMap.ThemeGridRangeItem({
+                    start: 20.6,
+                    end: 22.2,
+                    color: color17
+                }),
+                themeGridRangeIteme18 = new SuperMap.ThemeGridRangeItem({
+                    start: 22.2,
+                    end: 23.8,
+                    color: color18
+                }),
+                themeGridRangeIteme19 = new SuperMap.ThemeGridRangeItem({
+                    start: 23.8,
+                    end: 25.4,
+                    color: color19
+                }),
+                themeGridRangeIteme20 = new SuperMap.ThemeGridRangeItem({
+                    start: 25.4,
+                    end: 27,
+                    color: color20
+                });
+
+            var themeGridRange = new SuperMap.ThemeGridRange({
+                reverseColor: false,
+                rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+                //栅格分段专题图子项数组
+                items: [themeGridRangeIteme1, themeGridRangeIteme2,
+                    themeGridRangeIteme3, themeGridRangeIteme4,
+                    themeGridRangeIteme5, themeGridRangeIteme6,
+                    themeGridRangeIteme7, themeGridRangeIteme8,
+                    themeGridRangeIteme9, themeGridRangeIteme10,
+                    themeGridRangeIteme11, themeGridRangeIteme12,
+                    themeGridRangeIteme13, themeGridRangeIteme14,
+                    themeGridRangeIteme15, themeGridRangeIteme16,
+                    themeGridRangeIteme17, themeGridRangeIteme18,
+                    themeGridRangeIteme19, themeGridRangeIteme20
+                ]
+            });
+
+            var themeParameters = new SuperMap.ThemeParameters({
+                //制作专题图的数据集
+                datasetNames: [interpolationAnalystResult.dataset.split('@')[0]],
+                dataSourceNames: ["Interpolation"],
+                joinItems: null,
+                themes: [themeGridRange]
+            });
+
+            new ol.supermap.ThemeService(baseUrl).getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                            transparent: true
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            });
+        }
+    }
+</script>
+</body>
+</html>

+ 245 - 0
public/supermap/examples/openlayers/04_interpolationAnalystService_RBF.html

@@ -0,0 +1,245 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_interpolationAnalystByRBF"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, interpolationAnalystResult,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-temperature/rest/maps/全国温度变化图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [-2640403.63, 1873792.1, 3247669.39, 5921501.4];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [531762, 3580330],
+                zoom: 1,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        options.layersID = "[0,1,2]";
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        interpolationAnalystProcess();
+    });
+
+    function interpolationAnalystProcess() {
+        //创建点密度插值分析参数实例
+        var interpolationAnalystParameters = new SuperMap.InterpolationRBFAnalystParameters({
+            //用于做插值分析的数据源中数据集的名称
+            dataset: "SamplesP@Interpolation",
+            //插值分析结果数据集的名称
+            outputDatasetName: "RBF_Result",
+            //插值分析结果数据源的名称
+            outputDatasourceName: "Interpolation",
+            //结果栅格数据集存储的像素格式
+            pixelFormat: SuperMap.PixelFormat.DOUBLE,
+            // 属性过滤条件
+            // filterQueryParameter: {
+            // attributeFilter: ""
+            // },
+            // 存储用于进行插值分析的字段名称
+            zValueFieldName: "AVG_TMP",
+            //采取固定点数查找参与运算点的方式,此方式下,参与差值运算的点数默认为12。
+            searchMode: "KDTREE_FIXED_COUNT",
+            bounds: [-2640403.63, 1873792.1, 3247669.39, 5921501.4]
+        });
+        new ol.supermap.SpatialAnalystService(serviceUrl).interpolationAnalysis(interpolationAnalystParameters, function (serviceResult) {
+            interpolationAnalystResult = serviceResult.result;
+            //用栅格专题图展示分析结果
+            showAnalysisResult_ThemeGridRange();
+        });
+
+        //构造栅格专题图
+        function showAnalysisResult_ThemeGridRange() {
+            var color1 = new SuperMap.ServerColor(170, 240, 233),
+                color2 = new SuperMap.ServerColor(176, 244, 188),
+                color3 = new SuperMap.ServerColor(218, 251, 178),
+                color4 = new SuperMap.ServerColor(220, 236, 145),
+                color5 = new SuperMap.ServerColor(96, 198, 66),
+                color6 = new SuperMap.ServerColor(20, 142, 53),
+                color7 = new SuperMap.ServerColor(85, 144, 55),
+                color8 = new SuperMap.ServerColor(171, 168, 38),
+                color9 = new SuperMap.ServerColor(235, 165, 9),
+                color10 = new SuperMap.ServerColor(203, 89, 2),
+                color11 = new SuperMap.ServerColor(157, 25, 1),
+                color12 = new SuperMap.ServerColor(118, 15, 3),
+                color13 = new SuperMap.ServerColor(112, 32, 7),
+                color14 = new SuperMap.ServerColor(106, 45, 12),
+                color15 = new SuperMap.ServerColor(129, 80, 50),
+                color16 = new SuperMap.ServerColor(160, 154, 146),
+                color17 = new SuperMap.ServerColor(107, 47, 14),
+                color18 = new SuperMap.ServerColor(125, 75, 44),
+                color19 = new SuperMap.ServerColor(146, 110, 88),
+                color20 = new SuperMap.ServerColor(166, 153, 146);
+
+            var themeGridRangeIteme1 = new SuperMap.ThemeGridRangeItem({
+                    start: -5,
+                    end: -3.4,
+                    color: color1
+                }),
+                themeGridRangeIteme2 = new SuperMap.ThemeGridRangeItem({
+                    start: -3.4,
+                    end: -1.8,
+                    color: color2
+                }),
+                themeGridRangeIteme3 = new SuperMap.ThemeGridRangeItem({
+                    start: -1.8,
+                    end: -0.2,
+                    color: color3
+                }),
+                themeGridRangeIteme4 = new SuperMap.ThemeGridRangeItem({
+                    start: -0.2,
+                    end: 1.4,
+                    color: color4
+                }),
+                themeGridRangeIteme5 = new SuperMap.ThemeGridRangeItem({
+                    start: 1.4,
+                    end: 3,
+                    color: color5
+                }),
+                themeGridRangeIteme6 = new SuperMap.ThemeGridRangeItem({
+                    start: 3,
+                    end: 4.6,
+                    color: color6
+                }),
+                themeGridRangeIteme7 = new SuperMap.ThemeGridRangeItem({
+                    start: 4.6,
+                    end: 6.2,
+                    color: color7
+                }),
+                themeGridRangeIteme8 = new SuperMap.ThemeGridRangeItem({
+                    start: 6.2,
+                    end: 7.8,
+                    color: color8
+                }),
+                themeGridRangeIteme9 = new SuperMap.ThemeGridRangeItem({
+                    start: 7.8,
+                    end: 9.4,
+                    color: color9
+                }),
+                themeGridRangeIteme10 = new SuperMap.ThemeGridRangeItem({
+                    start: 9.4,
+                    end: 11,
+                    color: color10
+                }),
+                themeGridRangeIteme11 = new SuperMap.ThemeGridRangeItem({
+                    start: 11,
+                    end: 12.6,
+                    color: color11
+                }),
+                themeGridRangeIteme12 = new SuperMap.ThemeGridRangeItem({
+                    start: 12.6,
+                    end: 14.2,
+                    color: color12
+                }),
+                themeGridRangeIteme13 = new SuperMap.ThemeGridRangeItem({
+                    start: 14.2,
+                    end: 15.8,
+                    color: color13
+                }),
+                themeGridRangeIteme14 = new SuperMap.ThemeGridRangeItem({
+                    start: 15.8,
+                    end: 17.4,
+                    color: color14
+                }),
+                themeGridRangeIteme15 = new SuperMap.ThemeGridRangeItem({
+                    start: 17.4,
+                    end: 19,
+                    color: color15
+                }),
+                themeGridRangeIteme16 = new SuperMap.ThemeGridRangeItem({
+                    start: 19,
+                    end: 20.6,
+                    color: color16
+                }),
+                themeGridRangeIteme17 = new SuperMap.ThemeGridRangeItem({
+                    start: 20.6,
+                    end: 22.2,
+                    color: color17
+                }),
+                themeGridRangeIteme18 = new SuperMap.ThemeGridRangeItem({
+                    start: 22.2,
+                    end: 23.8,
+                    color: color18
+                }),
+                themeGridRangeIteme19 = new SuperMap.ThemeGridRangeItem({
+                    start: 23.8,
+                    end: 25.4,
+                    color: color19
+                }),
+                themeGridRangeIteme20 = new SuperMap.ThemeGridRangeItem({
+                    start: 25.4,
+                    end: 27,
+                    color: color20
+                });
+
+            var themeGridRange = new SuperMap.ThemeGridRange({
+                reverseColor: false,
+                rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+                //栅格分段专题图子项数组
+                items: [themeGridRangeIteme1, themeGridRangeIteme2,
+                    themeGridRangeIteme3, themeGridRangeIteme4,
+                    themeGridRangeIteme5, themeGridRangeIteme6,
+                    themeGridRangeIteme7, themeGridRangeIteme8,
+                    themeGridRangeIteme9, themeGridRangeIteme10,
+                    themeGridRangeIteme11, themeGridRangeIteme12,
+                    themeGridRangeIteme13, themeGridRangeIteme14,
+                    themeGridRangeIteme15, themeGridRangeIteme16,
+                    themeGridRangeIteme17, themeGridRangeIteme18,
+                    themeGridRangeIteme19, themeGridRangeIteme20
+                ]
+            });
+
+            var themeParameters = new SuperMap.ThemeParameters({
+                //制作专题图的数据集
+                datasetNames: [interpolationAnalystResult.dataset.split('@')[0]],
+                dataSourceNames: ["Interpolation"],
+                joinItems: null,
+                themes: [themeGridRange]
+            });
+
+            new ol.supermap.ThemeService(baseUrl).getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                            transparent: true
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            });
+        }
+    }
+</script>
+</body>
+</html>

+ 132 - 0
public/supermap/examples/openlayers/04_mathExpressionAnalysisService.html

@@ -0,0 +1,132 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_mathExpression"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, mathExpressionAnalysisResult,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-jingjin/rest/maps/京津地区地图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [104.07, 30.54, 119.51, 42.31];
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [116.85, 39.79],
+                zoom: 8,
+                projection: "EPSG:4326",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        mathExpressionAnalysisProcess();
+    });
+
+    function mathExpressionAnalysisProcess() {
+        //创建栅格代数运算参数实例
+        var mathExpressionAnalysisParameters = new SuperMap.MathExpressionAnalysisParameters({
+            //指定数据集,必设
+            dataset: "JingjinTerrain@Jingjin",
+            //要执行的栅格运算代数表达式,必设
+            expression: "[Jingjin.JingjinTerrain] + 600",
+            //存储结果数据集的数据源,必设
+            targetDatasource: "Jingjin",
+            //结果数据集名称,必设
+            resultGridName: "MathExpressionAnalysis_Result",
+            deleteExistResultDataset: true
+        });
+        //向iServer发起栅格代数运算请求
+        new ol.supermap.SpatialAnalystService(serviceUrl).mathExpressionAnalysis(mathExpressionAnalysisParameters, function (serviceResult) {
+            mathExpressionAnalysisResult = serviceResult.result;
+            //用栅格专题图展示分析结果
+            showAnalysisResult_ThemeGridRange();
+        });
+
+        //构造栅格专题图
+        function showAnalysisResult_ThemeGridRange() {
+            var themeGridRangeIteme1 = new SuperMap.ThemeGridRangeItem({
+                    start: 0,
+                    end: 650,
+                    color: new SuperMap.ServerColor(40, 140, 40)
+                }),
+                themeGridRangeIteme2 = new SuperMap.ThemeGridRangeItem({
+                    start: 650,
+                    end: 750,
+                    color: new SuperMap.ServerColor(170, 198, 40)
+                }),
+                themeGridRangeIteme3 = new SuperMap.ThemeGridRangeItem({
+                    start: 750,
+                    end: 900,
+                    color: new SuperMap.ServerColor(191, 191, 0)
+                }),
+                themeGridRangeIteme4 = new SuperMap.ThemeGridRangeItem({
+                    start: 900,
+                    end: 1350,
+                    color: new SuperMap.ServerColor(191, 95, 0)
+                }),
+                themeGridRangeIteme5 = new SuperMap.ThemeGridRangeItem({
+                    start: 1350,
+                    end: 3600,
+                    color: new SuperMap.ServerColor(127, 0, 0)
+                });
+
+            var themeGridRange = new SuperMap.ThemeGridRange({
+                reverseColor: false,
+                rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+                //栅格分段专题图子项数组
+                items: [themeGridRangeIteme1,
+                    themeGridRangeIteme2,
+                    themeGridRangeIteme3,
+                    themeGridRangeIteme4,
+                    themeGridRangeIteme5
+                ]
+            });
+
+            var themeParameters = new SuperMap.ThemeParameters({
+                //制作专题图的数据集
+                datasetNames: [mathExpressionAnalysisResult.dataset.split('@')[0]],
+                dataSourceNames: ["Jingjin"],
+                joinItems: null,
+                themes: [themeGridRange]
+            });
+
+            new ol.supermap.ThemeService(baseUrl).getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        opacity: 0.8,
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                            transparent: true
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            });
+        }
+    }
+</script>
+</body>
+</html>

+ 67 - 0
public/supermap/examples/openlayers/04_overlayAnalystService.html

@@ -0,0 +1,67 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_overlayAnalyst"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-jingjin/rest/maps/京津地区人口分布图_专题图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [104.07, 30.54, 119.51, 42.31];
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [116.77, 40.04],
+                zoom: 8,
+                projection: "EPSG:4326",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        overlayAnalystProcess();
+    });
+
+    function overlayAnalystProcess() {
+        var datasetOverlayAnalystParameters = new SuperMap.DatasetOverlayAnalystParameters({
+            sourceDataset: "BaseMap_R@Jingjin",
+            operateDataset: "Neighbor_R@Jingjin",
+            tolerance: 0,
+            operation: SuperMap.OverlayOperationType.UNION
+        });
+        new ol.supermap.SpatialAnalystService(serviceUrl).overlayAnalysis(datasetOverlayAnalystParameters, function (serviceResult) {
+            var resultLayer = new ol.layer.Vector({
+                source: new ol.source.Vector({
+                    features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.recordset.features)
+                }),
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'rgba(100, 100, 225, 10)',
+                        width: 3
+                    }),
+                    fill: new ol.style.Fill({
+                        color: 'rgba(0, 0, 255, 0.1)'
+                    })
+                })
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 162 - 0
public/supermap/examples/openlayers/04_routeCalculateMeasureService.html

@@ -0,0 +1,162 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_routeCalculateMeasure"></title>
+    <script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 300px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var map, options, queryBySQLParams, queryBySQLService, resultLayer,
+        routeCalculateMeasureParameters, routeCalculateMeasureService,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
+    var container = document.getElementById('popup');
+    var content = document.getElementById('popup-content');
+    var overlay = new ol.Overlay(({
+        element: container,
+        autoPan: true,
+        autoPanAnimation: {
+            duration: 250
+        }
+    }));
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    var mapService = new ol.supermap.MapService(baseUrl);
+    mapService.getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [4503.62, -3861.91],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            }),
+            overlays: [overlay]
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        routeCalculateMeasureProcess();
+    });
+
+
+    function routeCalculateMeasureProcess() {
+        //通过SQL查询的方法建立路由,并添加到地图上
+        queryBySQLService = new ol.supermap.QueryService(baseUrl);
+        queryBySQLParams = new SuperMap.QueryBySQLParameters({
+            queryParams: [
+                new SuperMap.FilterParameter({
+                    name: "RouteDT_road@Changchun",
+                    attributeFilter: "RouteID=1690"
+                })
+            ]
+        });
+        queryBySQLService.queryBySQL(queryBySQLParams, function (SQLQueryServiceResult) {
+            var queryBySQLResult = SQLQueryServiceResult.result.recordsets[0].features;
+            var pathSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(queryBySQLResult)
+            });
+            pathLayer = new ol.layer.Vector({
+                source: pathSource,
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'rgba(100, 100, 225, 10)',
+                        width: 3
+                    })
+                })
+            });
+            map.addLayer(pathLayer);
+
+            //将形成路由的点提出来,为了构造下面点定里程服务sourceRoute
+            var pointsList = [];
+            var routeObj = queryBySQLResult.features[0].geometry.coordinates[0];
+            for (var i = 0; i < routeObj.length; i++) {
+                pointsList.push([routeObj[i][0], routeObj[i][1], routeObj[i][2]])
+            }
+            var routeLine = new ol.geom.LineString([pointsList]);
+
+            //在组成路由的点中选取一个查询点(数组中第8个点),并添加到地图上
+            var point = new ol.geom.Point([routeObj[7][0], routeObj[7][1]]);
+
+            //点定里程服务
+            routeCalculateMeasureService = new ol.supermap.SpatialAnalystService(serviceUrl);
+            routeCalculateMeasureParameters = new SuperMap.RouteCalculateMeasureParameters({
+                "sourceRoute": routeLine,   //必选,路由类型
+                "point": point,            //必选
+                "tolerance": 10,
+                "isIgnoreGap": false
+            });
+            routeCalculateMeasureService.routeCalculateMeasure(routeCalculateMeasureParameters, function (routeCaculateServiceResult) {
+                var vectorSource = new ol.source.Vector({
+                    features: [new ol.Feature(point)],
+                });
+                resultLayer = new ol.layer.Vector({
+                    source: vectorSource
+                });
+                map.addLayer(resultLayer);
+                var innerHTML = resources.msg_MByQuery + routeCaculateServiceResult.result.measure;
+                content.innerHTML = innerHTML;
+                overlay.setPosition([point.getCoordinates()[0], point.getCoordinates()[1]]);
+            });
+        });
+    }
+</script>
+</body>
+</html>

+ 114 - 0
public/supermap/examples/openlayers/04_routeLocatorService_line.html

@@ -0,0 +1,114 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_routeLocatorLine"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, queryBySQLParams, queryBySQLService, resultLayer,
+        routeLocatorParameters_line, routeLocatorService,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    var mapService = new ol.supermap.MapService(baseUrl);
+    mapService.getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [4503.62, -3861.91],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        routeLocatorProcess_line();
+    });
+
+    function routeLocatorProcess_line() {
+        //通过SQL查询的方法建立路由,并添加到地图上
+        queryBySQLService = new ol.supermap.QueryService(baseUrl);
+        queryBySQLParams = new SuperMap.QueryBySQLParameters({
+            queryParams: [
+                new SuperMap.FilterParameter({
+                    name: "RouteDT_road@Changchun",
+                    attributeFilter: "RouteID=1690"
+                })
+            ]
+        });
+        queryBySQLService.queryBySQL(queryBySQLParams, function (SQLQueryServiceResult) {
+            var queryBySQLResult = SQLQueryServiceResult.result.recordsets[0].features;
+            var pathSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(queryBySQLResult)
+            });
+            pathLayer = new ol.layer.Vector({
+                source: pathSource,
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'rgba(100, 100, 225, 10)',
+                        width: 3
+                    })
+                })
+            });
+            map.addLayer(pathLayer);
+
+            //将形成路由的点提出来,为了构造下面点定里程服务sourceRoute
+            var pointsList = [];
+            var routeObj = queryBySQLResult.features[0].geometry.coordinates[0];
+            for (var i = 0; i < routeObj.length; i++) {
+                pointsList.push([routeObj[i][0], routeObj[i][1], routeObj[i][2]])
+            }
+            var routeLine = new ol.geom.LineString([pointsList]);
+
+            //里程定线服务
+            routeLocatorService = new ol.supermap.SpatialAnalystService(serviceUrl);
+            routeLocatorParameters_line = new SuperMap.RouteLocatorParameters({
+                "sourceRoute": routeLine,
+                "type": "LINE",
+                "startMeasure": 200,
+                "endMeasure": 1000,
+                "isIgnoreGap": true
+            });
+            routeLocatorService.routeLocate(routeLocatorParameters_line, function (routeLocateServiceResult) {
+                var vectorSource = new ol.source.Vector({
+                    features: [(new ol.format.GeoJSON()).readFeature(routeLocateServiceResult.result.resultGeometry)],
+                    wrapX: false
+                });
+                resultLayer = new ol.layer.Vector({
+                    source: vectorSource,
+                    style: new ol.style.Style({
+                        stroke: new ol.style.Stroke({
+                            color: 'red',
+                            width: 3
+                        }),
+                        fill: new ol.style.Fill({
+                            color: 'rgba(0, 0, 255, 0.1)'
+                        })
+                    })
+                });
+                map.addLayer(resultLayer);
+            });
+        });
+    }
+</script>
+</body>
+</html>

+ 160 - 0
public/supermap/examples/openlayers/04_routeLocatorService_point.html

@@ -0,0 +1,160 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_routeLocatorPoint"></title>
+    <script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 200px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var map, options, queryBySQLParams, queryBySQLService, resultLayer,
+        routeLocatorParameters_point, routeLocatorService,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    var container = document.getElementById('popup');
+    var content = document.getElementById('popup-content');
+    var overlay = new ol.Overlay(({
+        element: container,
+        autoPan: true,
+        autoPanAnimation: {
+            duration: 250
+        }
+    }));
+    var mapService = new ol.supermap.MapService(baseUrl);
+    mapService.getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [4503.62, -3861.91],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            }),
+            overlays: [overlay]
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        routeLocatorProcess_point();
+    });
+
+    function routeLocatorProcess_point() {
+        //通过SQL查询的方法建立路由,并添加到地图上
+        queryBySQLService = new ol.supermap.QueryService(baseUrl);
+        queryBySQLParams = new SuperMap.QueryBySQLParameters({
+            queryParams: [
+                new SuperMap.FilterParameter({
+                    name: "RouteDT_road@Changchun",
+                    attributeFilter: "RouteID=1690"
+                })
+            ]
+        });
+        queryBySQLService.queryBySQL(queryBySQLParams, function (SQLQueryServiceResult) {
+            var queryBySQLResult = SQLQueryServiceResult.result.recordsets[0].features;
+            var pathSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(queryBySQLResult)
+            });
+            pathLayer = new ol.layer.Vector({
+                source: pathSource,
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'rgba(100, 100, 225, 10)',
+                        width: 3
+                    })
+                })
+            });
+            map.addLayer(pathLayer);
+
+            //将形成路由的点提出来,为了构造下面点定里程服务sourceRoute
+            var pointsList = [];
+            var routeObj = queryBySQLResult.features[0].geometry.coordinates[0];
+            for (var i = 0; i < routeObj.length; i++) {
+                pointsList.push([routeObj[i][0], routeObj[i][1], routeObj[i][2]])
+            }
+            var routeLine = new ol.geom.LineString([pointsList]);
+
+            //里程定点服务
+            routeLocatorService = new ol.supermap.SpatialAnalystService(serviceUrl);
+            routeLocatorParameters_point = new SuperMap.RouteLocatorParameters({
+                "sourceRoute": routeLine,
+                "type": "POINT",
+                "measure": 800,
+                "offset": 0,
+                "isIgnoreGap": true
+            });
+            routeLocatorService.routeLocate(routeLocatorParameters_point, function (routeLocateServiceResult) {
+                var vectorSource = new ol.source.Vector({
+                    features: [(new ol.format.GeoJSON()).readFeature(routeLocateServiceResult.result.resultGeometry)],
+                    wrapX: false
+                });
+                resultLayer = new ol.layer.Vector({
+                    source: vectorSource,
+                });
+                map.addLayer(resultLayer);
+                var innerHTML = resources.msg_queryMileagePoint1 + routeLocatorParameters_point.measure + resources.msg_queryMileagePoint2;
+                content.innerHTML = innerHTML;
+                overlay.setPosition([routeLocateServiceResult.result.resultGeometry.geometry.coordinates[0], routeLocateServiceResult.result.resultGeometry.geometry.coordinates[1]]);
+            });
+        });
+    }
+</script>
+</body>
+</html>

+ 92 - 0
public/supermap/examples/openlayers/04_surfaceAnalystService.html

@@ -0,0 +1,92 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_surfaceAnalystService"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, surfaceAnalystService, surfaceAnalystParameters,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-temperature/rest/maps/全国温度变化图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var mapService = new ol.supermap.MapService(baseUrl);
+    var extent = [-2640403.63, 1873792.1, 3247669.39, 5921501.4];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    mapService.getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [531762, 3580330],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        surfaceAnalystProcess();
+    });
+
+    function surfaceAnalystProcess() {
+        //创建表面分析服务参数
+        var region = new ol.geom.Polygon([[
+            [0, 4010338],
+            [1063524, 4010338],
+            [1063524, 3150322],
+            [0, 3150322]
+        ]]);
+        surfaceAnalystParameters = new SuperMap.DatasetSurfaceAnalystParameters({
+            extractParameter: new SuperMap.SurfaceAnalystParametersSetting({
+                datumValue: 0,
+                interval: 2,
+                resampleTolerance: 0,
+                smoothMethod: SuperMap.SmoothMethod.BSPLINE,
+                smoothness: 3,
+                clipRegion: region
+            }),
+            dataset: "SamplesP@Interpolation",
+            resolution: 9000,
+            zValueFieldName: "AVG_TMP"
+        });
+        //创建表面分析服务实例
+        surfaceAnalystService = new ol.supermap.SpatialAnalystService(serviceUrl);
+        surfaceAnalystService.surfaceAnalysis(surfaceAnalystParameters, function (surfaceAnalystServiceResult) {
+            var result = surfaceAnalystServiceResult.result;
+            if (result && result.recordset && result.recordset.features) {
+                var resultLayer = new ol.layer.Vector({
+                    source: new ol.source.Vector({
+                        features: (new ol.format.GeoJSON()).readFeatures(result.recordset.features)
+                    }),
+                    style: new ol.style.Style({
+                        stroke: new ol.style.Stroke({
+                            color: 'rgba(100, 100, 225, 10)',
+                            width: 1.5
+                        }),
+                        fill: new ol.style.Fill({
+                            color: 'rgba(0, 0, 255, 0.1)'
+                        })
+                    })
+                });
+                map.addLayer(resultLayer);
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 127 - 0
public/supermap/examples/openlayers/04_terrainCurvatureCalculationService.html

@@ -0,0 +1,127 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_terrainCurvatureCalculation"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options, terrainCurvatureCalculationResult,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-jingjin/rest/maps/京津地区地图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
+    var extent = [104.07, 30.54, 119.51, 42.31];
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [116.85, 39.79],
+                zoom: 8,
+                projection: "EPSG:4326",
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        terrainCurvatureCalculationProcess();
+    });
+
+    function terrainCurvatureCalculationProcess() {
+        //创建地形曲率计算参数实例
+        var terrainCurvatureCalculationParameters = new SuperMap.TerrainCurvatureCalculationParameters({
+            dataset: "JingjinTerrain@Jingjin",
+            zFactor: 1.0,
+            averageCurvatureName: "CurvatureA",
+            deleteExistResultDataset: true
+        });
+        //向iServer发起地形曲率计算请求
+        new ol.supermap.SpatialAnalystService(serviceUrl).terrainCurvatureCalculate(terrainCurvatureCalculationParameters, function (serviceResult) {
+            terrainCurvatureCalculationResult = serviceResult.result;
+            //用栅格专题图展示分析结果
+            showAnalysisResult_ThemeGridRange();
+        });
+
+        //构造栅格专题图
+        function showAnalysisResult_ThemeGridRange() {
+            var themeGridRangeIteme1 = new SuperMap.ThemeGridRangeItem({
+                    start: -9000000,
+                    end: -1000,
+                    color: new SuperMap.ServerColor(0, 0, 255)
+                }),
+                themeGridRangeIteme2 = new SuperMap.ThemeGridRangeItem({
+                    start: -1000,
+                    end: -1,
+                    color: new SuperMap.ServerColor(0, 0, 125)
+                }),
+                themeGridRangeIteme3 = new SuperMap.ThemeGridRangeItem({
+                    start: -1,
+                    end: 1,
+                    color: new SuperMap.ServerColor(0, 125, 125)
+                }),
+                themeGridRangeIteme4 = new SuperMap.ThemeGridRangeItem({
+                    start: 1,
+                    end: 1000,
+                    color: new SuperMap.ServerColor(0, 125, 0)
+                }),
+                themeGridRangeIteme5 = new SuperMap.ThemeGridRangeItem({
+                    start: 1000,
+                    end: 20000000,
+                    color: new SuperMap.ServerColor(0, 255, 0)
+                });
+
+            var themeGridRange = new SuperMap.ThemeGridRange({
+                reverseColor: false,
+                rangeMode: SuperMap.RangeMode.EQUALINTERVAL,
+                //栅格分段专题图子项数组
+                items: [themeGridRangeIteme1,
+                    themeGridRangeIteme2,
+                    themeGridRangeIteme3,
+                    themeGridRangeIteme4,
+                    themeGridRangeIteme5
+                ]
+            });
+
+            var themeParameters = new SuperMap.ThemeParameters({
+                //制作专题图的数据集(地形曲率计算的结果数据集)
+                datasetNames: [terrainCurvatureCalculationResult.averageCurvatureResult.dataset.split('@')[0]],
+                dataSourceNames: ["Jingjin"],
+                joinItems: null,
+                themes: [themeGridRange]
+            });
+
+            new ol.supermap.ThemeService(baseUrl).getThemeInfo(themeParameters, function (serviceResult) {
+                var result = serviceResult.result;
+                if (result && result.newResourceID) {
+                    var themeLayer = new ol.layer.Tile({
+                        source: new ol.source.TileSuperMapRest({
+                            url: baseUrl,
+                            noWrap: true,
+                            cacheEnabled: false,
+                            transparent: true,
+                            layersID: result.newResourceID,
+                            tileGrid: new ol.tilegrid.TileGrid({
+                                extent: extent,
+                                resolutions: options.tileGrid.getResolutions()
+                            }),
+                            transparent: true
+                        })
+                    });
+                    map.addLayer(themeLayer);
+                }
+            });
+        }
+    }
+</script>
+</body>
+</html>

+ 70 - 0
public/supermap/examples/openlayers/04_thiessenAnalystService_datasets.html

@@ -0,0 +1,70 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_thiessenAnalystDataset"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [4503.6240321526, -3861.911472192499],
+                zoom: 1,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        thiessenAnalystProcess();
+    });
+
+    function thiessenAnalystProcess() {
+        var dThiessenAnalystParameters = new SuperMap.DatasetThiessenAnalystParameters({
+            dataset: "Factory@Changchun"
+        });
+        new ol.supermap.SpatialAnalystService(serviceUrl).thiessenAnalysis(dThiessenAnalystParameters, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.regions)
+            });
+            var resultLayer = new ol.layer.Vector({
+                source: vectorSource,
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'rgba(100, 100, 225, 10)',
+                        width: 2
+                    }),
+                    fill: new ol.style.Fill({
+                        color: 'rgba(0, 0, 255, 0.1)'
+                    })
+                })
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 85 - 0
public/supermap/examples/openlayers/04_thiessenAnalystService_geometry.html

@@ -0,0 +1,85 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_thiessenAnalystGeometry"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [4503.6240321526, -3861.911472192499],
+                zoom: 1,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        thiessenAnalystProcess();
+    });
+
+    function thiessenAnalystProcess() {
+        //创建几何泰森多边形参数
+        var pointsList = [
+            new ol.geom.Point([5238.998556, -1724.229865]),
+            new ol.geom.Point([4996.270055, -2118.538477]),
+            new ol.geom.Point([5450.34263, -2070.794081]),
+            new ol.geom.Point([5317.70775, -2521.162355]),
+            new ol.geom.Point([5741.149405, -1970.130198]),
+            new ol.geom.Point([4716.133098, -1575.858795]),
+            new ol.geom.Point([5447.671615, -2255.928819]),
+            new ol.geom.Point([4783.423507, -1135.598744]),
+            new ol.geom.Point([5472.712382, -2189.15344]),
+            new ol.geom.Point([5752.716961, -2425.40363])
+        ];
+
+        var gThiessenAnalystParameters = new SuperMap.GeometryThiessenAnalystParameters({
+            points: pointsList
+        });
+        //创建泰森多边形服务实例
+        new ol.supermap.SpatialAnalystService(serviceUrl).thiessenAnalysis(gThiessenAnalystParameters, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.regions)
+            });
+            var polygonLayer = new ol.layer.Vector({
+                source: vectorSource,
+                style: new ol.style.Style({
+                    stroke: new ol.style.Stroke({
+                        color: 'rgba(100, 100, 225, 10)',
+                        width: 2
+                    }),
+                    fill: new ol.style.Fill({
+                        color: 'rgba(0, 0, 255, 0.1)'
+                    })
+                })
+            });
+            map.addLayer(polygonLayer);
+        })
+    }
+</script>
+</body>
+</html>

+ 134 - 0
public/supermap/examples/openlayers/05_findClosestFacilitiesService.html

@@ -0,0 +1,134 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_closestFacilitiesService"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [5000, -3700],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        findClosetFacilitiesProcess();
+    });
+
+    function findClosetFacilitiesProcess() {
+        //添加设施点
+        var facilityPoint1 = new ol.geom.Point([2500, -3500]);
+        var facilityPoint2 = new ol.geom.Point([5500, -2500]);
+        var facilityPoint3 = new ol.geom.Point([7000, -4000]);
+        var facilityFeature1 = new ol.Feature(facilityPoint1);
+        var facilityFeature2 = new ol.Feature(facilityPoint2);
+        var facilityFeature3 = new ol.Feature(facilityPoint3);
+        var iconStyle_facility = new ol.style.Style({
+            image: new ol.style.Icon(({
+                src: '../img/marker-gold.png'
+            }))
+        });
+        facilityFeature1.setStyle(iconStyle_facility);
+        facilityFeature2.setStyle(iconStyle_facility);
+        facilityFeature3.setStyle(iconStyle_facility);
+        var facilitySource = new ol.source.Vector({
+            features: [facilityFeature1, facilityFeature2, facilityFeature3]
+        });
+        var facilityLayer = new ol.layer.Vector({
+            source: facilitySource
+        });
+        //添加事件点
+        var eventPoint = new ol.geom.Point([5000, -3700]);
+        var eventFeature = new ol.Feature(eventPoint);
+        var iconStyle_event = new ol.style.Style({
+            image: new ol.style.Icon(({
+                src: '../img/marker.png'
+            }))
+        });
+        eventFeature.setStyle(iconStyle_event);
+        var eventSource = new ol.source.Vector({
+            features: [eventFeature]
+        });
+        var eventLayer = new ol.layer.Vector({
+            source: eventSource
+        });
+        //创建最近设施分析参数实例
+        var resultSetting = new SuperMap.TransportationAnalystResultSetting({
+            returnEdgeFeatures: true,
+            returnEdgeGeometry: true,
+            returnEdgeIDs: true,
+            returnNodeFeatures: true,
+            returnNodeGeometry: true,
+            returnNodeIDs: true,
+            returnPathGuides: true,
+            returnRoutes: true
+        });
+        var analystParameter = new SuperMap.TransportationAnalystParameter({
+            resultSetting: resultSetting,
+            turnWeightField: "TurnCost",
+            weightFieldName: "length"  //length,time
+        });
+        var findClosetFacilitiesParameter = new SuperMap.FindClosestFacilitiesParameters({
+            //事件点,必设参数
+            event: new ol.geom.Point([5000, -3700]),
+            //要查找的设施点数量。默认值为1
+            expectFacilityCount: 1,
+            //设施点集合,必设
+            facilities: [new ol.geom.Point([2500, -3500]), new ol.geom.Point([5500, -2500]), new ol.geom.Point([7000, -4000])],
+            isAnalyzeById: false,
+            parameter: analystParameter
+        });
+        //进行查找
+        new ol.supermap.NetworkAnalystService(serviceUrl).findClosestFacilities(findClosetFacilitiesParameter, function (serviceResult) {
+            serviceResult.result.facilityPathList.map(function (result) {
+                var vectorSource = new ol.source.Vector({
+                    features: (new ol.format.GeoJSON()).readFeatures(result.route)
+                });
+                var pathLayer = new ol.layer.Vector({
+                    source: vectorSource,
+                    style: new ol.style.Style({
+                        stroke: new ol.style.Stroke({
+                            color: 'rgba(100, 100, 225, 10)',
+                            width: 3
+                        }),
+                        fill: new ol.style.Fill({
+                            color: 'rgba(0, 0, 255, 0.1)'
+                        })
+                    })
+                });
+                map.addLayer(pathLayer);
+            });
+            map.addLayer(facilityLayer);
+            map.addLayer(eventLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 180 - 0
public/supermap/examples/openlayers/05_findLocationService.html

@@ -0,0 +1,180 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_findLocation"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [4800, -3700],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            }),
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        findLocationProcess();
+    });
+
+    function findLocationProcess() {
+        //添加设施点
+        var facilityPoint1 = new ol.geom.Point([1675.9256791377206, -593.56822512495194]);
+        var facilityPoint2 = new ol.geom.Point([2820.35101097629, -2358.0414663985171]);
+        var facilityPoint3 = new ol.geom.Point([2909.4396668115278, -3647.0074300836109]);
+        var facilityPoint4 = new ol.geom.Point([1544.5037476378677, -5616.5950974905827]);
+        var facilityPoint5 = new ol.geom.Point([6623.5972101719526, -2130.4887600981415]);
+        var facilityPoint6 = new ol.geom.Point([5482.4979617984973, -4504.2328567816048]);
+        var facilityPoint7 = new ol.geom.Point([6940.6579024271468, -1627.6012900626256]);
+        var facilityPoint8 = new ol.geom.Point([8215.9188781715948, -5747.5063918659716]);
+        var facilityFeature1 = new ol.Feature(facilityPoint1);
+        var facilityFeature2 = new ol.Feature(facilityPoint2);
+        var facilityFeature3 = new ol.Feature(facilityPoint3);
+        var facilityFeature4 = new ol.Feature(facilityPoint4);
+        var facilityFeature5 = new ol.Feature(facilityPoint5);
+        var facilityFeature6 = new ol.Feature(facilityPoint6);
+        var facilityFeature7 = new ol.Feature(facilityPoint7);
+        var facilityFeature8 = new ol.Feature(facilityPoint8);
+        var iconStyle_facility = new ol.style.Style({
+            image: new ol.style.Icon(({
+                src: '../img/marker.png',
+                anchor: [0.5, 1]
+            }))
+        });
+        facilityFeature1.setStyle(iconStyle_facility);
+        facilityFeature2.setStyle(iconStyle_facility);
+        facilityFeature3.setStyle(iconStyle_facility);
+        facilityFeature4.setStyle(iconStyle_facility);
+        facilityFeature5.setStyle(iconStyle_facility);
+        facilityFeature6.setStyle(iconStyle_facility);
+        facilityFeature7.setStyle(iconStyle_facility);
+        facilityFeature8.setStyle(iconStyle_facility);
+        var facilitySource = new ol.source.Vector({
+            features: [
+                facilityFeature1, facilityFeature2,
+                facilityFeature3, facilityFeature4,
+                facilityFeature5, facilityFeature6,
+                facilityFeature7, facilityFeature8
+            ]
+        });
+        var facilityLayer = new ol.layer.Vector({
+            source: facilitySource
+        });
+
+        // 设置设施点的资源供给中心
+        var supplyCenterType_FIXEDCENTER = SuperMap.SupplyCenterType.FIXEDCENTER,
+            supplyCenterType_NULL = SuperMap.SupplyCenterType.NULL;
+        var supplyCenterType_OPTIONALCENTER = SuperMap.SupplyCenterType.OPTIONALCENTER,
+            supplyCenters = [new SuperMap.SupplyCenter({
+                maxWeight: 500,             // 资源供给中心的最大耗费值,必设参数
+                nodeID: 139,                // 资源供给中心点的结点 ID 号,必设参数
+                resourceValue: 100,         // 资源供给中心能提供的最大服务量或商品数量,必设参数
+                type: supplyCenterType_OPTIONALCENTER      //选址分区中资源中心的类型包括固定中心和可选中心两种
+            }),
+                new SuperMap.SupplyCenter({
+                    maxWeight: 500,
+                    nodeID: 1358,
+                    resourceValue: 100,
+                    type: supplyCenterType_OPTIONALCENTER
+                }),
+                new SuperMap.SupplyCenter({
+                    maxWeight: 500,
+                    nodeID: 2972,
+                    resourceValue: 100,
+                    type: supplyCenterType_OPTIONALCENTER
+                }),
+                new SuperMap.SupplyCenter({
+                    maxWeight: 500,
+                    nodeID: 5523,
+                    resourceValue: 100,
+                    type: supplyCenterType_OPTIONALCENTER
+                }),
+                new SuperMap.SupplyCenter({
+                    maxWeight: 500,
+                    nodeID: 1161,
+                    resourceValue: 100,
+                    type: supplyCenterType_OPTIONALCENTER
+                }),
+                new SuperMap.SupplyCenter({
+                    maxWeight: 500,
+                    nodeID: 4337,
+                    resourceValue: 100,
+                    type: supplyCenterType_OPTIONALCENTER
+                }),
+                new SuperMap.SupplyCenter({
+                    maxWeight: 500,
+                    nodeID: 5732,
+                    resourceValue: 100,
+                    type: supplyCenterType_NULL
+                }),
+                new SuperMap.SupplyCenter({
+                    maxWeight: 500,
+                    nodeID: 663,
+                    resourceValue: 100,
+                    type: supplyCenterType_FIXEDCENTER
+                })
+            ];
+
+        //创建选址分区分析参数实例
+        var findLocationParameter = new SuperMap.FindLocationParameters({
+            // 期望用于最终设施选址的资源供给中心数量,必设字段
+            expectedSupplyCenterCount: 8,
+            // 是否从中心点开始分配资源。默认为 false
+            isFromCenter: false,
+            nodeDemandField: "Demand",
+            // 转向权值字段的名称
+            turnWeightField: "TurnCost",
+            // 阻力字段的名称, 必设
+            weightName: "length",
+            // 资源供给中心集合,必设字段
+            supplyCenters: supplyCenters
+        });
+
+        //进行查找
+        new ol.supermap.NetworkAnalystService(serviceUrl).findLocation(findLocationParameter, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.demandResults)
+            });
+            var polygonLayer = new ol.layer.Vector({
+                source: vectorSource,
+                style: new ol.style.Style({
+                    image: new ol.style.Circle({
+                        radius: 2.5,
+                        fill: new ol.style.Fill({
+                            color: 'dodgerblue'
+                        })
+                    })
+                })
+            });
+            map.addLayer(polygonLayer);
+            map.addLayer(facilityLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 135 - 0
public/supermap/examples/openlayers/05_findMTSPPathsService.html

@@ -0,0 +1,135 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_findMTSPPathsServiceLogistics"></title>
+    <script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map, options,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [5000, -3700],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        findMTSPPathsProcess();
+    });
+
+    function findMTSPPathsProcess() {
+        //添加配送点
+        var facilityPoint1 = new ol.geom.Point([6000, -5500]);
+        var facilityPoint2 = new ol.geom.Point([5500, -2500]);
+        var facilityPoint3 = new ol.geom.Point([2500, -3500]);
+        var facilityFeature1 = new ol.Feature(facilityPoint1);
+        var facilityFeature2 = new ol.Feature(facilityPoint2);
+        var facilityFeature3 = new ol.Feature(facilityPoint3);
+        var iconStyle_facility = new ol.style.Style({
+            image: new ol.style.Icon(({
+                src: '../img/marker-gold.png'
+            }))
+        });
+        facilityFeature1.setStyle(iconStyle_facility);
+        facilityFeature2.setStyle(iconStyle_facility);
+        facilityFeature3.setStyle(iconStyle_facility);
+        var facilitySource = new ol.source.Vector({
+            features: [facilityFeature1, facilityFeature2, facilityFeature3]
+        });
+        var facilityLayer = new ol.layer.Vector({
+            source: facilitySource
+        });
+
+        //添加配送目的地
+        var destPoint1 = new ol.geom.Point([5000, -5000]);
+        var destPoint2 = new ol.geom.Point([6500, -3200]);
+        var destFeature1 = new ol.Feature(destPoint1);
+        var destFeature2 = new ol.Feature(destPoint2);
+        var iconStyle_dest = new ol.style.Style({
+            image: new ol.style.Icon(({
+                src: '../img/marker.png'
+            }))
+        });
+        destFeature1.setStyle(iconStyle_dest);
+        destFeature2.setStyle(iconStyle_dest);
+        var destSource = new ol.source.Vector({
+            features: [destFeature1, destFeature2]
+        });
+        var destLayer = new ol.layer.Vector({
+            source: destSource
+        });
+
+        //创建多旅行商分析参数实例
+        var resultSetting = new SuperMap.TransportationAnalystResultSetting({
+            returnEdgeFeatures: true,
+            returnEdgeGeometry: true,
+            returnEdgeIDs: true,
+            returnNodeFeatures: true,
+            returnNodeGeometry: true,
+            returnNodeIDs: true,
+            returnPathGuides: true,
+            returnRoutes: true
+        });
+        var analystParameter = new SuperMap.TransportationAnalystParameter({
+            resultSetting: resultSetting,
+            weightFieldName: "length"  //"length"或者"time"
+        });
+        var findMTSPPathsParameter = new SuperMap.FindMTSPPathsParameters({
+            centers: [new ol.geom.Point([6000, -5500]), new ol.geom.Point([5500, -2500]), new ol.geom.Point([2500, -3500])],
+            isAnalyzeById: false,
+            nodes: [new ol.geom.Point([5000, -5000]), new ol.geom.Point([6500, -3200])],
+            hasLeastTotalCost: true,
+            parameter: analystParameter
+        });
+        //进行查找
+        new ol.supermap.NetworkAnalystService(serviceUrl).findMTSPPaths(findMTSPPathsParameter, function (serviceResult) {
+            serviceResult.result.pathList.map(function (result) {
+                var vectorSource = new ol.source.Vector({
+                    features: (new ol.format.GeoJSON()).readFeatures(result.route)
+                });
+                var pathLayer = new ol.layer.Vector({
+                    source: vectorSource,
+                    style: new ol.style.Style({
+                        stroke: new ol.style.Stroke({
+                            color: 'rgba(100, 100, 225, 10)',
+                            width: 3
+                        }),
+                        fill: new ol.style.Fill({
+                            color: 'rgba(0, 0, 255, 0.1)'
+                        })
+                    })
+                });
+                map.addLayer(pathLayer);
+            });
+            map.addLayer(facilityLayer);
+            map.addLayer(destLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 139 - 0
public/supermap/examples/openlayers/05_findPathService.html

@@ -0,0 +1,139 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_findPath"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="stopMarker1">
+    <img src="../img/marker.png"/>
+</div>
+<div id="stopMarker2">
+    <img src="../img/marker.png"/>
+</div>
+<div id="stopMarker3">
+    <img src="../img/marker.png"/>
+</div>
+<script type="text/javascript">
+    var map,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun";
+    //最佳路径分析是按照站点添加顺序对站点进行访问的
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [5200, -3375],
+                zoom: 3,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        var options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        findPathProcess();
+    });
+
+    function findPathProcess() {
+        //添加站点
+        var stopMarker1 = new ol.Overlay({
+            element: document.getElementById('stopMarker1'),
+            positioning: 'center-center',
+            position: [4000, -3000]
+        });
+        var stopMarker2 = new ol.Overlay({
+            element: document.getElementById('stopMarker2'),
+            positioning: 'center-center',
+            position: [5500, -2500]
+        });
+        var stopMarker3 = new ol.Overlay({
+            element: document.getElementById('stopMarker3'),
+            positioning: 'center-center',
+            position: [6900, -4000]
+        });
+        map.addOverlay(stopMarker1);
+        map.addOverlay(stopMarker2);
+        map.addOverlay(stopMarker3);
+
+        //创建最佳路径分析参数实例
+        var resultSetting = new SuperMap.TransportationAnalystResultSetting({
+            returnEdgeFeatures: true,
+            returnEdgeGeometry: true,
+            returnEdgeIDs: true,
+            returnNodeFeatures: true,
+            returnNodeGeometry: true,
+            returnNodeIDs: true,
+            returnPathGuides: true,
+            returnRoutes: true
+        });
+        var analystParameter = new SuperMap.TransportationAnalystParameter({
+            resultSetting: resultSetting,
+            weightFieldName: "length"
+        });
+        var findPathParameter = new SuperMap.FindPathParameters({
+            isAnalyzeById: false,
+            nodes: [new ol.geom.Point([4000, -3000]), new ol.geom.Point([5500, -2500]), new ol.geom.Point([6900, -4000])],
+            hasLeastEdgeCount: false,
+            parameter: analystParameter
+        });
+
+        //进行查找
+        new ol.supermap.NetworkAnalystService(serviceUrl).findPath(findPathParameter, function (serviceResult) {
+            var guideLayerStyle = new ol.style.Style({
+                image: new ol.style.Icon(({
+                    src: '../img/walk.png',
+                    size: [20, 20]
+                }))
+            });
+            var routeLayerStyle = new ol.style.Style({
+                stroke: new ol.style.Stroke({
+                    color: 'rgba(100, 100, 225, 10)',
+                    width: 3
+                }),
+                fill: new ol.style.Fill({
+                    color: 'rgba(0, 0, 255, 0.1)'
+                })
+            });
+            serviceResult.result.pathList.map(function (result) {
+                //添加分析出的路线
+                var routeSource = new ol.source.Vector({
+                    features: (new ol.format.GeoJSON()).readFeatures(result.route)
+                });
+                var pathLayer = new ol.layer.Vector({
+                    source: routeSource,
+                    style: routeLayerStyle
+                });
+                map.addLayer(pathLayer);
+                //添加分析出的引导点
+                var guideSource = new ol.source.Vector({
+                    features: (new ol.format.GeoJSON()).readFeatures(result.pathGuideItems)
+                });
+                var guideLayer = new ol.layer.Vector({
+                    source: guideSource,
+                    style: guideLayerStyle
+                });
+                map.addLayer(guideLayer);
+            });
+        });
+    }
+</script>
+</body>
+</html>

+ 95 - 0
public/supermap/examples/openlayers/05_findServiceAreas.html

@@ -0,0 +1,95 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_serviceAreas"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [5105, -3375],
+                zoom: 4,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj))
+        });
+        map.addLayer(layer);
+        findServiceAreas();
+    });
+
+    function findServiceAreas() {
+        //添加待分析的中心点
+        var point = new ol.geom.Point([5605, -3375]);
+        var iconStyle = new ol.style.Style({
+            image: new ol.style.Icon(({
+                src: '../img/markerbig_select.png'
+            }))
+        });
+        var feature = new ol.Feature(point);
+        feature.setStyle(iconStyle);
+        var pointSource = new ol.source.Vector({
+            features: [feature]
+        });
+        var vectorLayer = new ol.layer.Vector({
+            source: pointSource
+        });
+        map.addLayer(vectorLayer);
+
+        var resultSetting = new SuperMap.TransportationAnalystResultSetting({
+            returnEdgeFeatures: true,
+            returnEdgeGeometry: true,
+            returnEdgeIDs: true,
+            returnNodeFeatures: true,
+            returnNodeGeometry: true,
+            returnNodeIDs: true,
+            returnPathGuides: true,
+            returnRoutes: true
+        });
+        var analystParameter = new SuperMap.TransportationAnalystParameter({
+            resultSetting: resultSetting,
+            weightFieldName: "length"
+        });
+        var parameter = new SuperMap.FindServiceAreasParameters({
+            centers: [point],
+            isAnalyzeById: false,
+            parameter: analystParameter
+        });
+        parameter.weights = [400 + Math.random() * 100];
+
+        new ol.supermap.NetworkAnalystService(serviceUrl).findServiceAreas(parameter, function (serviceResult) {
+            var vectorSource = new ol.source.Vector({
+                features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.serviceAreaList[0].edgeFeatures)
+            });
+            var resultLayer = new ol.layer.Vector({
+                source: vectorSource
+            });
+            map.addLayer(resultLayer);
+        });
+    }
+</script>
+</body>
+</html>

+ 123 - 0
public/supermap/examples/openlayers/05_findTSPPathsService.html

@@ -0,0 +1,123 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_findTSPPathsService"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="stopMarker1">
+    <img src="../img/marker.png"/>
+</div>
+<div id="stopMarker2">
+    <img src="../img/marker.png"/>
+</div>
+<div id="stopMarker3">
+    <img src="../img/marker.png"/>
+</div>
+<script type="text/javascript">
+    var map,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun";
+    //多旅行商分析是无序的路径分析
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [5000, -3700],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        var options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        findTSPPathsProcess();
+    });
+
+    function findTSPPathsProcess() {
+        //添加站点
+        var stopMarker1 = new ol.Overlay({
+            element: document.getElementById('stopMarker1'),
+            positioning: 'center-center',
+            position: [3000, -1000]
+        });
+        var stopMarker2 = new ol.Overlay({
+            element: document.getElementById('stopMarker2'),
+            positioning: 'center-center',
+            position: [3760, -4850]
+        });
+        var stopMarker3 = new ol.Overlay({
+            element: document.getElementById('stopMarker3'),
+            positioning: 'center-center',
+            position: [8000, -2700]
+        });
+        map.addOverlay(stopMarker1);
+        map.addOverlay(stopMarker2);
+        map.addOverlay(stopMarker3);
+
+        //创建多旅行商分析参数实例
+        var resultSetting = new SuperMap.TransportationAnalystResultSetting({
+            returnEdgeFeatures: true,
+            returnEdgeGeometry: true,
+            returnEdgeIDs: true,
+            returnNodeFeatures: true,
+            returnNodeGeometry: true,
+            returnNodeIDs: true,
+            returnPathGuides: true,
+            returnRoutes: true
+        });
+        var analystParameter = new SuperMap.TransportationAnalystParameter({
+            resultSetting: resultSetting,
+            weightFieldName: "length"
+        });
+        var findTSPPathsParameter = new SuperMap.FindTSPPathsParameters({
+            //是否指定终止点
+            endNodeAssigned: false,
+            isAnalyzeById: false,
+            //旅行商分析途经点数组,必设字段
+            nodes: [new ol.geom.Point([3000, -1000]), new ol.geom.Point([3760, -4850]), new ol.geom.Point([8000, -2700])],
+            parameter: analystParameter
+        });
+        //进行查找
+        new ol.supermap.NetworkAnalystService(serviceUrl).findTSPPaths(findTSPPathsParameter, function (serviceResult) {
+            serviceResult.result.tspPathList.map(function (result) {
+                var vectorSource = new ol.source.Vector({
+                    features: (new ol.format.GeoJSON()).readFeatures(result.route)
+                });
+                var resultLayer = new ol.layer.Vector({
+                    source: vectorSource,
+                    style: new ol.style.Style({
+                        stroke: new ol.style.Stroke({
+                            color: 'rgba(100, 100, 225, 10)',
+                            width: 3
+                        }),
+                        fill: new ol.style.Fill({
+                            color: 'rgba(0, 0, 255, 0.1)'
+                        })
+                    })
+                });
+                map.addLayer(resultLayer);
+            });
+        });
+    }
+</script>
+</body>
+</html>

+ 393 - 0
public/supermap/examples/openlayers/06_trafficTransferAnalystService.html

@@ -0,0 +1,393 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_trafficTransfer"></title>
+    <script type="text/javascript" include="bootstrap-css,jquery" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .transferSolution {
+            cursor: pointer;
+            margin: 10px 10px;
+        }
+
+        .transferInfo a {
+            cursor: pointer;
+        }
+
+        table {
+            width: 90%;
+        }
+
+        #trafficRes {
+            margin: 5px;
+        }
+
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            border-radius: 5px;
+            border: 1px solid #cccccc;
+            top: 0;
+            right: 0;
+            min-width: 280px;
+        }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="startMarker">
+    <img src="../img/start_trans.png"/>
+</div>
+<div id="endMarker">
+    <img src="../img/end_trans.png"/>
+</div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var map, startMarker, endMarker, container, content, tempMarker,
+        stopSourceLayer, roadSourceLayer, tempMarkerSourceLayer, tempRedSourceLayer,
+        info, paths = {transSolutions: null, solutions: null},
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-changchun/rest/maps/长春市区图",
+        serviceUrl = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/traffictransferanalyst-sample/restjsr/traffictransferanalyst/Traffic-Changchun";
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(baseUrl).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [4700, -3600],
+                zoom: 2,
+                projection: projection,
+                multiWorld: true
+            })
+        });
+        var options = ol.source.TileSuperMapRest.optionsFromMapJSON(baseUrl, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        stopSourceLayer = new ol.source.Vector();
+        roadSourceLayer = new ol.source.Vector();
+        tempRedSourceLayer = new ol.source.Vector();
+        tempMarkerSourceLayer = new ol.source.Vector();
+        map.addLayer(layer);
+
+        //设置起始、终止点并添加到地图上
+        startMarker = new ol.Overlay({
+            element: document.getElementById('startMarker'),
+            positioning: 'center-center',
+            position: [3111.42533851, -5527.73795456]
+        });
+        endMarker = new ol.Overlay({
+            element: document.getElementById('endMarker'),
+            positioning: 'center-center',
+            position: [6055.3431955, -4270.0725196]
+        });
+        map.addOverlay(startMarker);
+        map.addOverlay(endMarker);
+        initResultInfoWin();
+        execTransSolutionsQuery('LESS_TIME');  //交通换乘的有4种方式:'LESS_TIME','MIN_DISTANCE','LESS_WALK','LESS_TRANSFER'
+    });
+
+    function initResultInfoWin() {
+        container = document.getElementById('popup');
+        content = document.getElementById('popup-content');
+        info = new ol.control.Control({element: container});
+        info.setMap(map);
+        info.update = function (transSolutions, transGuide) {
+            if (!transSolutions) {
+                return;
+            }
+            var solution, lines, line, dispStatus = "block";
+            $("<div class='panel-heading' style='background:steelblue;color: honeydew'>" + resources.text_startPoint + ":" + "省汽修&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + resources.text_endPoint + ":" + "中安大厦<br/>" + resources.text_trafficTransferScheme + "(" + resources.text_minTime + ")</div>").appendTo(content);
+            for (var i = 0, iLen = transSolutions.length; i < iLen; i++) {
+                solution = transSolutions[i];
+                //显示方案头
+                var title = "";
+                for (var ii = 0, iiLen = solution.linesItems.length; ii < iiLen; ii++) {
+                    lines = solution.linesItems[ii];
+                    for (var iii = 0, iiiLen = lines.lineItems.length; iii < iiiLen; iii++) {
+                        line = lines.lineItems[iii];
+                        if (iii !== iiiLen - 1) {
+                            title += line.lineName + "/";
+                        } else {
+                            title += line.lineName;
+                        }
+                    }
+                    if (ii !== iiLen - 1) {
+                        title += " → ";
+                    }
+                }
+                $("<div class='transferSolution' id='transferSolution-" + i + "'><span class='transferIndex'>" + resources.text_scheme + (i + 1) + ":</span>" + title + "</div>").appendTo(content);
+                if (i !== 0) {
+                    dispStatus = "none";
+                }
+                var list = $("<div class='transferInfo' id='transferInfo-" + i + "' style='display:" + dispStatus + "'></div>");
+                list.appendTo(content);
+                //默认显示方案1下的table
+                if (i === 0) {
+                    fillTransferInfo(transGuide, transSolutions, 0).appendTo(list);
+                    setPopup();
+                }
+            }
+            //点击方案时显示对应的table
+            bindSolutionsClickEvent();
+        };
+        map.addControl(info);
+    }
+
+    function execTransSolutionsQuery(tactic) {
+        paths.points = [26, 180];
+        var params = new SuperMap.TransferSolutionParameters({
+            solutionCount: 6,        //最大换乘导引数量
+            transferTactic: tactic,  //公交换乘策略类型
+            walkingRatio: 10,        //步行与公交的消耗权重比
+            points: paths.points     //起始点坐标
+        });
+        new ol.supermap.TrafficTransferAnalystService(serviceUrl)
+            .analysisTransferSolution(params, function (serviceResult) {
+                transferSolutionsSucceed(serviceResult.result);
+            });
+    }
+
+    function transferSolutionsSucceed(result) {
+        clearLayer();
+        //在地图上叠加符号信息
+        var transGuide = result.defaultGuide,
+            transSolutions = result.solutionItems,
+            solutions = [];
+        for (var j = 0; j < transSolutions.length; j++) {
+            var linesItems = transSolutions[j].linesItems, transSolution = [];
+            for (var jj = 0; jj < linesItems.length; jj++) {
+                var lineItems = linesItems[jj].lineItems, items = [];
+                for (var jjj = 0; jjj < lineItems.length; jjj++) {
+                    var lineItem = lineItems[jjj];
+                    items.push(lineItem
+                    );
+                }
+                transSolution.push(items);
+            }
+            solutions.push(transSolution);
+        }
+        paths["transSolutions"] = transSolutions;
+        paths["solutions"] = solutions;
+        if (!transGuide || !transSolutions) return;
+        info.update(transSolutions, transGuide);
+    }
+
+    function fillTransferInfo(transGuide, transSolutions, indexX) {
+        clearLayer();
+        //在地图上显示路线
+        if (transGuide && transGuide.items.length) {
+            var items = transGuide.items;
+            for (var itemIndex = 0, itemLen = items.length; itemIndex < itemLen; itemIndex++) {
+                var geometry = items[itemIndex].route;
+                var pointsList = [];
+                for (var k = 0; k < geometry.points.length; k++) {
+                    pointsList.push([geometry.points[k].x, geometry.points[k].y]);
+                }
+                var roadLine = new ol.geom.LineString(pointsList);
+                roadSourceLayer.addFeatures([new ol.Feature(roadLine)]);
+                var roadResultLayer = new ol.layer.Vector({
+                    source: roadSourceLayer,
+                    style: new ol.style.Style({
+                        stroke: new ol.style.Stroke({
+                            color: 'dodgerblue',
+                            width: 3
+                        })
+                    })
+                });
+                map.addLayer(roadResultLayer);
+            }
+        }
+        var table = $("<table id='trafficRes' border='1'></table>");
+        var startStop = $("<tr></tr>");
+        $("<td class='start_transfer' width='10px'></td>").appendTo(startStop);
+        $("<td colspan='2'><span class='busLink bgSpan'><span style='display:none'>" + transGuide.items[0].startPosition.x + "," + transGuide.items[0].startPosition.y + "</span>" + transGuide.items[0].startStopName + "</span></td>").appendTo(startStop);
+        startStop.appendTo(table);
+        var indexY = 0;
+        for (var m = 0, mLen = transGuide.items.length; m < mLen; m++) {
+            var item = transGuide.items[m];
+            var tr2 = $("<tr></tr>");
+            if (item.isWalking) {
+                $("<td class='step_transfer' ></td>").appendTo(tr2);
+                $("<td>" + resources.text_walkTO + "<a class='busLink'><span style='display:none'>" + item.endPosition.x + "," + item.endPosition.y + "</span>" + item.endStopName + "</a></td>").appendTo(tr2);
+                $("<td>" + parseInt(item.distance) + resources.msg_m + "</td>").appendTo(tr2);
+            } else {
+                var otherLines = transSolutions[indexX].linesItems[indexY],
+                    links = "";
+                if (otherLines && otherLines.lineItems.length > 1) {
+                    links = "</br>" + resources.text_alsoRide;
+                    for (var oti = 0, otLen = otherLines.lineItems.length; oti < otLen; oti++) {
+                        var line = otherLines.lineItems[oti];
+                        if (item.lineName !== line.lineName) {
+                            var other = indexX + "," + indexY + "," + oti + ",0";
+                            links += "<a class='busLink'><span style='display:none'>" + other + "</span>" + line.lineName + "</a>";
+                        }
+                    }
+                }
+                $("<td class='bus_transfer'></td>").appendTo(tr2);
+                var points = item.route.points, pointStr = "";
+                for (var i = 0; i < points.length; i++) {
+                    pointStr += points[i].x + " " + points[i].y;
+                    if (i != points.length - 1) {
+                        pointStr += ",";
+                    }
+                }
+                $("<td>" + resources.text_ride + "<a class='busLink'>" + item.lineName + "<span style='display:none'>" + pointStr + "</span></a>" + resources.text_debus1 + "<a class='busLink'><span style='display:none'>" + item.endPosition.x + "," + item.endPosition.y + "</span>" + item.endStopName + "</a>" + resources.text_debus2 + links + "</td>").appendTo(tr2);
+                $("<td>" + item.passStopCount + resources.text_stops + "</td>").appendTo(tr2);
+                indexY++;
+            }
+            tr2.appendTo(table);
+        }
+        var endStop = $("<tr></tr>");
+        endStop.appendTo(table);
+        $("<td class='end_transfer' width='10px'></td>").appendTo(endStop);
+        $("<td colspan='2'><span class='busLink bgSpan'><span style='display:none'>" + transGuide.items[transGuide.items.length - 1].endPosition.x + "," + transGuide.items[transGuide.items.length - 1].endPosition.y + "</span>" + transGuide.items[transGuide.items.length - 1].endStopName + "</span></td>").appendTo(endStop);
+        return table;
+    }
+
+    function bindSolutionsClickEvent() {
+        for (var i = 0; i < 6; i++) {
+            $("#transferSolution-" + i).click(toggleGuideItems);
+        }
+
+        function toggleGuideItems(e) {
+            for (var j = 0; j < 6; j++) {
+                $("#transferInfo-" + j).hide(500);
+            }
+            var id = parseInt(e.currentTarget.id.split("-")[1]);
+            $("#transferInfo-" + id).show(500);
+            //构造传入iServer服务器的transferLines
+            var transLines = [];
+            for (var i = 0; i < paths.solutions[id].length; i++) {
+                var trans = paths.solutions[id][i][0];
+                transLines.push(trans);
+            }
+            execTransPathQuery(id, transLines);
+        }
+    }
+
+    //在popup里点击每个站点、交通路线时,在地图上对应显示并进行强调
+    function setPopup() {
+        $(".busLink").click(function () {
+            if (tempMarkerSourceLayer) {
+                tempMarkerSourceLayer.clear();
+            }
+            if (tempRedSourceLayer) {
+                tempRedSourceLayer.clear();
+            }
+            var points = this.children[0].innerText.split(",");
+            //添加换乘点的marker
+            if (points.length === 2) {
+                tempMarker = new ol.geom.Point([points[0], points[1]]);
+                var iconStyle_marker = new ol.style.Style({
+                    image: new ol.style.Icon(({
+                        src: '../img/marker.png',
+                        anchor: [0.5, 1]
+                    }))
+                });
+                var tempMarkerFeature = new ol.Feature(tempMarker);
+                tempMarkerFeature.setStyle(iconStyle_marker);
+                tempMarkerSourceLayer.addFeatures([tempMarkerFeature]);
+                var markerLayer = new ol.layer.Vector({
+                    source: tempMarkerSourceLayer
+                });
+                map.addLayer(markerLayer);
+                var coords = tempMarker.getCoordinates();
+                map.getView().setCenter([parseInt(coords[0]), parseInt(coords[1])]);
+                map.getView().setZoom(3)
+            } else if (points.length === 4 && points[3] === "0") {
+                var linesItems = paths["solutions"][points[0]], lineStr = "[";
+                for (var i = 0; i < linesItems.length; i++) {
+                    var lineItem = linesItems[i][0], j = parseInt(points[1]);
+                    if (i !== j) {
+                        lineStr += lineItem;
+                    } else if (i === j) {
+                        lineItem = linesItems[points[1]][points[2]];
+                        lineStr += lineItem;
+                    }
+                    if (i !== linesItems.length - 1) {
+                        lineStr += ",";
+                    }
+                }
+                lineStr += "]";
+                $("#transferInfo-" + points[0]).hide(500);
+                execTransPathQuery(points[0], lineStr);
+                $("#transferInfo-" + points[0]).show(500);
+            } else {
+                var linePoints = [];
+                for (var i = 0; i < points.length; i++) {
+                    var arr = points[i].split(" ");
+                    var point = [parseInt(arr[0]), parseInt(arr[1])];
+                    linePoints.push(point);
+                }
+                var lineString = new ol.geom.LineString(linePoints);
+                tempRedSourceLayer.addFeatures([new ol.Feature(lineString)]);
+                var tempRedLayer = new ol.layer.Vector({
+                    source: tempRedSourceLayer,
+                    style: new ol.style.Style({
+                        stroke: new ol.style.Stroke({
+                            color: 'red',
+                            width: 6
+                        })
+                    })
+                });
+                map.addLayer(tempRedLayer);
+                //设置线路中心
+                var lineCenter = [];
+                if ((linePoints.length) % 2 == 0) {
+                    lineCenter = [linePoints[linePoints.length / 2][0], linePoints[linePoints.length / 2][1]];
+                    map.getView().setCenter([parseInt(lineCenter[0]), parseInt(lineCenter[1])]);
+                } else {
+                    lineCenter = [linePoints[(linePoints.length + 1) / 2][0], linePoints[(linePoints.length + 1) / 2][1]];
+                    map.getView().setCenter([parseInt(lineCenter[0]), parseInt(lineCenter[1])]);
+                }
+                map.getView().setZoom(3);
+            }
+        });
+    }
+
+    function execTransPathQuery(id, transLines) {
+        var params = new SuperMap.TransferPathParameters({
+            points: paths["points"],
+            transferLines: transLines
+        });
+        new ol.supermap.TrafficTransferAnalystService(serviceUrl)
+            .analysisTransferPath(params, function (serviceResult) {
+                $("#transferInfo-" + id).empty();
+                var transGuide = serviceResult.result;
+                transSolutions = paths["transSolutions"];
+                map.getView().setCenter([4700, -3600]);
+                map.getView().setZoom(2);
+                fillTransferInfo(transGuide, transSolutions, id).appendTo($("#transferInfo-" + id));
+                setPopup();
+            });
+    }
+
+    function clearLayer() {
+        if (roadSourceLayer) {
+            roadSourceLayer.clear();
+        }
+        if (tempMarkerSourceLayer) {
+            tempMarkerSourceLayer.clear();
+        }
+        if (tempRedSourceLayer) {
+            tempRedSourceLayer.clear();
+        }
+    }
+</script>
+</body>
+</html>

+ 90 - 0
public/supermap/examples/openlayers/07_AnimationFeature.html

@@ -0,0 +1,90 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_AnimationFeature"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China_4326";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [103, 30],
+                zoom: 4,
+                projection: 'EPSG:4326',
+                multiWorld: true
+            })
+        });
+        var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+
+        function addRandomFeature() {
+            var xmax = 130, xmin = 80, ymax = 50, ymin = 20;
+            var feature = new ol.Feature(new ol.geom.Point([Math.floor(Math.random() * (xmax - xmin + 1) + xmin), Math.floor(Math.random() * (ymax - ymin + 1) + ymin)]));
+            source.addFeature(feature);
+        }
+
+        function flash(feature) {
+            var start = new Date().getTime();
+            var listenerKey;
+
+            function animate(event) {
+                var duration = 3000;
+                // ol6 废除了 event.vectorContext 接口,通过 ol.render.getVectorContext 来获取 vectorContext
+                var vectorContext = new ol.render.getVectorContext(event);
+                var frameState = event.frameState;
+                var flashGeom = feature.getGeometry().clone();
+                var elapsed = frameState.time - start;
+                var elapsedRatio = elapsed / duration;
+                var radius = ol.easing.easeOut(elapsedRatio) * 25 + 5;
+                var opacity = ol.easing.easeOut(1 - elapsedRatio);
+                var style = new ol.style.Style({
+                    image: new ol.style.Circle({
+                        radius: radius,
+                        stroke: new ol.style.Stroke({
+                            color: 'rgba(255, 0, 0, ' + opacity + ')',
+                            width: 0.25 + opacity
+                        })
+                    })
+                });
+                vectorContext.setStyle(style);
+                vectorContext.drawGeometry(flashGeom);
+                if (elapsed > duration) {
+                    ol.Observable.unByKey(listenerKey);
+                    return;
+                }
+                map.render();
+            }
+
+            listenerKey = vector.on('postrender', animate);
+        }
+
+        var source = new ol.source.Vector({
+            wrapX: false
+        });
+        source.on('addfeature', function (e) {
+            flash(e.feature);
+        });
+        var vector = new ol.layer.Vector({
+            source: source
+        });
+        map.addLayer(vector);
+        window.setInterval(addRandomFeature, 1000);
+    });
+</script>
+</body>
+</html>

+ 99 - 0
public/supermap/examples/openlayers/07_Cluster.html

@@ -0,0 +1,99 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_Cluster"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <!-- 此范例基于 openlayers@4.6.5 版本 -->
+    <script type="text/javascript" include="animatedclusterlayer,ol@4.6.5" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China_4326";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [103, 30],
+                zoom: 4,
+                projection: 'EPSG:4326'
+            })
+        });
+        var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+
+        var clusterSource = new ol.source.Cluster({
+            distance: 40,
+            source: new ol.source.Vector(),
+            wrapX: false
+        });
+        var clusterLayer = new ol.layer.AnimatedCluster({
+            name: 'Cluster',
+            source: clusterSource,
+            animationDuration: 700,
+            style: getStyle
+        });
+        map.addLayer(clusterLayer);
+
+        function addFeatures(nb) {
+            var features = [];
+            var xmax = 130, xmin = 80, ymax = 50, ymin = 20;
+            for (var i = 0; i < nb; ++i) {
+                features[i] = new ol.Feature(new ol.geom.Point([Math.floor(Math.random() * (xmax - xmin + 1) + xmin), Math.floor(Math.random() * (ymax - ymin + 1) + ymin)]));
+                features[i].set('id', i);
+            }
+            clusterSource.getSource().clear();
+            clusterSource.getSource().addFeatures(features);
+        }
+
+        addFeatures(2000);
+
+
+    });
+
+    function getStyle(feature) {
+        var styleCache = {};
+        var size = feature.get('features').length;
+        var style = styleCache[size];
+        if (!style) {
+            var color = size > 25 ? "192,0,0" : size > 8 ? "255,128,0" : "0,128,0";
+            var radius = Math.max(8, Math.min(size * 0.75, 20));
+            var dash = 2 * Math.PI * radius / 6;
+            dash = [0, dash, dash, dash, dash, dash, dash];
+            style = styleCache[size] = [new ol.style.Style({
+                image: new ol.style.Circle({
+                    radius: radius,
+                    stroke: new ol.style.Stroke({
+                        color: "rgba(" + color + ",0.5)",
+                        width: 15,
+                        lineDash: dash,
+                        lineCap: "butt"
+                    }),
+                    fill: new ol.style.Fill({
+                        color: "rgba(" + color + ",1)"
+                    })
+                }),
+                text: new ol.style.Text({
+                    text: size.toString(),
+                    fill: new ol.style.Fill({
+                        color: '#fff'
+                    })
+                })
+            })
+            ];
+        }
+        return style;
+    }
+</script>
+</body>
+</html>

+ 54 - 0
public/supermap/examples/openlayers/07_HeatMap.html

@@ -0,0 +1,54 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_heatMap"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China_4326";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [112, 35],
+                zoom: 5,
+                projection: 'EPSG:4326',
+                multiWorld: true
+            })
+        });
+        var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        //创建热力图
+        var heatPoints = [];
+        var radius = 25;
+        var blur = 40;
+        var xmax = 130, xmin = 80, ymax = 50, ymin = 20;
+        for (var i = 0; i < 100; i++) {
+            heatPoints[i] = new ol.Feature(new ol.geom.Point([Math.floor(Math.random() * (xmax - xmin + 1) + xmin), Math.floor(Math.random() * (ymax - ymin + 1) + ymin)]));
+        }
+        var heatMap = new ol.layer.Heatmap({
+            source: new ol.source.Vector({
+                features: heatPoints,
+                wrapX: false
+            }),
+            blur: blur,
+            radius: radius
+        });
+        map.addLayer(heatMap);
+    });
+</script>
+</body>
+</html>

+ 169 - 0
public/supermap/examples/openlayers/07_graphiclayer_canvas.html

@@ -0,0 +1,169 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html lang="en-US">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title data-i18n="resources.title_graphiclayerCanvas"></title>
+    <script type="text/javascript" include="randomcolor,papaparse,widgets" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 50px;
+        }
+
+        .ol-popup:after,
+        .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+    </style>
+</head>
+
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+    <div id="map" style="width: 100%;height:100%"></div>
+    <div id="popup" class="ol-popup">
+        <div id="popup-content"></div>
+    </div>
+    <script type="text/javascript">
+        var url = (window.isLocal ? window.server : "https://iserver.supermap.io") +
+            "/iserver/services/map-china400/rest/maps/ChinaDark";
+        var container = document.getElementById('popup');
+        var content = document.getElementById('popup-content');
+        var overlay = new ol.Overlay(({
+            element: container,
+            autoPan: true,
+            autoPanAnimation: {
+                duration: 250
+            }
+        }));
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({
+                    attributionOptions: {
+                        collapsed: false
+                    }
+                })
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: ol.proj.transform([-73.9286, 40.75], 'EPSG:4326', 'EPSG:3857'),
+                zoom: 12,
+                projection: 'EPSG:3857',
+                multiWorld: true
+            }),
+            overlays: [overlay]
+        });
+
+        var colorCount = 10;
+        var colors = getRandomColors(colorCount);
+        widgets.loader.showLoader();
+        $.get('../data/nyc_taxi_18W.csv', function (nycData) {
+            new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+                var mapJSONObj = serviceResult.result;
+                var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+                var layer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest(options)
+                });
+                map.addLayer(layer);
+
+                var randomCircleStyles = [];
+                for (var i = 0; i < colorCount; i++) {
+                    randomCircleStyles.push(new ol.style.RegularShape({
+                        radius: Math.floor(Math.random() * 10 + 1),
+                        fill: new ol.style.Fill({
+                            color: colors[i]
+                        }),
+                        stroke: new ol.style.Stroke({
+                            color: colors[i]
+                        }),
+                        points: 3,
+                    }));
+                }
+                var features = Papa.parse(nycData, {
+                    skipEmptyLines: true,
+                    header: true
+                }).data;
+
+                var count = features.length; //矢量点的个数
+                var graphics = new Array(count);
+                for (var i = 0; i < count; ++i) {
+                    var coordinates = [Number(features[i].X), Number(features[i].Y)];
+                    if (coordinates[0] === coordinates[1]) {
+                        continue;
+                    }
+                    coordinates = ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857');
+                    graphics[i] = new ol.Graphic(new ol.geom.Point(coordinates));
+                    graphics[i].setStyle(randomCircleStyles[Math.floor(Math.random() * colorCount)]);
+                }
+                map.once('postrender', function () {
+                    var source = new ol.source.Graphic({
+                        graphics: graphics,
+                        render: "canvas",
+                        map: map,
+                        onClick: function (graphic) {
+                            if (graphic) {
+                                var coords = graphic.getGeometry().getCoordinates();
+                                content.innerHTML = resources.text_coordinate + ":[" + coords[0] + "," + coords[1] + "]";
+                                overlay.setPosition(graphic.getGeometry().getCoordinates());
+                                return;
+                            }
+                            overlay.setPosition(undefined);
+                        }
+                    })
+                    var graphicLayer = new ol.layer.Image({
+                        source: source
+                    });
+                    map.addLayer(graphicLayer);
+                    widgets.loader.removeLoader();
+                });
+
+            });
+
+
+        });
+
+        function getRandomColors(count) {
+            return randomColor({
+                luminosity: 'bright',
+                hue: 'random',
+                alpha: 0.5,
+                format: 'rgba',
+                count: count
+            });
+        }
+    </script>
+</body>
+
+</html>

+ 155 - 0
public/supermap/examples/openlayers/07_graphiclayer_circle.html

@@ -0,0 +1,155 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title data-i18n="resources.title_graphiclayerWebgl"></title>
+    <script type="text/javascript" include="randomcolor,papaparse,widgets" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 50px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-china400/rest/maps/ChinaDark",
+        container = document.getElementById('popup'),
+        content = document.getElementById('popup-content'),
+        overlay = new ol.Overlay(({
+            element: container,
+            autoPan: true,
+            autoPanAnimation: {
+                duration: 250
+            }
+        })),
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: ol.proj.transform([-73.9286, 40.75], 'EPSG:4326', 'EPSG:3857'),
+                zoom: 12,
+                projection: 'EPSG:3857',
+                multiWorld: true
+            }),
+            overlays: [overlay]
+        });
+
+    var colorCount = 10;
+    var colors = getRandomColors(colorCount);
+    loadData();
+
+    function loadData() {
+        widgets.loader.showLoader();
+        $.get('../data/nyc_taxi_18W.csv', function (nycData) {
+            new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+                var mapJSONObj = serviceResult.result;
+                var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+                var layer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest(options)
+                });
+                map.addLayer(layer);
+
+                var randomCircleStyles = [];
+                for (var i = 0; i < colorCount; i++) {
+                    randomCircleStyles.push(new ol.style.Circle({
+                        radius: Math.floor(Math.random() * 3 + 1),
+                        fill: new ol.style.Fill({
+                            color: colors[i]
+                        }),
+                        stroke: new ol.style.Stroke({
+                            color: colors[i]
+                        }),
+                    }));
+                }
+                var features = Papa.parse(nycData, {skipEmptyLines: true, header: true}).data;
+                var count = features.length;    //矢量点的个数
+                var graphics = new Array(count);
+                for (var i = 0; i < count; ++i) {
+                    var coordinates = [Number(features[i].X), Number(features[i].Y)];
+                    if (coordinates[0] === coordinates[1]) {
+                        continue;
+                    }
+                    coordinates = ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857');
+                    graphics[i] = new ol.Graphic(new ol.geom.Point(coordinates));
+                    graphics[i].setStyle(randomCircleStyles[Math.floor(Math.random() * colorCount)]);
+                }
+                map.once('postrender', function () {
+                    var graphicLayer = new ol.layer.Image({
+                        source: new ol.source.Graphic({
+                            graphics: graphics,
+                            render: "canvas",
+                            map: map,
+                            onClick: function (graphic) {
+                                if (graphic) {
+                                    var coords = graphic.getGeometry().getCoordinates();
+                                    content.innerHTML = resources.text_coordinate + ":[" + coords[0] + "," + coords[1] + "]";
+                                    overlay.setPosition(graphic.getGeometry().getCoordinates());
+                                    return;
+                                }
+                                overlay.setPosition(undefined);
+                            }
+                        })
+                    });
+                    map.addLayer(graphicLayer);
+                    widgets.loader.removeLoader();
+                })
+            });
+        });
+    }
+
+    function getRandomColors(count) {
+        return randomColor({
+            luminosity: 'bright',
+            hue: 'random',
+            alpha: 0.5,
+            format: 'rgba',
+            count: count
+        });
+    }
+</script>
+</body>
+</html>

+ 168 - 0
public/supermap/examples/openlayers/07_graphiclayer_clover.html

@@ -0,0 +1,168 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html lang="en-US">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title data-i18n="resources.title_graphicLayerClovers"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 50px;
+        }
+
+        .ol-popup:after,
+        .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+    </style>
+</head>
+
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+    <div id="map" style="width: 100%;height:100%"></div>
+    <div id="popup" class="ol-popup">
+        <div id="popup-content"></div>
+    </div>
+    <script type="text/javascript">
+        var url = (window.isLocal ? window.server : "https://iserver.supermap.io") +
+            "/iserver/services/map-china400/rest/maps/China_4326";
+        //初始化各种参数
+        var count = 180000;
+        var graphics = [];
+        var e = 60;
+        var clovers = [];
+        var radius = [10, 14, 18];
+        var styles = [{
+            angle: 60,
+            count: 3
+        }, {
+            angle: 45,
+            count: 4
+        }, {
+            angle: 30,
+            count: 6
+        }];
+        //三叶草样式的种类
+        var randCount = 9;
+        var symbolCount = radius.length * styles.length;
+
+
+        new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+            var mapJSONObj = serviceResult.result;
+            var container = document.getElementById('popup');
+            var content = document.getElementById('popup-content');
+            var overlay = new ol.Overlay(({
+                element: container,
+                autoPan: true,
+                autoPanAnimation: {
+                    duration: 250
+                }
+            }));
+            var map = new ol.Map({
+                target: 'map',
+                controls: ol.control.defaults({
+                        attributionOptions: {
+                            collapsed: false
+                        }
+                    })
+                    .extend([new ol.supermap.control.Logo()]),
+                view: new ol.View({
+                    center: [0, 0],
+                    zoom: 7,
+                    projection: 'EPSG:4326',
+                    multiWorld: true
+                }),
+                overlays: [overlay]
+            });
+            var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+            var layer = new ol.layer.Tile({
+                source: new ol.source.TileSuperMapRest(options)
+            });
+            map.addLayer(layer);
+
+
+            //创建三叶草样式
+            for (var i = 0; i < radius.length; i++) {
+                for (var j = 0; j < styles.length; j++) {
+                    clovers.push(
+
+                        new ol.style.CloverShape({
+                            radius: radius[i],
+                            angle: styles[j].angle,
+                            count: styles[j].count,
+                            stroke: new ol.style.Stroke({
+                                color: "rgba(0,166,0,1)",
+                            }),
+                            fill: new ol.style.Fill({
+                                color: "rgba(0,200,0,0.6)",
+                            }),
+                        })
+                    );
+                }
+            }
+
+            //设置每个点的经纬度和传入三叶草样式
+            for (var i = 0; i < count; i++) {
+                var coordinates = [2 * e * Math.random() - e, 2 * e * Math.random() - e];
+                graphics[i] = new ol.Graphic(new ol.geom.Point(coordinates));
+                graphics[i].setStyle(clovers[Math.floor(Math.random() * randCount)]);
+            }
+
+            map.once('postrender', function () {
+                var graphicLayer = new ol.layer.Image({
+                    source: new ol.source.Graphic({
+                        graphics: graphics,
+                        render:"canvas",
+                        map: map,
+                        onClick: function (graphic) {
+                            if (graphic) {
+                              var coords = graphic.getGeometry().getCoordinates();
+                                content.innerHTML = resources.text_coordinate + ":[" + coords[0] + "," + coords[1] + "]";
+                                overlay.setPosition(coords);
+                                return;
+                            }
+                            overlay.setPosition(undefined);
+                        }
+                    })
+                });
+                map.addLayer(graphicLayer);
+            })
+        });
+    </script>
+</body>
+
+</html>

+ 82 - 0
public/supermap/examples/openlayers/07_graphiclayer_image.html

@@ -0,0 +1,82 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title data-i18n="resources.title_graphicLayerTaxi"></title>
+    <script type="text/javascript" include="papaparse,widgets" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-china400/rest/maps/ChinaDark",
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: ol.proj.transform([-73.9286, 40.75], 'EPSG:4326', 'EPSG:3857'),
+                zoom: 12,
+                projection: 'EPSG:3857',
+                multiWorld: true
+            })
+        });
+
+    loadData();
+
+    function loadData() {
+        widgets.loader.showLoader();
+        $.get('../data/nyc_taxi_18W.csv', function (nycData) {
+            new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+                widgets.loader.removeLoader();
+                var mapJSONObj = serviceResult.result;
+                var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+                var layer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest(options)
+                });
+                map.addLayer(layer);
+
+                var img = new Image();
+                img.src = '../img/taxi.png';
+                img.onload = function () {
+                    var imageStyle = new ol.style.Icon(({
+                        img: this,
+                        size: [32, 32],
+                        imgSize: [32, 32]
+                    }));
+                    var features = Papa.parse(nycData, {skipEmptyLines: true, header: true}).data;
+                    var counts = features.length;    //矢量点的个数
+                    var graphics = new Array(counts);
+
+
+                    for (var i = 0; i < counts; ++i) {
+                        var coordinates = [Number(features[i].X), Number(features[i].Y)];
+                        if (coordinates[0] === coordinates[1]) {
+                            continue;
+                        }
+                        coordinates = ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857');
+                        graphics[i] = new ol.Graphic(new ol.geom.Point(coordinates));
+                        graphics[i].setStyle(imageStyle);
+                    }
+                    map.once('postrender', function () {
+                        var graphicLayer = new ol.layer.Image({
+                            source: new ol.source.Graphic({
+                                graphics: graphics,
+                                render: "canvas",
+                                map: map
+                            })
+                        });
+                        map.addLayer(graphicLayer);
+                    })
+                }
+            });
+        });
+    }
+</script>
+</body>
+</html>

+ 155 - 0
public/supermap/examples/openlayers/07_graphiclayer_webgl.html

@@ -0,0 +1,155 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title data-i18n="resources.title_graphiclayerWebgl"></title>
+    <script type="text/javascript" include="randomcolor,papaparse,widgets" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 50px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-china400/rest/maps/ChinaDark",
+        container = document.getElementById('popup'),
+        content = document.getElementById('popup-content'),
+        overlay = new ol.Overlay(({
+            element: container,
+            autoPan: true,
+            autoPanAnimation: {
+                duration: 250
+            }
+        })),
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: ol.proj.transform([-73.9286, 40.75], 'EPSG:4326', 'EPSG:3857'),
+                zoom: 12,
+                projection: 'EPSG:3857',
+                multiWorld: true
+            }),
+            overlays: [overlay]
+        });
+
+    var colorCount = 10;
+    var colors = getRandomColors(colorCount);
+    loadData();
+
+    function loadData() {
+        widgets.loader.showLoader();
+        $.get('../data/nyc_taxi_18W.csv', function (nycData) {
+            new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+                var mapJSONObj = serviceResult.result;
+                var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+                var layer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest(options)
+                });
+                map.addLayer(layer);
+
+                var randomCircleStyles = [];
+                for (var i = 0; i < colorCount; i++) {
+                    randomCircleStyles.push(new ol.style.Circle({
+                        radius: Math.floor(Math.random() * 3 + 1),
+                        fill: new ol.style.Fill({
+                            color: colors[i]
+                        }),
+                        stroke: new ol.style.Stroke({
+                            color: colors[i]
+                        }),
+                    }));
+                }
+                var features = Papa.parse(nycData, {skipEmptyLines: true, header: true}).data;
+                var count = features.length;    //矢量点的个数
+                var graphics = new Array(count);
+                for (var i = 0; i < count; ++i) {
+                    var coordinates = [Number(features[i].X), Number(features[i].Y)];
+                    if (coordinates[0] === coordinates[1]) {
+                        continue;
+                    }
+                    coordinates = ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857');
+                    graphics[i] = new ol.Graphic(new ol.geom.Point(coordinates));
+                    graphics[i].setStyle(randomCircleStyles[Math.floor(Math.random() * colorCount)]);
+                }
+                map.once('postrender', function () {
+                    var graphicLayer = new ol.layer.Image({
+                        source: new ol.source.Graphic({
+                            graphics: graphics,
+                            render: "canvas",
+                            map: map,
+                            onClick: function (graphic) {
+                                if (graphic) {
+                                    var coords = graphic.getGeometry().getCoordinates();
+                                    content.innerHTML = resources.text_coordinate + ":[" + coords[0] + "," + coords[1] + "]";
+                                    overlay.setPosition(graphic.getGeometry().getCoordinates());
+                                    return;
+                                }
+                                overlay.setPosition(undefined);
+                            }
+                        })
+                    });
+                    map.addLayer(graphicLayer);
+                    widgets.loader.removeLoader();
+                })
+            });
+        });
+    }
+
+    function getRandomColors(count) {
+        return randomColor({
+            luminosity: 'bright',
+            hue: 'random',
+            alpha: 0.5,
+            format: 'rgba',
+            count: count
+        });
+    }
+</script>
+</body>
+</html>

+ 213 - 0
public/supermap/examples/openlayers/07_graphiclayer_webgl2.html

@@ -0,0 +1,213 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title data-i18n="resources.title_graphicLayer_webgl"></title>
+
+    <style>
+
+        #title {
+            position: absolute;
+            color: white;
+            text-align: center;
+            width: 600px;
+            left: 0; 
+            top: 0; 
+            right: 0; 
+            margin: auto
+        }
+
+        #title > h3 {
+            margin: 10px 0;
+            letter-spacing: 0.1em;
+        }
+
+        #title > h6 {
+            margin: 0;
+            font-weight: normal;
+        }
+
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 50px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+
+        .ol-panel {
+            position: absolute;
+            top: .5em;
+            right:0;
+            z-index: 10;
+        }
+
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+
+<div id="popup" class="ol-popup">
+    <div id="popup-content"></div>
+</div>
+<div id="title">
+    <h3 data-i18n="resources.text_graphicLayer_title"></h3>
+    <h6 data-i18n="resources.text_graphicLayer_subTitle"></h6>
+</div>
+<div id="control" class="ol-panel"></div>
+<script type="text/javascript" include="papaparse,dat-gui,widgets" src="../js/include-web.js"></script>
+<script type="text/javascript" include="deck" src="../../dist/ol/include-ol.js"></script>
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-china400/rest/maps/ChinaDark";
+
+    var map, overlay, graphicLayer;
+
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        var container = document.getElementById('popup');
+        overlay = new ol.Overlay(({
+            element: container,
+            autoPan: true,
+            autoPanAnimation: {
+                duration: 250
+            }
+        }));
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: ol.proj.transform([-73.9286, 40.75], 'EPSG:4326', 'EPSG:3857'),
+                zoom: 11,
+                projection: 'EPSG:3857',
+                multiWorld: true
+            }),
+            overlays: [overlay]
+        });
+        var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(options)
+        });
+        map.addLayer(layer);
+        // var raster = new ol.layer.Tile({
+        //     source: new ol.source.OSM()
+        // });
+        // map.addLayer(raster);
+
+        widgets.loader.showLoader("data loading...");
+        Papa.parse('../data/nyc-taxi.csv', {
+            download: true,
+            skipEmptyLines: true,
+            header: true,
+            error: function () {
+                widgets.loader.removeLoader();
+                alert("parse error")
+            },
+            complete: function (results) {
+                widgets.loader.removeLoader();
+                addGraphicLayer(results.data);
+            }
+        });
+
+    });
+
+    function addGraphicLayer(data) {
+        var graphics = [], count = data.length;
+
+        for (var i = 0; i < count; ++i) {
+            var coods = data[i];
+            var coordinates = [parseFloat(coods.lng), parseFloat(coods.lat)];
+            if (coordinates[0] === coordinates[1]) {
+                continue;
+            }
+            coordinates = ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857');
+            graphics[i] = new ol.Graphic(new ol.geom.Point(coordinates));
+        }
+        var graphicStyle = {
+            color: [0, 255, 128, 255],
+            highlightColor: [255, 0, 0, 255],
+            radius: 0.5
+        };
+        map.once('postrender', function () {
+            var content = document.getElementById('popup-content');
+            graphicLayer = new ol.layer.Image({
+                source: new ol.source.Graphic({
+                    render: "webgl",
+                    graphics: graphics,
+                    color: graphicStyle.color,
+                    highlightColor: graphicStyle.highlightColor,
+                    radius: graphicStyle.radius,
+
+                    map: map,
+                    onClick: function (graphic) {
+                        if (graphic) {
+                            var coords = graphic.lngLat;
+                            content.innerHTML = resources.text_coordinate + ":[" + coords[0] + "," + coords[1] + "]";
+                            overlay.setPosition(ol.proj.transform(coords, 'EPSG:4326', 'EPSG:3857'));
+                            return;
+                        }
+                        overlay.setPosition(undefined);
+                    }
+                })
+            });
+            map.addLayer(graphicLayer);
+        });
+        initDatGui(graphicStyle)
+    }
+
+    //设置面板
+    function initDatGui(options) {
+
+        var gui = new dat.GUI();
+
+        var popup = document.getElementById('control');
+        popup.appendChild(gui.domElement);
+        var control = new ol.control.Control({element: popup});
+        control.setMap(map);
+        map.addControl(control);
+
+        gui.addColor(options, 'color').onChange(finished);
+        gui.add(options, 'radius', 0, 2).onChange(finished);
+
+        function finished() {
+            graphicLayer.getSource().setStyle(options);
+        }
+    }
+
+</script>
+</body>
+</html>

+ 203 - 0
public/supermap/examples/openlayers/SummaryMeshJobService.html

@@ -0,0 +1,203 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_SummaryMeshJobService"></title>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            top: 10px;
+            right: 10px;
+        }
+    </style>
+</head>
+
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+    <div id="map" style="width: 100%;height:100%"></div>
+    <div id="popup" class="ol-popup" style='width:350px'>
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title" data-i18n="resources.title_SummaryMeshJobService"></h3>
+            </div>
+            <div class="panel-body">
+                <div class="input-group">
+                    <span class="input-group-addon"><span data-i18n="resources.text_inputData"></span><span data-i18n="[title]resources.text_requiredField"
+                            style="color: red;"> * </span> </span>
+                    <input id="datasetName" type="text" class="form-control" value="samples_newyork_taxi_2013-01_14k" />
+                </div>
+                <p>
+                    <div class="input-group">
+                        <span class="input-group-addon"><span data-i18n="resources.text_polymerizationType"></span><span
+                                data-i18n="[title]resources.text_requiredField" style="color: red;"> * </span> </span>
+                        <select class="form-control" id="type" name="clientType">
+                            <option value="SUMMARYMESH" selected="selected" data-i18n="resources.text_polymerizationMesh"></option>
+                            <option value="SUMMARYREGION" data-i18n="resources.text_polymerizationRegion"></option>
+                        </select>
+                    </div>
+                    <p>
+                        <div id="summarymeshS">
+                            <div class="input-group">
+                                <span class="input-group-addon"><span data-i18n="resources.text_meshSurfaceType"></span><span
+                                        data-i18n="[title]resources.text_requiredField" style="color: red;"> * </span></span>
+                                <select class="form-control" id="meshType" name="clientType">
+                                    <option value="0" selected="selected" data-i18n="resources.text_4grid"></option>
+                                    <option value="1" data-i18n="resources.text_6grid"></option>
+                                </select>
+                            </div>
+                            <p>
+                                <div class="input-group">
+                                    <span class="input-group-addon" data-i18n="resources.text_analysisRange"></span>
+                                    <input id="query" type="text" class="form-control" value="-74.150, 40.550, -73.750, 40.950" />
+                                </div>
+                                <p>
+                                    <div class="input-group">
+                                        <span class="input-group-addon"><span data-i18n="resources.text_resolution"></span><span
+                                                data-i18n="[title]resources.text_requiredField" style="color: red;"> *
+                                            </span>  </span>
+                                        <input id="resolution" type="text" class="form-control" value="100" />
+                                    </div>
+                                    <p>
+                        </div>
+                        <div id="summaryregionS" style="display: none">
+                            <div class="input-group">
+                                <span class="input-group-addon" data-i18n="resources.text_regionDataset"></span>
+                                <select class="form-control" id="regionDataset" name="clientType">
+                                    <option value="samples_processing_newyorkZone_R" selected="selected">
+                                        samples_processing_newyorkZone_R
+                                    </option>
+                                    <option value="samples_processing_singleRegion_R">samples_processing_singleRegion_R
+                                    </option>
+                                </select>
+                            </div>
+                            <p>
+                        </div>
+                        <div class="input-group">
+                            <span class="input-group-addon" data-i18n="resources.text_statisticModes"></span>
+                            <input id="statisticModes" type="text" class="form-control" value="max" />
+                        </div>
+                        <p>
+                            <div class="input-group">
+                                <span class="input-group-addon" data-i18n="resources.text_weightField"></span>
+                                <input id="fields" type="text" class="form-control" value="col7" />
+                            </div>
+                            <p>
+                                <div align="right">
+                                    <input type="button" id='btn' class="btn btn-primary" data-i18n="[value]resources.btn_polymerization" />
+                                </div>
+            </div>
+        </div>
+    </div>
+    <script type="text/javascript" include="bootstrap,jquery,widgets" src="../js/include-web.js"></script>
+    <script type="text/javascript">
+        var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+        var layer,
+            processingsUrl = host + "/iserver/services/distributedanalyst/rest/v1/jobs",
+            mapURL = host + "/iserver/services/map-world/rest/maps/World",
+            map = new ol.Map({
+                target: 'map',
+                controls: ol.control.defaults({
+                        attributionOptions: {
+                            collapsed: false
+                        }
+                    })
+                    .extend([new ol.supermap.control.Logo()]),
+                view: new ol.View({
+                    center: [-73.95, 40.75],
+                    zoom: 12,
+                    projection: 'EPSG:4326',
+                    multiWorld: true
+                })
+            });
+        map.addLayer(new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest({
+                url: mapURL,
+            }),
+        }));
+        $("#type").change(function (e) {
+            if (e.target.selectedIndex === 0) {
+                $("#summarymeshS").show();
+                $("#summaryregionS").hide();
+                return;
+            }
+            $("#summarymeshS").hide();
+            $("#summaryregionS").show();
+        });
+        var processingService = new ol.supermap.ProcessingService(processingsUrl, {
+                withCredentials: window.isLocal
+            }),
+            info = new ol.control.Control({
+                element: document.getElementById('popup')
+            });
+
+        info.setMap(map);
+        map.addControl(info);
+        SuperMap.SecurityManager.registerToken(processingsUrl, window.exampleToken);
+
+        function getQuery() {
+            if ($('#query').val() === "") {
+                return "";
+            }
+            var query = [];
+            $('#query').val().split(',').map(function (el) {
+                query.push(parseFloat(el));
+            });
+            return query;
+        }
+
+        $('#btn').on('click', function () {
+            if ($('#msg_container')[0]) {
+                $('#msg_container').remove();
+            }
+            widgets.loader.showLoader();
+            if (map && layer) {
+                map.removeLayer(layer);
+            }
+            var summaryMeshJobParameter = new SuperMap.SummaryMeshJobParameter({
+                datasetName: $('#datasetName').val(),
+                resolution: $('#resolution').val(),
+                meshType: $('#meshType option:selected').attr('value'),
+                fields: $('#fields').val(),
+                query: getQuery(),
+                statisticModes: $('#statisticModes').val(),
+                type: $('#type option:selected').attr('value'),
+                regionDataset: $('#regionDataset option:selected').attr('value')
+            });
+            processingService.addSummaryMeshJob(summaryMeshJobParameter, function (serviceResult) {
+                if (serviceResult.error) {
+                    widgets.loader.removeLoader();
+                    var errorMsg = serviceResult.error.errorMsg || "code: " + serviceResult.error.code;
+                    widgets.alert.showAlert(resources.msg_createFailed + "<br>" + errorMsg, false);
+                    return;
+                }
+                serviceResult.result.setting.serviceInfo.targetServiceInfos.map(function (info) {
+                    if (info.serviceType === 'RESTMAP') {
+                        SuperMap.FetchRequest.get(info.serviceAddress + '/maps').then(function (
+                            response) {
+                            return response.json();
+                        }).then(function (result) {
+                            var mapUrl = result[0].path;
+                            new ol.supermap.MapService(mapUrl).getMapInfo(function (
+                                mapInfo) {
+                                layer = new ol.layer.Tile({
+                                    source: new ol.source.ImageSuperMapRest(
+                                        ol.source.ImageSuperMapRest
+                                        .optionsFromMapJSON(mapUrl,
+                                            mapInfo.result))
+                                });
+                                map.addLayer(layer);
+                                widgets.loader.removeLoader();
+                            });
+                        });
+                    }
+                });
+            });
+        });
+    </script>
+</body>
+
+</html>

+ 275 - 0
public/supermap/examples/openlayers/SummaryRegionJobService.html

@@ -0,0 +1,275 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_SummaryRegionJobService"></title>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            top: 10px;
+            right: 10px;
+        }
+    </style>
+</head>
+
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+    <div id="map" style="width: 100%;height:100%"></div>
+    <div id="popup" class="ol-popup" style='width: 500px'>
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title" data-i18n="resources.title_SummaryRegionJobService"></h3>
+            </div>
+            <div class="panel-body">
+                <div class="input-group">
+                    <span class="input-group-addon"><span data-i18n="resources.text_inputData"></span><span data-i18n="[title]resources.text_requiredField"
+                            style="color: red;"> * </span>     </span>
+                    <input id="datasetName" type="text" class="form-control" value="samples_processing_newyorkZone_R" />
+                </div>
+                <p>
+                    <div class="input-group">
+                        <span class="input-group-addon"><span data-i18n="resources.text_summaryType"></span><span
+                                data-i18n="[title]resources.text_requiredField" style="color: red;"> * </span>     </span>
+                        <div>
+                            <select class="form-control" id="type" name="clientType">
+                                <option value="SUMMARYMESH" selected="selected" data-i18n="resources.text_summaryMesh"></option>
+                                <option value="SUMMARYREGION" data-i18n="resources.text_summaryRegion"></option>
+                            </select>
+                        </div>
+                    </div>
+                    <p>
+                        <div id="meshTypeS" class="input-group">
+                            <span class="input-group-addon" data-i18n="resources.text_meshSurfaceType"><span data-i18n="[title]resources.text_requiredField"
+                                    style="color: red;"> * </span>  </span>
+                            <select class="form-control" id="meshType" name="clientType">
+                                <option value="0" selected="selected" data-i18n="resources.text_4grid"></option>
+                                <option value="1" data-i18n="resources.text_6grid"></option>
+                            </select>
+                        </div>
+                        <p>
+                            <div id="regionDatasetS" class="input-group">
+                                <span class="input-group-addon"><span data-i18n="resources.text_summaryDataset"></span><span
+                                        data-i18n="[title]resources.text_requiredField" style="color: red;"> * </span>  </span>
+                                <input id="regionDataset" type="text" class="form-control" value="samples_processing_newyorkZone_R" />
+                            </div>
+                            <p>
+                                <div class="input-group">
+                                    <span class="input-group-addon" data-i18n="resources.text_analysisRange"></span>
+                                    <input id="query" type="text" class="form-control" value="-74.050,40.650,-73.850,40.850" />
+                                </div>
+                                <p>
+                                    <p>
+                                        <div class="input-group">
+                                            <span class="input-group-addon" data-i18n="resources.text_statisticStandardField"></span>
+                                            <span class="form-control">
+                                                <input id="standardSummaryFields" type="checkbox">
+                                            </span>
+                                            <span class="input-group-addon" data-i18n="resources.text_statisticWeightField"></span>
+                                            <span class="form-control">
+                                                <input id="weightedSummaryFields" type="checkbox">
+                                            </span>
+                                        </div>
+                                        <p>
+                                            <div id="standardS" style="display: none">
+                                                <div class="input-group">
+                                                    <span class="input-group-addon"><span data-i18n="resources.text_statisticAttrFieldMode"></span><span
+                                                            data-i18n="[title]resources.text_requiredField" style="color: red;">
+                                                            * </span> </span>
+                                                    <input id="standardStatisticModes" type="text" class="form-control"
+                                                        value="max" />
+                                                </div>
+                                                <p>
+                                                    <div class="input-group">
+                                                        <span class="input-group-addon"><span data-i18n="resources.text_AttrFieldName"></span><span
+                                                                data-i18n="[title]resources.text_requiredField" style="color: red;">
+                                                                * </span>    </span>
+                                                        <input id="standardFields" type="text" class="form-control"
+                                                            value="LocationID" />
+                                                    </div>
+                                                    <p>
+                                            </div>
+                                            <div id="weightS" style="display: none">
+                                                <div class="input-group">
+                                                    <span class="input-group-addon"><span data-i18n="resources.text_statisticWeightFieldMode"></span><span
+                                                            data-i18n="[title]resources.text_requiredField" style="color: red;">
+                                                            * </span> </span>
+                                                    <input id="weightedStatisticModes" type="text" class="form-control"
+                                                        value="max" />
+                                                </div>
+                                                <p>
+                                                    <div class="input-group">
+                                                        <span class="input-group-addon"><span data-i18n="resources.text_weightFieldName"></span><span
+                                                                data-i18n="[title]resources.text_requiredField" style="color: red;">
+                                                                * </span>    </span>
+                                                        <input id="weightedFields" type="text" class="form-control"
+                                                            value="LocationID" />
+                                                    </div>
+                                                    <p>
+                                            </div>
+
+                                            <div id="resolutionS" class="input-group">
+                                                <span class="input-group-addon" data-i18n="resources.text_gridSize"></span>
+                                                <input id="resolution" type="text" class="form-control" value="100" />
+                                            </div>
+                                            <p>
+                                                <div id="meshSizeUnitS" class="input-group">
+                                                    <span class="input-group-addon" data-i18n="resources.text_gridSizeUnit"></span>
+                                                    <select class="form-control" id="meshSizeUnit" name="clientType">
+                                                        <option value="Meter" selected="selected">Meter</option>
+                                                        <option value="Kilometer">Kilometer</option>
+                                                        <option value="Yard">Yard</option>
+                                                        <option value="Foot">Foot</option>
+                                                        <option value="Mile">Mile</option>
+                                                    </select>
+                                                </div>
+                                                <p>
+                                                    <div class="input-group">
+                                                        <span class="input-group-addon" data-i18n="resources.text_lengthAndArea"></span>
+                                                        <span class="form-control">
+                                                            <input id="sumShape" type="checkbox" checked>
+                                                        </span>
+                                                    </div>
+                                                    <p>
+                                                        <div align="right">
+                                                            <input type="button" id='btn' class="btn btn-primary"
+                                                                data-i18n="[value]resources.btn_summary" />
+                                                        </div>
+            </div>
+        </div>
+    </div>
+    <script type="text/javascript" include="bootstrap,jquery,widgets" src="../js/include-web.js"></script>
+    <script type="text/javascript">
+        var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+        var layer,
+            processingsUrl = host + "/iserver/services/distributedanalyst/rest/v1/jobs",
+            mapURL = host + "/iserver/services/map-world/rest/maps/World",
+            map = new ol.Map({
+                target: 'map',
+                controls: ol.control.defaults({
+                        attributionOptions: {
+                            collapsed: false
+                        }
+                    })
+                    .extend([new ol.supermap.control.Logo()]),
+                view: new ol.View({
+                    center: [-73.95, 40.75],
+                    zoom: 12,
+                    projection: 'EPSG:4326',
+                    multiWorld: true
+                })
+            });
+        map.addLayer(new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest({
+                url: mapURL,
+            }),
+        }));
+        $("#standardSummaryFields").change(function (e) {
+            if (e.target.checked) {
+                $("#standardS").show();
+                return;
+            }
+            $("#standardS").hide();
+        });
+        $("#weightedSummaryFields").change(function (e) {
+            if (e.target.checked) {
+                $("#weightS").show();
+                return;
+            }
+            $("#weightS").hide();
+        });
+        $("#type").change(function (e) {
+            if (e.target.selectedIndex === 0) {
+                $("#meshTypeS").show();
+                $("#resolutionS").show();
+                $("#meshSizeUnitS").show();
+                $("#regionDatasetS").hide();
+                return;
+            }
+            $("#meshTypeS").hide();
+            $("#resolutionS").hide();
+            $("#meshSizeUnitS").hide();
+            $("#regionDatasetS").show();
+        });
+        var processingService = new ol.supermap.ProcessingService(processingsUrl, {
+            withCredentials: window.isLocal
+        });
+        var info = new ol.control.Control({
+            element: popup
+        });
+        info.setMap(map);
+        map.addControl(info);
+        SuperMap.SecurityManager.registerToken(processingsUrl, window.exampleToken);
+
+        function getQuery() {
+            if ($('#query').val() === "") {
+                return "";
+            }
+            var query = [];
+            $('#query').val().split(',').map(function (el) {
+                query.push(parseFloat(el));
+            });
+            return query;
+        }
+
+        $('#btn').on('click', function () {
+            if ($('#msg_container')[0]) {
+                $('#msg_container').remove();
+            }
+            widgets.loader.showLoader();
+            if (map && layer) {
+                map.removeLayer(layer);
+            }
+            var summaryRegionJobParameter = new SuperMap.SummaryRegionJobParameter({
+                datasetName: $('#datasetName').val(),
+                regionDataset: $('#regionDataset').val(),
+                type: $('#type option:selected').attr('value'),
+                meshType: $('#meshType option:selected').attr('value'),
+                query: getQuery(),
+                standardSummaryFields: $('#standardSummaryFields').get(0).checked,
+                weightedSummaryFields: $('#weightedSummaryFields').get(0).checked,
+                standardStatisticModes: $('#standardStatisticModes').val(),
+                standardFields: $('#standardFields').val(),
+                weightedStatisticModes: $('#weightedStatisticModes').val(),
+                weightedFields: $('#weightedFields').val(),
+                resolution: $('#resolution').val(),
+                meshSizeUnit: $('#meshSizeUnit option:selected').attr('value'),
+                sumShape: $('#sumShape').get(0).checked
+            });
+            processingService.addSummaryRegionJob(summaryRegionJobParameter, function (serviceResult) {
+                if (serviceResult.error) {
+                    widgets.loader.removeLoader();
+                    var errorMsg = serviceResult.error.errorMsg || "code: " + serviceResult.error.code;
+                    widgets.alert.showAlert(resources.msg_createFailed + "<br>" + errorMsg, false);
+                    return;
+                }
+                serviceResult.result.setting.serviceInfo.targetServiceInfos.map(function (info) {
+                    if (info.serviceType === 'RESTMAP') {
+                        SuperMap.FetchRequest.get(info.serviceAddress + '/maps').then(function (
+                            response) {
+                            return response.json();
+                        }).then(function (result) {
+                            var mapUrl = result[0].path;
+                            new ol.supermap.MapService(mapUrl).getMapInfo(function (
+                                mapInfo) {
+                                layer = new ol.layer.Tile({
+                                    source: new ol.source.ImageSuperMapRest(
+                                        ol.source.ImageSuperMapRest
+                                        .optionsFromMapJSON(mapUrl,
+                                            mapInfo.result))
+                                });
+                                map.addLayer(layer);
+                                widgets.loader.removeLoader();
+                            });
+                        });
+                    }
+                });
+            });
+        });
+    </script>
+</body>
+
+</html>

+ 45 - 0
public/supermap/examples/openlayers/WMSLayer.html

@@ -0,0 +1,45 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_WMSLayer"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var resolutions = new Array(17);
+    var matrixIds = new Array(17);
+    for (var z = 0; z < 17; ++z) {
+        resolutions[z] = 156543.033928041 / Math.pow(2, z);
+        matrixIds[z] = z;
+    }
+    var map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 0,
+            multiWorld: true
+        }),
+        layers: [new ol.layer.Tile({
+            opacity: 0.7,
+            source: new ol.source.TileWMS({
+                url: (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/wms111/China",
+                params: {
+                    'LAYERS': 'China',
+                    'FORMAT': 'image/png'
+                },
+                attributions: "Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='http://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>"
+            }),
+
+        })]
+    });
+</script>
+</body>
+</html>

+ 50 - 0
public/supermap/examples/openlayers/WMTSLayer.html

@@ -0,0 +1,50 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_WMTSLayer"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style="margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var resolutions = new Array(17);
+    var matrixIds = new Array(17);
+    for (var z = 0; z < 17; ++z) {
+        resolutions[z] = 156543.033928041 / Math.pow(2, z);
+        matrixIds[z] = z;
+    }
+    var map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 0,
+            multiWorld: true
+        }),
+        layers: [new ol.layer.Tile({
+            opacity: 0.7,
+            source: new ol.source.WMTS({
+                url: (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/wmts100",
+                layer: 'China',
+                matrixSet: 'GoogleMapsCompatible_China',
+                format: 'image/png',
+                tileGrid: new ol.tilegrid.WMTS({
+                    origin: [-2.0037508342787E7, 2.0037508342787E7],
+                    extent:[-2.0037508342787E7, -2.0037508342787E7,2.0037508342787E7, 2.0037508342787E7],
+                    resolutions: resolutions,
+                    matrixIds: matrixIds
+                }),
+                style: 'default',
+                attributions: "Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='http://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>"
+            })
+        })]
+    });
+</script>
+</body>
+</html>

+ 319 - 0
public/supermap/examples/openlayers/addressMatchService.html

@@ -0,0 +1,319 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_addressMatchService"></title>
+    <style>
+        .input-group {
+            margin: 8px 0;
+        }
+
+        .control {
+            position: absolute;
+            top: 10px;
+            right: 10px;
+        }
+
+        .ol-popup {
+            position: absolute;
+            background-color: white;
+            -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+            padding: 15px;
+            border-radius: 10px;
+            border: 1px solid #cccccc;
+            bottom: 12px;
+            left: -50px;
+            min-width: 300px;
+        }
+
+        .ol-popup:after, .ol-popup:before {
+            top: 100%;
+            border: solid transparent;
+            content: " ";
+            height: 0;
+            width: 0;
+            position: absolute;
+            pointer-events: none;
+        }
+
+        .ol-popup:after {
+            border-top-color: white;
+            border-width: 10px;
+            left: 48px;
+            margin-left: -10px;
+        }
+
+        .ol-popup:before {
+            border-top-color: #cccccc;
+            border-width: 11px;
+            left: 48px;
+            margin-left: -11px;
+        }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="control" class="control" style='width:20%'>
+    <div class="panel panel-default">
+        <div class="panel-body">
+            <ul class="nav nav-tabs nav-justified">
+                <li id="geocode" role="presentation" class="active"><a href="#" data-i18n="resources.text_code"></a>
+                </li>
+                <li id="geodecode" role="presentation"><a href="#" data-i18n="resources.text_decode"></a></li>
+            </ul>
+
+            <div class="tab-content">
+                <div id="geocodeParam" role="tabpanel" class="tab-pane deplistContent active">
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_address"></span>
+                        <input id="address" type="text" class="form-control" placeholder="超图软件"/>
+                    </div>
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_filterField"></span>
+                        <input id="filters" type="text" class="form-control"
+                               placeholder="北京市,朝阳区"/>
+                    </div>
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_minIndex"></span>
+                        <input id="fromIndex" type="text" class="form-control"
+                               placeholder="0"/>
+                    </div>
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_maxIndex"></span>
+                        <input id="toIndex" type="text" class="form-control"
+                               placeholder="10"/>
+                    </div>
+
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_maxCount"></span>
+                        <input id="maxReturn" type="text" class="form-control"
+                               placeholder="-1"/>
+                    </div>
+
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_coorSystem"></span>
+                        <input id="prjCoordSys" type="text" class="form-control"
+                               placeholder="{epsgcode:4326}"/>
+                    </div>
+
+                    <div align="right">
+                        <input type="button" id='codeBtn' class="btn btn-primary"
+                               data-i18n="[value]resources.text_input_value_match"/>
+                    </div>
+                </div>
+                <div id="geodecodeParam" role="tabpanel" class="tab-pane deplistContent">
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_abscissa"></span>
+                        <input id="xCoord" type="text" class="form-control" placeholder="116.3518541194752"/>
+                    </div>
+
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_ordinate"></span>
+                        <input id="yCoord" type="text" class="form-control"
+                               placeholder="40.00097839595237"/>
+                    </div>
+
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_filterField"></span>
+                        <input id="filters2" type="text" class="form-control"
+                               placeholder=""/>
+                    </div>
+
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_minIndex"></span>
+                        <input id="fromIndex2" type="text" class="form-control"
+                               placeholder="0"/>
+                    </div>
+
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_maxIndex"></span>
+                        <input id="toIndex2" type="text" class="form-control"
+                               placeholder="10"/>
+                    </div>
+
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_maxCount"></span>
+                        <input id="maxReturn2" type="text" class="form-control"
+                               placeholder="-1"/>
+                    </div>
+
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_queryRadius"></span>
+                        <input id="geoDecodingRadius" type="text" class="form-control"
+                               placeholder="-1"/>
+                    </div>
+
+                    <div class="input-group">
+                        <span class="input-group-addon" data-i18n="resources.text_coorSystem"></span>
+                        <input id="prjCoordSys2" type="text" class="form-control"
+                               placeholder="{epsgcode:4326}"/>
+                    </div>
+
+                    <div align="right">
+                        <input type="button" id='decodeBtn' class="btn btn-primary"
+                               data-i18n="[value]resources.text_input_value_match"/>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<div id="info" class="ol-popup">
+    <div id="info-content"></div>
+</div>
+<script type="text/javascript" include="jquery,bootstrap-css" src="../js/include-web.js"></script>
+<script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+<script type="text/javascript">
+    var map,select,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-china400/rest/maps/China_4326",
+        addressUrl = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/addressmatch-Address/restjsr/v1/address",
+        imgUrl = "../img/markerbig_select.png",
+        vectorSource = new ol.source.Vector(),
+        addressMatchService = new ol.supermap.AddressMatchService(addressUrl),
+        view = new ol.View({
+            center: [116.383572, 39.914714],
+            zoom: 12,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        container = document.getElementById('info'),
+        content = document.getElementById('info-content'),
+        overlay = new ol.Overlay(({
+            element: container,
+            autoPan: true,
+            autoPanAnimation: {
+                duration: 250
+            },
+            offset: [0, -20]
+        }));
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: view,
+        overlays: [overlay]
+    });
+    var control = new ol.control.Control({element: document.getElementById('control')});
+    control.setMap(map);
+    map.addControl(control);
+
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url,
+            wrapX: true,
+            projection: 'EPSG:4326',
+            origin: [-180.0, 90]
+        })
+    });
+    var vectorLayer = new ol.layer.Vector({
+        source: vectorSource
+    });
+    map.addLayer(layer);
+    map.addLayer(vectorLayer);
+
+    $("#geocode").click(function () {
+        $("#geocode")[0].className = 'active';
+        $("#geodecode")[0].className = '';
+        $("#geocodeParam").addClass('active');
+        $("#geodecodeParam").removeClass('active');
+    });
+    $("#geodecode").click(function () {
+        $("#geocode")[0].className = '';
+        $("#geodecode")[0].className = 'active';
+        $("#geodecodeParam").addClass('active');
+        $("#geocodeParam").removeClass('active');
+    });
+
+    //判断输入字符串是否为空或者全部都是空格
+    function isNull(str) {
+        if (str == "") return true;
+        var regu = "^[ ]+$";
+        var re = new RegExp(regu);
+        return re.test(str);
+    }
+
+    $("#codeBtn").click(function () {
+        var geoCodeParam = new SuperMap.GeoCodingParameter({
+            address: $('#address').val() || $('#address').attr('placeholder'),
+            fromIndex: $('#fromIndex').val() || $('#fromIndex').attr('placeholder'),
+            toIndex: $('#toIndex').val() || $('#toIndex').attr('placeholder'),
+            filters: $('#filters').val() || $('#filters').attr('placeholder'),
+            prjCoordSys: $('#prjCoordSys').val() || $('#prjCoordSys').attr('placeholder'),
+            maxReturn: $('#maxReturn').val() || $('#maxReturn').attr('placeholder')
+        });
+        addressMatchService.code(geoCodeParam, match);
+    });
+    $("#decodeBtn").click(function () {
+        var geoDecodeParam = new SuperMap.GeoDecodingParameter({
+            x: $('#xCoord').val() || $('#xCoord').attr('placeholder'),
+            y: $('#yCoord').val() || $('#yCoord').attr('placeholder'),
+            fromIndex: $('#fromIndex2').val() || $('#fromIndex2').attr('placeholder'),
+            toIndex: $('#toIndex2').val() || $('#toIndex2').attr('placeholder'),
+            filters: $('#filters2').val() || $('#filters2').attr('placeholder'),
+            prjCoordSys: $('#prjCoordSys2').val() || $('#prjCoordSys2').attr('placeholder'),
+            maxReturn: $('#maxReturn2').val() || $('#maxReturn2').attr('placeholder'),
+            geoDecodingRadius: $('#geoDecodingRadius').val() || $('#geoDecodingRadius').attr('placeholder'),
+        });
+        addressMatchService.decode(geoDecodeParam, match);
+    });
+
+    function match(obj) {
+        select && map.removeInteraction(select);
+        overlay.setPosition(undefined);
+        vectorSource.clear();
+        var features = [];
+
+        obj.result.map(function (item) {
+            var feature = new ol.Feature();
+            feature.setGeometry(new ol.geom.Point([item.location.x, item.location.y]));
+            feature.setProperties({
+                location: item.location,
+                address: item.address,
+                score: item.score,
+                filters: item.filters
+            });
+            feature.setStyle(new ol.style.Style({
+                image: new ol.style.Icon(({
+                    anchor: [0.5, 1],
+                    src: imgUrl
+                }))
+            }));
+            features.push(feature);
+        });
+        select = new ol.interaction.Select({
+            style: new ol.style.Style({
+                image: new ol.style.Icon(({
+                    anchor: [0.5, 1],
+                    src: imgUrl
+                }))
+            })
+        });
+        select.on('select', function (e) {
+            if (e.selected.length > 0) {
+                var feature = e.selected[0];
+                var innerHTML = "";
+                innerHTML += resources.text_companyAddress + feature.getProperties().address + "<br>";
+                var x = Number(feature.getProperties().location.x.toString().match(/^\d+(?:\.\d{0,2})?/));
+                var y = Number(feature.getProperties().location.y.toString().match(/^\d+(?:\.\d{0,2})?/));
+                innerHTML += resources.text_coordinate+":[" + x + "," + y + "]<br>";
+                if (feature.getProperties().score > 0) {
+                    innerHTML += resources.text_matchDegree+":" + feature.getProperties().score + "<br>";
+                }
+                innerHTML += resources.text_filterField+":" + feature.getProperties().filters + "<br>";
+                content.innerHTML = innerHTML;
+                overlay.setPosition(feature.getGeometry().getCoordinates());
+            } else if (overlay) {
+                overlay.setPosition(undefined);
+            }
+        });
+        map.addInteraction(select);
+        vectorSource.addFeatures(features);
+        view.animate({zoom: 11}, {center: [116.383572, 39.914714]});
+    }
+</script>
+</body>
+</html>

+ 32 - 0
public/supermap/examples/openlayers/baiduLayer.html

@@ -0,0 +1,32 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_baiduLayer"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            resolutions: [131072 * 2, 131072, 65536, 32768, 16284, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5],
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.BaiduMap(),
+    });
+    map.addLayer(layer);
+</script>
+</body>
+</html>

+ 168 - 0
public/supermap/examples/openlayers/buffersAnalystJobService.html

@@ -0,0 +1,168 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_buffersAnalystJobService"></title>
+    <style>
+        .ol-popup {
+            position: absolute;
+            top: 10px;
+            right: 10px;
+        }
+    </style>
+</head>
+
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+    <div id="map" style="width: 100%;height:100%"></div>
+    <div id="popup" class="ol-popup" style='width:350px'>
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title" data-i18n="resources.text_bufferAnalyst"></h3>
+            </div>
+            <div class="panel-body">
+                <div class="input-group">
+                    <span class="input-group-addon"><span data-i18n="resources.text_inputData"></span><span data-i18n="[title]resources.text_requiredField"
+                            style="color: red;"> * </span> </span>
+                    <input id="datasetName" type="text" class="form-control" value="samples_processing_newyorkPoint_P" />
+                </div>
+                <p></p>
+                <div class='input-group'>
+                    <span class='input-group-addon' data-i18n="resources.text_analysisRange"></span>
+                    <input id='bounds' type='text' class='form-control' value='-74.150, 40.550, -73.750, 40.950' />
+                </div>
+                <p></p>
+                <div class='input-group'>
+                    <span class='input-group-addon' data-i18n="resources.text_bufferDistance"></span>
+                    <input id='distace' type='text' class='form-control' value='15' />
+                </div>
+                <p></p>
+                <div class='input-group'>
+                    <span class='input-group-addon' data-i18n="resources.text_bufferDistanceField"></span>
+                    <input id='distanceField' type='text' class='form-control' value='pickup_latitude' />
+                </div>
+                <p></p>
+                <div class='input-group'>
+                    <span class='input-group-addon' data-i18n="resources.text_bufferDistanceUnit"></span>
+                    <select class='form-control' id='distanceUnit' name='distanceUnit'>
+                        <option value='Meter' selected='selected'>Meter</option>
+                        <option value='Kilometer'>Kilometer</option>
+                        <option value='Yard'>Yard</option>
+                        <option value='Foot'>Foot</option>
+                        <option value='Mile'>Mile</option>
+                    </select></div>
+                <p></p>
+                <div class='input-group'>
+                    <span class='input-group-addon' data-i18n="resources.text_fusionField"></span>
+                    <input id='dissoveField' type='text' class='form-control' value='pickup_longitude' />
+                </div>
+                <p></p>
+                <div align="right">
+                    <input type="button" id='btn' class="btn btn-primary" data-i18n="[value]resources.text_analyst" />
+                </div>
+            </div>
+        </div>
+    </div>
+    <script type="text/javascript" include="bootstrap,jquery,widgets" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <script type="text/javascript">
+        var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+        var layer,
+            processingsUrl = host + "/iserver/services/distributedanalyst/rest/v1/jobs",
+            mapURL = host + "/iserver/services/map-world/rest/maps/World",
+            map = new ol.Map({
+                target: 'map',
+                controls: ol.control.defaults({
+                        attributionOptions: {
+                            collapsed: false
+                        }
+                    })
+                    .extend([new ol.supermap.control.Logo()]),
+                view: new ol.View({
+                    center: [-73.95, 40.75],
+                    zoom: 12,
+                    projection: 'EPSG:4326',
+                    multiWorld: true
+                })
+            });
+        map.addLayer(new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest({
+                url: mapURL,
+            }),
+        }));
+
+        var processingService = new ol.supermap.ProcessingService(processingsUrl, {
+                withCredentials: window.isLocal
+            }),
+            info = new ol.control.Control({
+                element: document.getElementById('popup')
+            });
+
+        info.setMap(map);
+        map.addControl(info);
+        SuperMap.SecurityManager.registerToken(processingsUrl, window.exampleToken);
+
+        function getBounds() {
+            if ($('#bounds').val() === "") {
+                return "";
+            }
+            var bounds = [];
+            $('#bounds').val().split(',').map(function (el) {
+                bounds.push(parseFloat(el));
+            });
+            return bounds;
+        }
+
+        $('#btn').on('click', function () {
+            if ($('#msg_container')[0]) {
+                $('#msg_container').remove();
+            }
+            widgets.loader.showLoader();
+            if (map && layer) {
+                map.removeLayer(layer);
+            }
+            var buffersAnalystJobsParameter = new SuperMap.BuffersAnalystJobsParameter({
+                datasetName: $('#datasetName').val(),
+                bounds: getBounds(),
+                distance: $('#distace').val(),
+                distanceField: $('#distanceField').val(),
+                distanceUnit: $('#distanceUnit option:selected').attr('value'),
+                dissolveField: $('#dissoveField').val()
+            });
+            processingService.addBuffersJob(buffersAnalystJobsParameter, function (serviceResult) {
+                if (serviceResult.error) {
+                    widgets.loader.removeLoader();
+                    var errorMsg = serviceResult.error.errorMsg || "code: " + serviceResult.error.code;
+                    widgets.alert.showAlert(resources.msg_createFailed + "<br>" + errorMsg, false);
+                    return;
+                }
+                serviceResult.result.setting.serviceInfo.targetServiceInfos.map(function (info) {
+                    if (info.serviceType === 'RESTMAP') {
+                        SuperMap.FetchRequest.get(info.serviceAddress + '/maps').then(function (
+                            response) {
+                            return response.json();
+                        }).then(function (result) {
+                            var mapUrl = result[0].path;
+                            new ol.supermap.MapService(mapUrl).getMapInfo(function (
+                                mapInfo) {
+                                layer = new ol.layer.Tile({
+                                    source: new ol.source.ImageSuperMapRest(
+                                        ol.source.ImageSuperMapRest
+                                        .optionsFromMapJSON(mapUrl,
+                                            mapInfo.result))
+                                });
+                                map.addLayer(layer);
+                                widgets.loader.removeLoader();
+                            });
+                        });
+                    }
+                });
+            });
+        });
+    </script>
+</body>
+
+</html>

+ 134 - 0
public/supermap/examples/openlayers/cartoCSS_boundryStyle.html

@@ -0,0 +1,134 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_boundryStyle"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%;"></div>
+<script type="text" id="cartoCssStr">
+        /*此处定义不同的颜色变量,在后面可以重复用这些颜色值*/
+
+        @waterColor:rgb(208,221,238);
+        @roadColora:rgb(0,0,0);
+        @roadColorb:rgb(255,255,255);
+        @railwayColora:rgb(53,53,53);
+        @railwayColorb:rgb(214,214,214);
+        @vegetationColor:rgb(235,235,235);
+        @continentColor:rgb(255,255,255);
+        @provinceLineColor:#ddd;
+
+
+         /*中国除外的其他国家的图层*/
+
+        #World_Continent_pl___China{
+        polygon-fill:@continentColor;
+        line-width:1;
+        line-color:@continentColor;
+        }
+        #China_Province_pl___China{
+        polygon-fill:@continentColor;
+        line-color:rgba(0,0,0,0);
+        }
+
+        #Arterial_Road_ln___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1___1::a{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1___1::b{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Hydside_Area_pl___Hydside{
+        polygon-fill:@waterColor;
+        line-color:@waterColor;
+        }
+
+        #China_Provinces_L___China400{
+        line-dasharray:10,10;
+        line-color:@provinceLineColor;
+        line-width:1;
+        }
+</script>
+
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [12957388, 4853991],
+                zoom: 11,
+                multiWorld: true
+            })
+        });
+        var stylesOptions = {
+            url: url,
+            view: map.getView(),
+            donotNeedServerCartoCss: true,
+            cartoCss: document.getElementById("cartoCssStr").text
+        }
+        var vectorTileStyles = new ol.supermap.VectorTileStyles(stylesOptions);
+        var vectorTileOptions = ol.source.VectorTileSuperMapRest.optionsFromMapJSON(url, serviceResult.result);
+        vectorTileOptions.returnAttributes = false;
+        var vectorLayer = new ol.layer.VectorTile({
+            source: new ol.source.VectorTileSuperMapRest(vectorTileOptions),
+            style: vectorTileStyles.getFeatureStyle
+        });
+        map.addLayer(vectorLayer);
+        map.on('click', function (e) {
+            map.forEachFeatureAtPixel(e.pixel, function (feature) {
+                vectorTileStyles.dispatchEvent({type: 'featureSelected',
+                    selectedId: feature.getProperties().id,
+                    layerName: feature.getProperties().layerName
+                });
+                return true;
+            }, {hitTolerance: 5});
+            vectorLayer.changed();
+        })
+
+    });
+</script>
+</body>
+</html>

+ 134 - 0
public/supermap/examples/openlayers/cartoCSS_darkBlue.html

@@ -0,0 +1,134 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_darkblueStyle"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%;"></div>
+<script type="text" id="cartoCssStr">
+        /*此处定义不同的颜色变量,在后面可以重复用这些颜色值*/
+
+        @waterColor:rgb(2,16,25);
+        @roadColora:rgb(18,117,142);
+        @roadColorb:rgb(0,0,0);
+        @railwayColora:rgb(0,0,0);
+        @railwayColorb:rgb(0,0,0);
+        @vegetationColor:rgb(2,16,25);
+        @continentColor:rgb(8,48,75);
+        @provinceLineColor:rgb(30,30,30);
+
+
+        /*中国除外的其他国家的图层*/
+
+        #World_Continent_pl___China{
+        polygon-fill:@continentColor;
+        line-width:1;
+        line-color:@continentColor;
+        }
+        #China_Province_pl___China{
+        polygon-fill:@continentColor;
+        line-color:rgba(0,0,0,0);
+        }
+
+        #Arterial_Road_ln___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1___1::a{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1___1::b{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Hydside_Area_pl___Hydside{
+        polygon-fill:@waterColor;
+        line-color:@waterColor;
+        }
+
+        #China_Provinces_L___China400{
+        line-dasharray:10,10;
+        line-color:@provinceLineColor;
+        line-width:1;
+        }
+</script>
+
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [12957388, 4853991],
+                zoom: 11,
+                multiWorld: true
+            })
+        });
+        var stylesOptions = {
+            url: url,
+            view: map.getView(),
+            donotNeedServerCartoCss: true,
+            cartoCss: document.getElementById("cartoCssStr").text
+        }
+        var vectorTileStyles = new ol.supermap.VectorTileStyles(stylesOptions);
+        var vectorTileOptions = ol.source.VectorTileSuperMapRest.optionsFromMapJSON(url, serviceResult.result);
+        vectorTileOptions.returnAttributes = false;
+        var vectorLayer = new ol.layer.VectorTile({
+            source: new ol.source.VectorTileSuperMapRest(vectorTileOptions),
+            style: vectorTileStyles.getFeatureStyle
+        });
+        map.addLayer(vectorLayer);
+        map.on('click', function (e) {
+            map.forEachFeatureAtPixel(e.pixel, function (feature) {
+                vectorTileStyles.dispatchEvent({type: 'featureSelected',
+                    selectedId: feature.getProperties().id,
+                    layerName: feature.getProperties().layerName
+                });
+                return true;
+            }, {hitTolerance: 5});
+            vectorLayer.changed();
+        })
+
+    });
+</script>
+</body>
+</html>

+ 153 - 0
public/supermap/examples/openlayers/cartoCSS_helloKitty.html

@@ -0,0 +1,153 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_cartoCSSHelloKitty"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%;"></div>
+<script type="text" id="cartoCssStr">
+        /*此处定义不同的颜色变量,在后面可以重复用这些颜色值*/
+
+        @waterColor:rgb(245,169,193);
+        @roadColora:rgb(244,73,116);
+        @roadColorb:rgb(244,73,116);
+        @railwayColora:rgb(50,50,50);
+        @railwayColorb:rgb(255,255,255);
+        @vegetationColor:rgb(239,169,193);
+        @continentColor:rgb(250,250,250);
+        @provinceLineColor:rgb(226,195,19);
+
+
+        #Railway_A___Road::a{
+
+        /*每一段的长度为15px,间隔也是15px*/
+        line-color:@railwayColora;
+        line-width:2.5;
+        }
+        #Railway_A___Road::b{
+
+        /*每一段的长度为15px,间隔也是15px*/
+        line-dasharray:18,18;
+        line-color:@railwayColorb;
+        line-width:1.5;
+        }
+        /*底下的地图背景图层*/
+
+        #World_Division_pl___China{
+        polygon-fill:@waterColor;
+        }
+
+        /*中国除外的其他国家的图层*/
+
+        #World_Continent_pl___China{
+        polygon-fill:@continentColor;
+        line-width:1;
+        line-color:@continentColor;
+        }
+        #China_Province_pl___China{
+        polygon-fill:@continentColor;
+        line-color:rgba(0,0,0,0);
+        }
+
+        #Arterial_Road_ln___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1___1::a{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1___1::b{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Hydside_Area_pl___Hydside{
+        polygon-fill:@waterColor;
+        line-color:@waterColor;
+        }
+
+        #China_Provinces_L___China400{
+        line-dasharray:10,10;
+        line-color:@provinceLineColor;
+        line-width:1;
+        }
+</script>
+
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [12957388, 4853991],
+                zoom: 11,
+                multiWorld: true
+            })
+        });
+        var stylesOptions = {
+            url: url,
+            view: map.getView(),
+            donotNeedServerCartoCss: true,
+            cartoCss: document.getElementById("cartoCssStr").text
+        }
+        var vectorTileStyles = new ol.supermap.VectorTileStyles(stylesOptions);
+        var vectorTileOptions = ol.source.VectorTileSuperMapRest.optionsFromMapJSON(url, serviceResult.result);
+        vectorTileOptions.returnAttributes = false;
+        var vectorLayer = new ol.layer.VectorTile({
+            source: new ol.source.VectorTileSuperMapRest(vectorTileOptions),
+            style: vectorTileStyles.getFeatureStyle
+        });
+        map.addLayer(vectorLayer);
+        map.on('click', function (e) {
+            map.forEachFeatureAtPixel(e.pixel, function (feature) {
+                vectorTileStyles.dispatchEvent({type: 'featureSelected',
+                    selectedId: feature.getProperties().id,
+                    layerName: feature.getProperties().layerName
+                });
+                return true;
+            }, {hitTolerance: 5});
+            vectorLayer.changed();
+        })
+
+    });
+</script>
+</body>
+</html>

+ 134 - 0
public/supermap/examples/openlayers/cartoCSS_naturalStyle.html

@@ -0,0 +1,134 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_cartoCSSNaturalStyle"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text" id="cartoCssStr">
+        /*此处定义不同的颜色变量,在后面可以重复用这些颜色值*/
+
+        @waterColor:rgb(109,183,255);
+        @roadColora:rgb(100,100,100);
+        @roadColorb:rgb(250,250,250);
+        @railwayColora:rgb(186,186,186);
+        @railwayColorb:rgb(250,250,250);
+        @vegetationColor:rgb(193,220,185);
+        @continentColor:rgb(183,202,147);
+        @provinceLineColor:rgb(100,100,100);
+
+
+         /*中国除外的其他国家的图层*/
+
+        #World_Continent_pl___China{
+        polygon-fill:@continentColor;
+        line-width:1;
+        line-color:@continentColor;
+        }
+        #China_Province_pl___China{
+        polygon-fill:@continentColor;
+        line-color:rgba(0,0,0,0);
+        }
+
+        #Arterial_Road_ln___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1___1::a{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1___1::b{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Hydside_Area_pl___Hydside{
+        polygon-fill:@waterColor;
+        line-color:@waterColor;
+        }
+
+        #China_Provinces_L___China400{
+        line-dasharray:10,10;
+        line-color:@provinceLineColor;
+        line-width:1;
+        }
+</script>
+
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [12957388, 4853991],
+                zoom: 11,
+                multiWorld: true
+            })
+        });
+        var stylesOptions = {
+            url: url,
+            view: map.getView(),
+            donotNeedServerCartoCss: true,
+            cartoCss: document.getElementById("cartoCssStr").text
+        }
+        var vectorTileStyles = new ol.supermap.VectorTileStyles(stylesOptions);
+        var vectorTileOptions = ol.source.VectorTileSuperMapRest.optionsFromMapJSON(url, serviceResult.result);
+        vectorTileOptions.returnAttributes = false;
+        var vectorLayer = new ol.layer.VectorTile({
+            source: new ol.source.VectorTileSuperMapRest(vectorTileOptions),
+            style: vectorTileStyles.getFeatureStyle
+        });
+        map.addLayer(vectorLayer);
+        map.on('click', function (e) {
+            map.forEachFeatureAtPixel(e.pixel, function (feature) {
+                vectorTileStyles.dispatchEvent({type: 'featureSelected',
+                    selectedId: feature.getProperties().id,
+                    layerName: feature.getProperties().layerName
+                });
+                return true;
+            }, {hitTolerance: 5});
+            vectorLayer.changed();
+        })
+
+    });
+</script>
+</body>
+</html>

+ 134 - 0
public/supermap/examples/openlayers/cartoCSS_nightStyle.html

@@ -0,0 +1,134 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_cartoCSSNightStyle"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%;"></div>
+<script type="text" id="cartoCssStr">
+        /*此处定义不同的颜色变量,在后面可以重复用这些颜色值*/
+
+        @waterColor:rgb(24,24,24);
+        @roadColora:rgb(109,102,91);
+        @roadColorb:rgb(109,102,91);
+        @railwayColora:rgb(80,80,80);
+        @railwayColorb:rgb(137,137,137);
+        @vegetationColor:rgb(27,27,27);
+        @continentColor:rgb(34,34,34);
+        @provinceLineColor:rgb(100,100,100);
+
+
+         /*中国除外的其他国家的图层*/
+
+        #World_Continent_pl___China{
+        polygon-fill:@continentColor;
+        line-width:1;
+        line-color:@continentColor;
+        }
+        #China_Province_pl___China{
+        polygon-fill:@continentColor;
+        line-color:rgba(0,0,0,0);
+        }
+
+        #Arterial_Road_ln___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Arterial_Road_ln___China___1___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Arterial_Road_ln___China___1___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1::one{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1::two{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Main_Road_L___China___1___1::a{
+        line-color:@roadColora;
+        line-width:2;}
+        #Main_Road_L___China___1___1::b{
+        line-color:@roadColorb;
+        line-width:1;}
+
+        #Hydside_Area_pl___Hydside{
+        polygon-fill:@waterColor;
+        line-color:@waterColor;
+        }
+
+        #China_Provinces_L___China400{
+        line-dasharray:10,10;
+        line-color:@provinceLineColor;
+        line-width:1;
+        }
+</script>
+
+<script type="text/javascript">
+    var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-china400/rest/maps/China";
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [12957388, 4853991],
+                zoom: 11,
+                multiWorld: true
+            })
+        });
+        var stylesOptions = {
+            url: url,
+            view: map.getView(),
+            donotNeedServerCartoCss: true,
+            cartoCss: document.getElementById("cartoCssStr").text
+        }
+        var vectorTileStyles = new ol.supermap.VectorTileStyles(stylesOptions);
+        var vectorTileOptions = ol.source.VectorTileSuperMapRest.optionsFromMapJSON(url, serviceResult.result);
+        vectorTileOptions.returnAttributes = false;
+        var vectorLayer = new ol.layer.VectorTile({
+            source: new ol.source.VectorTileSuperMapRest(vectorTileOptions),
+            style: vectorTileStyles.getFeatureStyle
+        });
+        map.addLayer(vectorLayer);
+        map.on('click', function (e) {
+            map.forEachFeatureAtPixel(e.pixel, function (feature) {
+                vectorTileStyles.dispatchEvent({type: 'featureSelected',
+                    selectedId: feature.getProperties().id,
+                    layerName: feature.getProperties().layerName
+                });
+                return true;
+            }, {hitTolerance: 5});
+            vectorLayer.changed();
+        })
+
+    });
+</script>
+</body>
+</html>

+ 47 - 0
public/supermap/examples/openlayers/changeTileVersion.html

@@ -0,0 +1,47 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_changeTileVersion"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" include="iclient-ol-css" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
+<script type="text/javascript">
+    var baseLayer, url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-ChinaProvinces/rest/maps/ChinaProvinces";
+    var map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [104.79, 33.03],
+            zoom: 4,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+
+    baseLayer = new ol.source.TileSuperMapRest({
+        origin: [-180, 90],
+        url: url,
+        wrapX: true
+    });
+
+    map.addLayer(new ol.layer.Tile({
+        source: baseLayer,
+        projection: 'EPSG:4326'
+    }));
+
+    var control = new ol.supermap.control.ChangeTileVersion({
+        layer: baseLayer,
+        orientation: "horizontal"
+    });
+    control.setMap(map);
+    map.addControl(control);
+</script>
+</body>
+</html>

File diff suppressed because it is too large
+ 1223 - 0
public/supermap/examples/openlayers/config.js


+ 40 - 0
public/supermap/examples/openlayers/controler_attribution.html

@@ -0,0 +1,40 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_attribution"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%;"></div>
+<script>
+    var map,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
+
+    map = new ol.Map({
+        controls: ol.control.defaults({attribution: false, zoom: false}),
+        target: 'map',
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 2,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+    //添加版权控件
+    map.addControl(new ol.control.Attribution({collapsed: false}));
+    map.addLayer(layer);
+</script>
+</body>
+</html>

+ 68 - 0
public/supermap/examples/openlayers/controler_layerswitch.html

@@ -0,0 +1,68 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_layerSwitch"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:95%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:95%"></div>
+<input id="swipe" type="range" style="width: 100%;">
+<script type="text/javascript">
+    var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+    var worldurl = host + '/iserver/services/map-world/rest/maps/World',
+        worldNighturl = host + '/iserver/services/map-world/rest/maps/世界地图_Night';
+
+    var world = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: worldurl
+        }),
+        projection: 'EPSG:4326'
+    });
+
+    var worldNight = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: worldNighturl
+        }),
+        projection: 'EPSG:4326'
+    });
+
+    var map = new ol.Map({
+        layers: [world, worldNight],
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}}),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+
+    var swipe = document.getElementById('swipe');
+    // ol6 废除了 precompose,由 prerender 事件替换
+    worldNight.on('prerender', function (event) {
+        var ctx = event.context;
+        var width = ctx.canvas.width * (swipe.value / 100);
+
+        ctx.save();
+        ctx.beginPath();
+        ctx.rect(width, 0, ctx.canvas.width - width, ctx.canvas.height);
+        ctx.clip();
+    });
+    // ol6 废除了 postcompose,由 postrender 事件替换
+    worldNight.on('postrender', function (event) {
+        var ctx = event.context;
+        ctx.restore();
+    });
+
+    swipe.addEventListener('input', function () {
+        map.render();
+    }, false);
+</script>
+</body>
+</html>

+ 57 - 0
public/supermap/examples/openlayers/controler_layerswitcher.html

@@ -0,0 +1,57 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_controlerLayerSwitcher"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" include="layerswitcher" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+    var map,
+        China = host + '/iserver/services/map-china400/rest/maps/China',
+        ChinaDark = host + '/iserver/services/map-china400/rest/maps/ChinaDark';
+    map = new ol.Map({
+        layers: [
+            new ol.layer.Group({
+                'title': resources.text_switchLayer,
+                layers: [
+                    new ol.layer.Tile({
+                        title: 'China',
+                        type: 'base',
+                        visible: true,
+                        source: new ol.source.TileSuperMapRest({
+                            url: China
+                        }),
+                    }),
+                    new ol.layer.Tile({
+                        title: 'ChinaDark',
+                        type: 'base',
+                        visible: false,
+                        source: new ol.source.TileSuperMapRest({
+                            url: ChinaDark
+                        }),
+
+                    })
+                ]
+            }),
+        ],
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}}),
+        view: new ol.View({
+            center: [100, 38],
+            projection: 'EPSG:3857',
+            zoom: 3,
+            multiWorld: true
+        }),
+    });
+    var layerSwitcher = new ol.control.LayerSwitcher({});
+    map.addControl(layerSwitcher);
+</script>
+</body>
+</html>

+ 54 - 0
public/supermap/examples/openlayers/controler_overviewMap.html

@@ -0,0 +1,54 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_overviewmap"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
+
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}}),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+
+    var source = new ol.source.TileSuperMapRest({
+        url: url
+    });
+
+    var layer = new ol.layer.Tile({
+        source: source
+    });
+    map.addLayer(layer);
+
+    //添加鹰眼控件
+    map.addControl(new ol.control.OverviewMap({
+        view: new ol.View({
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        collapsed: false,
+        layers: [
+            new ol.layer.Tile({
+              source: source
+            })
+        ]
+    }));
+
+</script>
+</body>
+</html>

+ 40 - 0
public/supermap/examples/openlayers/controler_scaleline.html

@@ -0,0 +1,40 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_scaleline"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
+
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+    var scaleControl = new ol.control.ScaleLine();
+    map.addControl(scaleControl);
+    map.addLayer(layer);
+</script>
+</body>
+</html>

+ 78 - 0
public/supermap/examples/openlayers/controler_zoom.html

@@ -0,0 +1,78 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_zoom"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<script type="text/javascript">
+    var map,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
+
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}),
+        view: new ol.View({
+            center: [0, 0],
+            zoom: 3,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+
+    var ele;
+    //禁用双击缩放
+    function disableDoubleClickZoom() {
+        map.getInteractions().forEach(function (element, index, array) {
+            if (element instanceof (ol.interaction.DoubleClickZoom)) {
+                ele = element;
+                ele.setActive(false);
+            }
+        });
+    }
+    //禁用拖动
+    function disableDragPan() {
+        map.getInteractions().forEach(function (element, index, array) {
+            if (element instanceof ol.interaction.DragPan) {
+                ele = element;
+                ele.setActive(false);
+            }
+        });
+    }
+    //禁用鼠标wheel操作
+    function disableMouseWheelZoom() {
+        map.getInteractions().forEach(function (element, index, array) {
+            if (element instanceof ol.interaction.MouseWheelZoom) {
+                ele = element;
+                ele.setActive(false);
+            }
+        });
+    }
+    disableDoubleClickZoom();
+    disableDragPan();
+    disableMouseWheelZoom();
+
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url
+        }),
+        projection: 'EPSG:4326'
+    });
+
+    //zoom控件
+    zoomControl = new ol.control.Zoom();
+    map.addControl(zoomControl);
+
+    //zoomBar控件
+    map.addControl(new ol.control.ZoomSlider({}));
+    map.addLayer(layer);
+
+</script>
+</body>
+</html>

+ 164 - 0
public/supermap/examples/openlayers/dataFlowService.html

@@ -0,0 +1,164 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="UTF-8" />
+        <title data-i18n="resources.title_dataFlowService"></title>
+        <script type="text/javascript" src="../js/include-web.js"></script>
+        <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+        <style>
+            .ol-popup {
+                position: absolute;
+                background-color: white;
+                -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+                filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
+                padding: 15px;
+                border-radius: 10px;
+                border: 1px solid #cccccc;
+                bottom: 12px;
+                left: -50px;
+                min-width: 210px;
+            }
+
+            .ol-popup:after,
+            .ol-popup:before {
+                top: 100%;
+                border: solid transparent;
+                content: " ";
+                height: 0;
+                width: 0;
+                position: absolute;
+                pointer-events: none;
+            }
+
+            .ol-popup:after {
+                border-top-color: white;
+                border-width: 10px;
+                left: 48px;
+                margin-left: -10px;
+            }
+
+            .ol-popup:before {
+                border-top-color: #cccccc;
+                border-width: 11px;
+                left: 48px;
+                margin-left: -11px;
+            }
+        </style>
+    </head>
+    <body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+        <div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
+        <div id="popup" class="ol-popup">
+            <div id="popup-content"></div>
+        </div>
+        <script type="text/javascript">
+            var container = document.getElementById("popup");
+            var content = document.getElementById("popup-content");
+            var overlay = new ol.Overlay({
+                element: container,
+                autoPan: true,
+                autoPanAnimation: {
+                    duration: 250
+                }
+            });
+            var resultLayer,
+                urlQuery = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-china400/rest/maps/China_4326",
+                wsHost = "wss:\//" + (window.isLocal ? document.location.hostname + ":8800" : "iclsvrws.supermap.io");
+            var urlDataFlow = wsHost + "/iserver/services/dataflowTest/dataflow";
+            var timer, featureResult, dataFlowBroadcast, source;
+            new ol.supermap.MapService(urlQuery).getMapInfo(function(serviceResult) {
+                var mapJSONObj = serviceResult.result;
+                //初始化地图
+                var map = new ol.Map({
+                    target: "map",
+                    controls: ol.control
+                        .defaults({
+                            attributionOptions: {
+                                collapsed: false
+                            }
+                        })
+                        .extend([new ol.supermap.control.Logo()]),
+                    view: new ol.View({
+                        center: [116.443571, 39.887549],
+                        zoom: 12,
+                        projection: "EPSG:4326",
+                        multiWorld: true
+                    }),
+                    overlays: [overlay]
+                });
+                //添加底图
+                var layer = new ol.layer.Tile({
+                    source: new ol.source.TileSuperMapRest(ol.source.TileSuperMapRest.optionsFromMapJSON(urlQuery, mapJSONObj))
+                });
+                map.addLayer(layer);
+
+                SuperMap.SecurityManager.registerToken(urlDataFlow, window.exampleToken);
+
+                //添加dataflow
+                var source = new ol.source.DataFlow({
+                    ws: urlDataFlow
+                });
+                source.on("dataupdated", function(e) {
+                    var feature = e.value.data;
+                    content.innerHTML = feature.get("time");
+                    overlay.setPosition(feature.getGeometry().getCoordinates());
+                });
+                resultLayer = new ol.layer.Vector({
+                    source: source,
+                    style: new ol.style.Style({
+                        image: new ol.style.Circle({
+                            fill: new ol.style.Fill({
+                                color: "rgba(255,0,0,0.9)"
+                            }),
+                            radius: 6
+                        })
+                    })
+                });
+
+                //模拟实时数据 start
+                //查询一个线数据,每两秒将一个点通过dataFlowService广播给iSevrer的dataflow服务
+                query();
+                function query() {
+                    var param = new SuperMap.QueryBySQLParameters({
+                        queryParams: {
+                            name: "Main_Road_L@China#1",
+                            attributeFilter: "SMID = 1755"
+                        }
+                    });
+                    new ol.supermap.QueryService(urlQuery).queryBySQL(param, function(serviceResult) {
+                        featureResult = serviceResult;
+                        dataFlowBroadcast = new ol.supermap.DataFlowService(urlDataFlow).initBroadcast();
+                        dataFlowBroadcast.on("broadcastSocketConnected", function(e) {
+                            timer = window.setInterval("broadcast()", 2000);
+                        });
+                        map.addLayer(resultLayer);
+                    });
+                }
+            });
+            var count = 200;
+            function broadcast() {
+                if (count >= featureResult.result.recordsets[0].features.features[0].geometry.coordinates.length) {
+                    window.clearInterval(timer);
+                    return;
+                }
+                var point = featureResult.result.recordsets[0].features.features[0].geometry.coordinates[count];
+                var feature = {
+                    geometry: {
+                        coordinates: [point[0], point[1]],
+                        type: "Point"
+                    },
+                    type: "Feature",
+                    properties: {
+                        id: 1,
+                        time: new Date()
+                    }
+                };
+                dataFlowBroadcast.broadcast(feature);
+                count += 3;
+            }
+            //模拟实时数据 end
+        </script>
+    </body>
+</html>

+ 103 - 0
public/supermap/examples/openlayers/dragFeatures.html

@@ -0,0 +1,103 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_dragFeatures"></title>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            top: 50px;
+            right: 20px;
+        }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div class="btn-group" role="group" aria-label="...">
+        <button id="drag" value='Drag' type="button" class="btn btn-default" data-i18n="resources.btn_drag"></button>
+        <button id="none" value='None' type="button" class="btn btn-default" data-i18n="resources.text_input_value_notDrag"></button>
+    </div>
+</div>
+<script type="text/javascript" include="jquery,bootstrap" src="../js/include-web.js"></script>
+<script type="text/javascript">
+    var map, select, drag, source,
+        baseUrl = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World",
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/data-world/rest/data";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [116, 30],
+            zoom: 4,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: baseUrl,
+            wrapX: true
+        }),
+        projection: 'EPSG:4326'
+    });
+    map.addLayer(layer);
+    var sqlParam = new SuperMap.GetFeaturesBySQLParameters({
+        queryParameter: {
+            name: "Countries@World",
+            attributeFilter: "SMID = 247"
+        },
+        datasetNames: ["World:Countries"]
+    });
+    new ol.supermap.FeatureService(url).getFeaturesBySQL(sqlParam, function (serviceResult) {
+        source = new ol.source.Vector({
+            features: (new ol.format.GeoJSON()).readFeatures(serviceResult.result.features),
+            wrapX: false
+        });
+        map.addLayer(new ol.layer.Vector({
+            source: source
+        }));
+    });
+    var info = new ol.control.Control({element: document.getElementById('popup')});
+    info.setMap(map);
+    map.addControl(info);
+
+    var buttons = $('.btn-group').children();
+    buttons.map(function (key) {
+        var value = buttons[key].value;
+        if (value === 'None') {
+            $(buttons[key]).on('click', function () {
+                clearInteraction();
+            });
+            return;
+        }
+        $(buttons[key]).on('click', function () {
+            clearInteraction();
+            select = new ol.interaction.Select({
+                wrapX: false
+            });
+            drag = new ol.interaction.Translate({
+                features: select.getFeatures()
+            });
+            map.addInteraction(select);
+            map.addInteraction(drag);
+        });
+    });
+
+    function clearInteraction() {
+        if (drag) {
+            map.removeInteraction(drag);
+        }
+        if (select) {
+            map.removeInteraction(select);
+        }
+    }
+
+</script>
+</body>
+</html>

+ 97 - 0
public/supermap/examples/openlayers/drawFeatures.html

@@ -0,0 +1,97 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_drawFeatures"></title>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        .ol-popup {
+            position: absolute;
+            top: 50px;
+            right: 20px;
+        }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup" class="ol-popup">
+    <div class="btn-group" role="group" aria-label="...">
+        <button id="drawPoint" value='Point' type="button" class="btn btn-default" data-i18n="resources.text_input_value_drawPoint"></button>
+        <button id="drawLine" value='LineString' type="button" class="btn btn-default" data-i18n="resources.text_input_value_drawLine"></button>
+        <button id="drawPolygon" value='Polygon' type="button" class="btn btn-default" data-i18n="resources.text_input_value_drawPolygon"></button>
+        <button id="drawCircle" value='Circle' type="button" class="btn btn-default" data-i18n="resources.btn_drawCircle"></button>
+        <button id="none" value='None' type="button" class="btn btn-default" data-i18n="resources.btn_notDraw"></button>
+        <button id="clear" value='Clear' type="button" class="btn btn-default" data-i18n="resources.text_input_value_clear"></button>
+    </div>
+</div>
+<script type="text/javascript" include="jquery,bootstrap" src="../js/include-web.js"></script>
+<script type="text/javascript">
+    var map, draw,
+        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-china400/rest/maps/China";
+    map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [12957388, 4853991],
+            zoom: 4,
+            projection: 'EPSG:3857',
+            multiWorld: true
+        })
+    });
+    var layer = new ol.layer.Tile({
+        source: new ol.source.TileSuperMapRest({
+            url: url,
+            wrapX: true
+        }),
+        projection: 'EPSG:3857'
+    });
+    var source = new ol.source.Vector({wrapX: false});
+    var vector = new ol.layer.Vector({
+        source: source
+    });
+    map.addLayer(layer);
+    map.addLayer(vector);
+    var info = new ol.control.Control({element: document.getElementById('popup')});
+    info.setMap(map);
+    map.addControl(info);
+
+    var buttons = $('.btn-group').children();
+    buttons.map(function (key) {
+        var value = buttons[key].value;
+        if (value === 'None') {
+            $(buttons[key]).on('click', function () {
+                clearInteraction();
+            });
+            return;
+        }
+        if (value === 'Clear') {
+            $(buttons[key]).on('click', function () {
+                clearInteraction();
+                source.clear();
+            });
+            return;
+        }
+        $(buttons[key]).on('click', function () {
+            clearInteraction();
+            draw = new ol.interaction.Draw({
+                source: source,
+                type: buttons[key].value,
+                snapTolerance: 20
+            });
+            map.addInteraction(draw);
+        });
+    });
+
+    function clearInteraction() {
+        if (draw) {
+            map.removeInteraction(draw);
+        }
+    }
+
+</script>
+</body>
+</html>

+ 86 - 0
public/supermap/examples/openlayers/earthquakeHeatMapLayer.html

@@ -0,0 +1,86 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title data-i18n="resources.title_earthquakeHeatMapLayer"></title>
+    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        body {
+            margin: 0;
+            overflow: hidden;
+            background: #fff;
+            width: 100%;
+            height: 100%
+        }
+
+        #map {
+            position: absolute;
+            width: 100%;
+            height: 100%;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="map"></div>
+    <script type="text/javascript" include="jquery,papaparse" src="../js/include-web.js"></script>
+    <script type="text/javascript">
+        var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+        var url = host + "/iserver/services/map-world/rest/maps/World";
+        var map;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({ attributionOptions: { collapsible: false } }),
+            view: new ol.View({
+                center: [0, 0],
+                zoom: 2,
+                projection: 'EPSG:4326',
+                multiWorld: true
+            })
+        });
+        var iserverWorldLayer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest({
+                url: url,
+                wrapX: true
+            }),
+            projection: 'EPSG:4326'
+        });
+        map.addLayer(iserverWorldLayer);
+
+
+        //加载热力图
+        var radius = 15, heatFeatures = [], heatMapSource, heatMapLayer;
+        $.get('../data/chinaEarthquake.csv', function (csvstr) {
+            var data = Papa.parse(csvstr, { skipEmptyLines: true, header: true }).data;
+            for (var i = 0; i < data.length; i++) {
+                if (data[i].Y <= 85) {
+                    heatFeatures.push(new ol.Feature({
+                        geometry: new ol.geom.Point([data[i].X, data[i].Y]),
+                        Properties: { "value": data[i].level / 50 }
+                    }))
+                }
+            };
+            heatMapSource = new ol.source.HeatMap("heatMap", {
+                "map": map,
+                "id": "heatmap",
+                "radius": radius,
+                //权重
+                "featureWeight": "value",
+            });
+            heatMapSource.addFeatures(heatFeatures);
+            heatMapLayer = new ol.layer.Image({
+                source: heatMapSource
+            });
+            map.addLayer(heatMapLayer);
+        });
+
+
+    </script>
+</body>
+
+</html>

+ 131 - 0
public/supermap/examples/openlayers/echartsAnimatorCar.html

@@ -0,0 +1,131 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_animatorCar"></title>
+    <script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
+    <script type="text/javascript" include="echarts,ol3-echarts" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
+<script type="text/javascript">
+    var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+    var map, echartslayer, url = host + "/iserver/services/map-changchun/rest/maps/长春市区图";
+
+    var extent = [48.4, -7668.25, 8958.85, -55.58];
+    var projection = new ol.proj.Projection({
+        code:'',
+        extent: extent,
+        units: 'm'
+    });
+    new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
+        var mapJSONObj = serviceResult.result;
+        map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [4700, -3900],
+                zoom: 3,
+                projection: projection,
+                origin: [48.4, -55.58],
+                multiWorld: true
+            })
+        });
+        var layer = new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest(ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj))
+        });
+        map.addLayer(layer);
+
+        echartslayer = new ol3Echarts(null, {
+            hideOnMoving: true,
+            hideOnZooming: true,
+            //平面无投影坐标系不进行转换,绘制是不可转为其他投影坐标故设置此参数
+            source: projection,
+            destination: projection
+        });
+        echartslayer.appendTo(map);
+        queryData();
+    });
+
+    function queryData() {
+        var param = new SuperMap.QueryBySQLParameters({
+            queryParams: {
+                name: "BusLine@Changchun#1",
+                attributeFilter: "SmID > 0"
+            }
+        });
+        new ol.supermap.QueryService(url).queryBySQL(param, function (serviceResult) {
+            addlayers(processData(serviceResult.result.recordsets[0].features.features));
+        });
+
+        function processData(features) {
+            var busLines = [].concat.apply([], features.map(function (busLine) {
+                var points = busLine.geometry.coordinates;
+                return {
+                    coords: points,
+                    effect: {
+                        constantSpeed: 60,
+                        show: true,
+                        trailLength: 0,
+                        symbolSize: 30,
+                        symbol: function () {
+                            if ((Math.round(Math.random() * 2) % 2)) {
+                                return 'image://../classic/images/blueCar.png'
+                            } else {
+                                return 'image://../classic/images/redCar.png'
+                            }
+                        }()
+                    },
+                };
+            }));
+
+            return busLines;
+        }
+    }
+
+    function addlayers(busLines) {
+        var option = {
+            series: [{
+                type: 'lines',
+                polyline: true,
+                data: busLines,
+                silent: true,
+                lineStyle: {
+                    normal: {
+                        opacity: 1,
+                        width: 1,
+                        color: '#000'
+                    }
+                },
+                progressiveThreshold: 500,
+                progressive: 200,
+                zlevel: 2
+            },
+                {
+                    type: 'lines',
+                    polyline: true,
+                    data: busLines,
+                    lineStyle: {
+                        normal: {
+                            width: 0
+                        }
+                    },
+                    effect: {
+                        constantSpeed: 60,
+                        show: true,
+                        trailLength: 0,
+                        symbolSize: 30,
+                    },
+                    zlevel: 1
+                }]
+        };
+        echartslayer.setChartOptions(option);
+    }
+
+</script>
+</body>
+</html>

+ 162 - 0
public/supermap/examples/openlayers/echartsBar.html

@@ -0,0 +1,162 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_GraphBar"></title>
+    <script type="text/javascript" src="../js/include-web.js"></script>
+    <script type="text/javascript" include="echarts" src="../../dist/ol/include-ol.js"></script>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
+<div id="map" style="width: 100%;height:100%"></div>
+<div id="popup"></div>
+<script type="text/javascript">
+var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+    var resultLayer;
+    var map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [105.2, 31.6],
+            zoom: 5,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        layers: [new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest({
+                url: host+"/iserver/services/map-world/rest/maps/World",
+            }),
+            projection: 'EPSG:4326'
+        })]
+    });
+    var popup = new ol.Overlay({
+        element: document.getElementById('popup'),
+        offset: [5, 5]
+    });
+    map.addOverlay(popup);
+    var option = {
+        legend: {
+            data: [resources.text_rainfall, resources.text_runoff],
+            align: 'left'
+        },
+        toolbox: {
+            feature: {
+                magicType: {
+                    type: ['stack', 'tiled']
+                },
+                saveAsImage: {
+                    pixelRatio: 2
+                }
+            }
+        },
+        backgroundColor: '#fff',
+        tooltip: {},
+        xAxis: {
+            data: [resources.text_monday, resources.text_tuesday, resources.text_wednesday, resources.text_thursday, resources.text_friday, resources.text_saturday, resources.text_sunday],
+            silent: false,
+            splitLine: {
+                show: false
+            }
+        },
+        yAxis: {},
+        series: [{
+            name: 'bar',
+            type: 'bar',
+            animationDelay: function (idx) {
+                return idx * 10;
+            }
+        }, {
+            name: 'bar2',
+            type: 'bar',
+            animationDelay: function (idx) {
+                return idx * 10 + 100;
+            }
+        }],
+        animationEasing: 'elasticOut',
+        animationDelayUpdate: function (idx) {
+            return idx * 5;
+        }
+    };
+    var chart = echarts.init(document.createElement('div'), '', {
+        width: 500,
+        height: 300
+    });
+    chart.setOption(option);
+    query();
+    function query() {
+        clearLayer();
+        var queryService = new ol.supermap.QueryService(host+"/iserver/services/map-china400/rest/maps/China");
+        var param = new SuperMap.QueryBySQLParameters({
+            queryParams: [{
+                name: "China_ProCenCity_pt@China",
+                attributeFilter: "1 = 1"
+            }, {
+                name: "China_Capital_pt@China",
+                attributeFilter: "1 = 1"
+            }]
+        });
+        queryService.queryBySQL(param, function (serviceResult) {
+            var features = [];
+            for (var i = 0; i < serviceResult.result.recordsets.length; i++) {
+                var temp = (new ol.format.GeoJSON()).readFeatures(serviceResult.result.recordsets[i].features, {
+                    dataProjection: 'EPSG:3857',
+                    featureProjection: 'EPSG:4326'
+                });
+                features = features.concat(temp);
+            }
+            resultLayer = new ol.layer.Vector({
+                source: new ol.source.Vector({
+                    wrapX: false,
+                    features: features
+                })
+            });
+            map.addLayer(resultLayer);
+            var select = new ol.interaction.Select();
+            map.addInteraction(select);
+            select.on('select', function (e) {
+                if (this.getFeatures().getLength() > 0) {
+                    var city = this.getFeatures().item(0).getProperties().NAME;
+                    var data1 = [];
+                    var data2 = [];
+                    for (var i = 0; i < 7; i++) {
+                        var data = Math.random().toFixed(2);
+                        data1.push(data);
+                        data2.push(data * (Math.random() + 1.5));
+
+                    }
+                    chart.setOption({
+                        title: {
+                            text: city,
+                            subtext: resources.text_fictitiouData
+                        },
+                        series: [
+                            {
+                                name: resources.text_rainfall,
+                                data: data1,
+                            },
+                            {
+                                name: resources.text_runoff,
+                                data: data2,
+                            }
+                        ],
+                    });
+                    popup.setElement(chart.getDom());
+                    var coordinate = e.mapBrowserEvent.coordinate;
+                    popup.setPosition(coordinate);
+                } else {
+                    popup.setPosition(undefined);
+                }
+            });
+        });
+    }
+    function clearLayer() {
+        if (resultLayer) {
+            map.removeLayer(resultLayer);
+        }
+    }
+</script>
+</body>
+</html>

File diff suppressed because it is too large
+ 139 - 0
public/supermap/examples/openlayers/echartsCellMap.html


+ 331 - 0
public/supermap/examples/openlayers/echartsEarthquake.html

@@ -0,0 +1,331 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title data-i18n="resources.title_echartsEarthquake"></title>
+    <!-- 此范例基于 openlayers@4.6.5 & ol3-echarts@1.3.6 -->
+    <script type="text/javascript" include="ol@4.6.5,echarts,ol3-echarts@1.3.6" src="../../dist/ol/include-ol.js"></script>
+    <style>
+        body {
+            margin: 0;
+            overflow: hidden;
+            background: #fff;
+            width: 100%;
+            height: 100%
+        }
+
+        #map {
+            position: absolute;
+            width: 100%;
+            height: 100%;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="map"></div>
+    <script type="text/javascript" include="jquery,papaparse" src="../js/include-web.js"></script>
+    <script>
+        // 加载地图
+        var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+        var map, option, url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
+        var map = new ol.Map({
+            target: 'map',
+            controls: ol.control.defaults({ attributionOptions: { collapsed: false } })
+                .extend([new ol.supermap.control.Logo()]),
+            view: new ol.View({
+                center: [96, 36],
+                zoom: 5,
+                minZoom: 5,
+                projection: 'EPSG:4326',
+                multiWorld: true
+            }),
+            layers: [new ol.layer.Tile({
+                source: new ol.source.TileSuperMapRest({
+                    url: url,
+                    prjCoordSys: { "epsgCode": 4326 }
+                }),
+                projection: 'EPSG:4326'
+            })]
+        });
+
+
+        var echartslayer = new ol3Echarts(null, {
+            hideOnMoving: true,
+            hideOnZooming: true
+        });
+        echartslayer.appendTo(map);
+    
+        echartslayer.showLoading();
+        $.get('../data/chinaEarthquake.csv', function (csvstr) {
+
+            echartslayer.hideLoading();
+
+            var result = Papa.parse(csvstr, { skipEmptyLines: true, header: true }).data;
+
+            // 热力图数据
+            var heatPoints = [];
+            // 图表数据
+            var chartData = {};
+            for (var i = 0; i < result.length; i++) {
+                var item=result[i];
+
+                if (!item.date) continue;
+
+                var date = new Date(item.date);
+                var year = date.getFullYear();
+                var month = date.getMonth() + 1;
+                var point = [parseFloat(item.X), parseFloat(item.Y), parseFloat(item.level)];
+
+                //每一年的地震数据
+                if (heatPoints[year]) {
+                    heatPoints[year].push(point);
+                } else {
+                    heatPoints[year] = [point];
+                }
+
+                //每年每发生的地震次数
+                if (!chartData[year]) {
+                    chartData[year] = {};
+                    chartData[year][month] = 1;
+                } else {
+                    if (!chartData[year][month]) {
+                        chartData[year][month] = 1;
+                    } else {
+                        chartData[year][month]++;
+                    }
+                }
+            }
+
+            //echarts option
+            var option = {
+                baseOption: {
+                    animationDurationUpdate: 1000,
+                    animationEasingUpdate: 'quinticInOut',
+                    timeline: {
+                        axisType: 'category',
+                        orient: 'vertical',
+                        autoPlay: true,
+                        inverse: true,
+                        playInterval: 3000,
+                        left: null,
+                        right: 30,
+                        top: 20,
+                        bottom: 40,
+                        width: 55,
+                        height: null,
+                        label: {
+                            normal: { textStyle: { color: '#ddd' } },
+                            emphasis: { textStyle: { color: '#fff' } }
+                        },
+                        symbol: 'none',
+                        lineStyle: { color: '#555' },
+                        checkpointStyle: { color: '#bbb', borderColor: '#777', borderWidth: 2 },
+                        controlStyle: {
+                            showNextBtn: false,
+                            showPrevBtn: false,
+                            normal: { color: '#666', borderColor: '#666' },
+                            emphasis: { color: '#aaa', borderColor: '#aaa' }
+                        },
+                        data: ['2005', '2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016']
+                    },
+
+                    title: {
+                        text: resources.text_echartsEarthquake_title,
+                        subtext: resources.text_echartsEarthquake_sub_title,
+                        left: 'center',
+                        top: 50,
+                        textStyle: { fontSize: 25, color: 'rgba(255,255,255, 0.9)' }
+                    }
+                },
+                options: []
+            }
+
+            //options
+            for (var j = 2005; j <= 2016; j++) {
+                var dataAxis = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
+                var echartsChartData = [
+                    chartData[j][1], chartData[j][2], chartData[j][3], chartData[j][4],
+                    chartData[j][5], chartData[j][6], chartData[j][7], chartData[j][8],
+                    chartData[j][9], chartData[j][10], chartData[j][11], chartData[j][12]
+                ];
+                var yMax = 400;
+                var dataShadow = [];
+                for (var i = 0; i < echartsChartData.length; i++) {
+                    dataShadow.push(yMax);
+                }
+                option.options.push({
+                    visualMap: {
+                        show: false,
+                        top: 'top',
+                        min: 0,
+                        max: 5,
+                        seriesIndex: 0,
+                        calculable: true,
+                        inRange: { color: ['blue', 'blue', 'green', 'yellow', 'red'] }
+                    },
+                    grid: {
+                        left: 50,
+                        bottom: '10%',
+                        width: '30%',
+                        height: '30%',
+                        textStyle: {
+                            color: "#fff"
+                        },
+                    },
+                    tooltip: {
+                        trigger: "item",
+                        textStyle: {
+                            fontSize: 12
+                        },
+                        formatter: "{b0}:{c0}"
+                    },
+                    xAxis: [{
+                        type: "category",
+                        axisLine: {
+                            lineStyle: { color: '#90979c' }
+                        },
+                        splitLine: { show: false },
+                        axisTick: { show: false },
+                        splitArea: { show: false },
+                        xisLabel: { interval: 0, },
+                        data: dataAxis,
+                    }],
+                    yAxis: [{
+                        type: "value",
+                        splitLine: { show: false },
+                        axisLine: {
+                            lineStyle: { color: '#90979c' }
+                        },
+                        axisTick: { show: false },
+                        axisLabel: { interval: 0, },
+                        splitArea: { show: false }
+                    }],
+
+                    series: [
+                        // heatmap
+                        {
+                            type: 'heatmap',
+                            coordinateSystem: "openlayers",
+                            data: heatPoints[j],
+                            pointSize: 5,
+                            blurSize: 15
+                        },
+                        // For shadow bar
+                        {
+                            type: 'bar',
+                            itemStyle: {
+                                normal: { color: 'rgba(0,0,0,0.05)' }
+                            },
+                            barGap: '-100%',
+                            barCategoryGap: '40%',
+                            data: dataShadow,
+                            animation: false
+                        },
+                        // bar
+                        {
+                            type: 'bar',
+                            itemStyle: {
+                                normal: {
+                                    color: new echarts.graphic.LinearGradient(
+                                        0, 0, 0, 1,
+                                        [
+                                            { offset: 0, color: 'red' },
+                                            { offset: 0.5, color: 'yellow' },
+                                            { offset: 1, color: 'red' }
+                                        ]
+                                    ),
+                                    barBorderRadius: 15
+                                },
+                                emphasis: {
+                                    color: new echarts.graphic.LinearGradient(
+                                        0, 0, 0, 1,
+                                        [
+                                            { offset: 0, color: 'red' },
+                                            { offset: 0.7, color: 'yellow' },
+                                            { offset: 1, color: 'red' }
+                                        ]
+                                    )
+                                },
+                            },
+                            barWidth: 20,
+                            bargap: 5,
+                            data: echartsChartData
+                        },
+                        // line
+                        {
+                            type: "line",
+                            symbolSize: 10,
+                            symbol: 'circle',
+                            itemStyle: {
+                                normal: {
+                                    color: "rgba(252,230,48,1)",
+                                    barBorderRadius: 0,
+                                    label: {
+                                        show: true,
+                                        position: "top",
+                                        formatter: function (p) { return p.value > 0 ? (p.value) : ''; }
+                                    }
+                                }
+                            },
+                            data: echartsChartData
+                        },
+                        // pie
+                        {
+                            type: 'pie',
+                            radius: '30%',
+                            center: ['15%', '25%'],
+                            data: [
+                                { value: echartsChartData[0] + echartsChartData[1] + echartsChartData[2], name: resources.text_quarter_1 },
+                                { value: echartsChartData[3] + echartsChartData[4] + echartsChartData[5], name: resources.text_quarter_2 },
+                                { value: echartsChartData[6] + echartsChartData[7] + echartsChartData[8], name: resources.text_quarter_3 },
+                                { value: echartsChartData[9] + echartsChartData[10] + echartsChartData[11], name: resources.text_quarter_4 }
+                            ].sort(function (a, b) {
+                                return a.value - b.value
+                            }),
+                            roseType: 'angle',
+                            label: {
+                                normal: {
+                                    textStyle: {
+                                        color: 'rgba(255, 255, 255, 0.7)'
+                                    }
+                                }
+                            },
+                            labelLine: {
+                                normal: {
+                                    lineStyle: {
+                                        color: 'rgba(255, 255, 255, 0.7)'
+                                    },
+                                    smooth: 0.2,
+                                    length: 10,
+                                    length2: 20
+                                }
+                            },
+                            itemStyle: {
+                                normal: {
+                                    color: 'orange',
+                                    shadowBlur: 200,
+                                    shadowColor: 'rgba(0, 0, 0, 0.5)'
+                                }
+                            },
+                            animationType: 'scale',
+                            animationEasing: 'elasticOut',
+                            animationDelay: function (idx) {
+                                return Math.random() * 200;
+                            }
+                        }
+                    ]
+                })
+            }
+
+            echartslayer.setChartOptions(option);
+        });
+    </script>
+</body>
+
+</html>

+ 527 - 0
public/supermap/examples/openlayers/echartsEffectScatter.html

@@ -0,0 +1,527 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_effectScatter"></title>
+    <script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
+    <script type="text/javascript" include="echarts,ol3-echarts" src="../../dist/ol/include-ol.js"></script>
+    <style>
+      .ol-overlaycontainer-stopevent{
+        height: 0% !important;
+      }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
+<script type="text/javascript">
+    var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+    var map, option, url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
+    var map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+                .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [104, 36],
+            zoom: 5,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        layers: [new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest({
+                url: url,
+                prjCoordSys: {"epsgCode": 4326}
+            }),
+            projection: 'EPSG:4326'
+        })]
+    });
+
+    var echartslayer = new ol3Echarts(null, {
+        hideOnMoving: true,
+        hideOnZooming: true
+    });
+    echartslayer.appendTo(map);
+
+    var data = [
+        {name: '海门', value: 9},
+        {name: '鄂尔多斯', value: 12},
+        {name: '招远', value: 12},
+        {name: '舟山', value: 12},
+        {name: '齐齐哈尔', value: 14},
+        {name: '盐城', value: 15},
+        {name: '赤峰', value: 16},
+        {name: '青岛', value: 18},
+        {name: '乳山', value: 18},
+        {name: '金昌', value: 19},
+        {name: '泉州', value: 21},
+        {name: '莱西', value: 21},
+        {name: '日照', value: 21},
+        {name: '胶南', value: 22},
+        {name: '南通', value: 23},
+        {name: '拉萨', value: 24},
+        {name: '云浮', value: 24},
+        {name: '梅州', value: 25},
+        {name: '文登', value: 25},
+        {name: '上海', value: 25},
+        {name: '攀枝花', value: 25},
+        {name: '威海', value: 25},
+        {name: '承德', value: 25},
+        {name: '厦门', value: 26},
+        {name: '汕尾', value: 26},
+        {name: '潮州', value: 26},
+        {name: '丹东', value: 27},
+        {name: '太仓', value: 27},
+        {name: '曲靖', value: 27},
+        {name: '烟台', value: 28},
+        {name: '福州', value: 29},
+        {name: '瓦房店', value: 30},
+        {name: '即墨', value: 30},
+        {name: '抚顺', value: 31},
+        {name: '玉溪', value: 31},
+        {name: '张家口', value: 31},
+        {name: '阳泉', value: 31},
+        {name: '莱州', value: 32},
+        {name: '湖州', value: 32},
+        {name: '汕头', value: 32},
+        {name: '昆山', value: 33},
+        {name: '宁波', value: 33},
+        {name: '湛江', value: 33},
+        {name: '揭阳', value: 34},
+        {name: '荣成', value: 34},
+        {name: '连云港', value: 35},
+        {name: '葫芦岛', value: 35},
+        {name: '常熟', value: 36},
+        {name: '东莞', value: 36},
+        {name: '河源', value: 36},
+        {name: '淮安', value: 36},
+        {name: '泰州', value: 36},
+        {name: '南宁', value: 37},
+        {name: '营口', value: 37},
+        {name: '惠州', value: 37},
+        {name: '江阴', value: 37},
+        {name: '蓬莱', value: 37},
+        {name: '韶关', value: 38},
+        {name: '嘉峪关', value: 38},
+        {name: '广州', value: 38},
+        {name: '延安', value: 38},
+        {name: '太原', value: 39},
+        {name: '清远', value: 39},
+        {name: '中山', value: 39},
+        {name: '昆明', value: 39},
+        {name: '寿光', value: 40},
+        {name: '盘锦', value: 40},
+        {name: '长治', value: 41},
+        {name: '深圳', value: 41},
+        {name: '珠海', value: 42},
+        {name: '宿迁', value: 43},
+        {name: '咸阳', value: 43},
+        {name: '铜川', value: 44},
+        {name: '平度', value: 44},
+        {name: '佛山', value: 44},
+        {name: '海口', value: 44},
+        {name: '江门', value: 45},
+        {name: '章丘', value: 45},
+        {name: '肇庆', value: 46},
+        {name: '大连', value: 47},
+        {name: '临汾', value: 47},
+        {name: '吴江', value: 47},
+        {name: '石嘴山', value: 49},
+        {name: '沈阳', value: 50},
+        {name: '苏州', value: 50},
+        {name: '茂名', value: 50},
+        {name: '嘉兴', value: 51},
+        {name: '长春', value: 51},
+        {name: '胶州', value: 52},
+        {name: '银川', value: 52},
+        {name: '张家港', value: 52},
+        {name: '三门峡', value: 53},
+        {name: '锦州', value: 54},
+        {name: '南昌', value: 54},
+        {name: '柳州', value: 54},
+        {name: '三亚', value: 54},
+        {name: '自贡', value: 56},
+        {name: '吉林', value: 56},
+        {name: '阳江', value: 57},
+        {name: '泸州', value: 57},
+        {name: '西宁', value: 57},
+        {name: '宜宾', value: 58},
+        {name: '呼和浩特', value: 58},
+        {name: '成都', value: 58},
+        {name: '大同', value: 58},
+        {name: '镇江', value: 59},
+        {name: '桂林', value: 59},
+        {name: '张家界', value: 59},
+        {name: '宜兴', value: 59},
+        {name: '北海', value: 60},
+        {name: '西安', value: 61},
+        {name: '金坛', value: 62},
+        {name: '东营', value: 62},
+        {name: '牡丹江', value: 63},
+        {name: '遵义', value: 63},
+        {name: '绍兴', value: 63},
+        {name: '扬州', value: 64},
+        {name: '常州', value: 64},
+        {name: '潍坊', value: 65},
+        {name: '重庆', value: 66},
+        {name: '台州', value: 67},
+        {name: '南京', value: 67},
+        {name: '滨州', value: 70},
+        {name: '贵阳', value: 71},
+        {name: '无锡', value: 71},
+        {name: '本溪', value: 71},
+        {name: '克拉玛依', value: 72},
+        {name: '渭南', value: 72},
+        {name: '马鞍山', value: 72},
+        {name: '宝鸡', value: 72},
+        {name: '焦作', value: 75},
+        {name: '句容', value: 75},
+        {name: '北京', value: 79},
+        {name: '徐州', value: 79},
+        {name: '衡水', value: 80},
+        {name: '包头', value: 80},
+        {name: '绵阳', value: 80},
+        {name: '乌鲁木齐', value: 84},
+        {name: '枣庄', value: 84},
+        {name: '杭州', value: 84},
+        {name: '淄博', value: 85},
+        {name: '鞍山', value: 86},
+        {name: '溧阳', value: 86},
+        {name: '库尔勒', value: 86},
+        {name: '安阳', value: 90},
+        {name: '开封', value: 90},
+        {name: '济南', value: 92},
+        {name: '德阳', value: 93},
+        {name: '温州', value: 95},
+        {name: '九江', value: 96},
+        {name: '邯郸', value: 98},
+        {name: '临安', value: 99},
+        {name: '兰州', value: 99},
+        {name: '沧州', value: 100},
+        {name: '临沂', value: 103},
+        {name: '南充', value: 104},
+        {name: '天津', value: 105},
+        {name: '富阳', value: 106},
+        {name: '泰安', value: 112},
+        {name: '诸暨', value: 112},
+        {name: '郑州', value: 113},
+        {name: '哈尔滨', value: 114},
+        {name: '聊城', value: 116},
+        {name: '芜湖', value: 117},
+        {name: '唐山', value: 119},
+        {name: '平顶山', value: 119},
+        {name: '邢台', value: 119},
+        {name: '德州', value: 120},
+        {name: '济宁', value: 120},
+        {name: '荆州', value: 127},
+        {name: '宜昌', value: 130},
+        {name: '义乌', value: 132},
+        {name: '丽水', value: 133},
+        {name: '洛阳', value: 134},
+        {name: '秦皇岛', value: 136},
+        {name: '株洲', value: 143},
+        {name: '石家庄', value: 147},
+        {name: '莱芜', value: 148},
+        {name: '常德', value: 152},
+        {name: '保定', value: 153},
+        {name: '湘潭', value: 154},
+        {name: '金华', value: 157},
+        {name: '岳阳', value: 169},
+        {name: '长沙', value: 175},
+        {name: '衢州', value: 177},
+        {name: '廊坊', value: 193},
+        {name: '菏泽', value: 194},
+        {name: '合肥', value: 229},
+        {name: '武汉', value: 273},
+        {name: '大庆', value: 279}
+    ];
+    var geoCoordMap = {
+        '海门': [121.15, 31.89],
+        '鄂尔多斯': [109.781327, 39.608266],
+        '招远': [120.38, 37.35],
+        '舟山': [122.207216, 29.985295],
+        '齐齐哈尔': [123.97, 47.33],
+        '盐城': [120.13, 33.38],
+        '赤峰': [118.87, 42.28],
+        '青岛': [120.33, 36.07],
+        '乳山': [121.52, 36.89],
+        '金昌': [102.188043, 38.520089],
+        '泉州': [118.58, 24.93],
+        '莱西': [120.53, 36.86],
+        '日照': [119.46, 35.42],
+        '胶南': [119.97, 35.88],
+        '南通': [121.05, 32.08],
+        '拉萨': [91.11, 29.97],
+        '云浮': [112.02, 22.93],
+        '梅州': [116.1, 24.55],
+        '文登': [122.05, 37.2],
+        '上海': [121.48, 31.22],
+        '攀枝花': [101.718637, 26.582347],
+        '威海': [122.1, 37.5],
+        '承德': [117.93, 40.97],
+        '厦门': [118.1, 24.46],
+        '汕尾': [115.375279, 22.786211],
+        '潮州': [116.63, 23.68],
+        '丹东': [124.37, 40.13],
+        '太仓': [121.1, 31.45],
+        '曲靖': [103.79, 25.51],
+        '烟台': [121.39, 37.52],
+        '福州': [119.3, 26.08],
+        '瓦房店': [121.979603, 39.627114],
+        '即墨': [120.45, 36.38],
+        '抚顺': [123.97, 41.97],
+        '玉溪': [102.52, 24.35],
+        '张家口': [114.87, 40.82],
+        '阳泉': [113.57, 37.85],
+        '莱州': [119.942327, 37.177017],
+        '湖州': [120.1, 30.86],
+        '汕头': [116.69, 23.39],
+        '昆山': [120.95, 31.39],
+        '宁波': [121.56, 29.86],
+        '湛江': [110.359377, 21.270708],
+        '揭阳': [116.35, 23.55],
+        '荣成': [122.41, 37.16],
+        '连云港': [119.16, 34.59],
+        '葫芦岛': [120.836932, 40.711052],
+        '常熟': [120.74, 31.64],
+        '东莞': [113.75, 23.04],
+        '河源': [114.68, 23.73],
+        '淮安': [119.15, 33.5],
+        '泰州': [119.9, 32.49],
+        '南宁': [108.33, 22.84],
+        '营口': [122.18, 40.65],
+        '惠州': [114.4, 23.09],
+        '江阴': [120.26, 31.91],
+        '蓬莱': [120.75, 37.8],
+        '韶关': [113.62, 24.84],
+        '嘉峪关': [98.289152, 39.77313],
+        '广州': [113.23, 23.16],
+        '延安': [109.47, 36.6],
+        '太原': [112.53, 37.87],
+        '清远': [113.01, 23.7],
+        '中山': [113.38, 22.52],
+        '昆明': [102.73, 25.04],
+        '寿光': [118.73, 36.86],
+        '盘锦': [122.070714, 41.119997],
+        '长治': [113.08, 36.18],
+        '深圳': [114.07, 22.62],
+        '珠海': [113.52, 22.3],
+        '宿迁': [118.3, 33.96],
+        '咸阳': [108.72, 34.36],
+        '铜川': [109.11, 35.09],
+        '平度': [119.97, 36.77],
+        '佛山': [113.11, 23.05],
+        '海口': [110.35, 20.02],
+        '江门': [113.06, 22.61],
+        '章丘': [117.53, 36.72],
+        '肇庆': [112.44, 23.05],
+        '大连': [121.62, 38.92],
+        '临汾': [111.5, 36.08],
+        '吴江': [120.63, 31.16],
+        '石嘴山': [106.39, 39.04],
+        '沈阳': [123.38, 41.8],
+        '苏州': [120.62, 31.32],
+        '茂名': [110.88, 21.68],
+        '嘉兴': [120.76, 30.77],
+        '长春': [125.35, 43.88],
+        '胶州': [120.03336, 36.264622],
+        '银川': [106.27, 38.47],
+        '张家港': [120.555821, 31.875428],
+        '三门峡': [111.19, 34.76],
+        '锦州': [121.15, 41.13],
+        '南昌': [115.89, 28.68],
+        '柳州': [109.4, 24.33],
+        '三亚': [109.511909, 18.252847],
+        '自贡': [104.778442, 29.33903],
+        '吉林': [126.57, 43.87],
+        '阳江': [111.95, 21.85],
+        '泸州': [105.39, 28.91],
+        '西宁': [101.74, 36.56],
+        '宜宾': [104.56, 29.77],
+        '呼和浩特': [111.65, 40.82],
+        '成都': [104.06, 30.67],
+        '大同': [113.3, 40.12],
+        '镇江': [119.44, 32.2],
+        '桂林': [110.28, 25.29],
+        '张家界': [110.479191, 29.117096],
+        '宜兴': [119.82, 31.36],
+        '北海': [109.12, 21.49],
+        '西安': [108.95, 34.27],
+        '金坛': [119.56, 31.74],
+        '东营': [118.49, 37.46],
+        '牡丹江': [129.58, 44.6],
+        '遵义': [106.9, 27.7],
+        '绍兴': [120.58, 30.01],
+        '扬州': [119.42, 32.39],
+        '常州': [119.95, 31.79],
+        '潍坊': [119.1, 36.62],
+        '重庆': [106.54, 29.59],
+        '台州': [121.420757, 28.656386],
+        '南京': [118.78, 32.04],
+        '滨州': [118.03, 37.36],
+        '贵阳': [106.71, 26.57],
+        '无锡': [120.29, 31.59],
+        '本溪': [123.73, 41.3],
+        '克拉玛依': [84.77, 45.59],
+        '渭南': [109.5, 34.52],
+        '马鞍山': [118.48, 31.56],
+        '宝鸡': [107.15, 34.38],
+        '焦作': [113.21, 35.24],
+        '句容': [119.16, 31.95],
+        '北京': [116.46, 39.92],
+        '徐州': [117.2, 34.26],
+        '衡水': [115.72, 37.72],
+        '包头': [110, 40.58],
+        '绵阳': [104.73, 31.48],
+        '乌鲁木齐': [87.68, 43.77],
+        '枣庄': [117.57, 34.86],
+        '杭州': [120.19, 30.26],
+        '淄博': [118.05, 36.78],
+        '鞍山': [122.85, 41.12],
+        '溧阳': [119.48, 31.43],
+        '库尔勒': [86.06, 41.68],
+        '安阳': [114.35, 36.1],
+        '开封': [114.35, 34.79],
+        '济南': [117, 36.65],
+        '德阳': [104.37, 31.13],
+        '温州': [120.65, 28.01],
+        '九江': [115.97, 29.71],
+        '邯郸': [114.47, 36.6],
+        '临安': [119.72, 30.23],
+        '兰州': [103.73, 36.03],
+        '沧州': [116.83, 38.33],
+        '临沂': [118.35, 35.05],
+        '南充': [106.110698, 30.837793],
+        '天津': [117.2, 39.13],
+        '富阳': [119.95, 30.07],
+        '泰安': [117.13, 36.18],
+        '诸暨': [120.23, 29.71],
+        '郑州': [113.65, 34.76],
+        '哈尔滨': [126.63, 45.75],
+        '聊城': [115.97, 36.45],
+        '芜湖': [118.38, 31.33],
+        '唐山': [118.02, 39.63],
+        '平顶山': [113.29, 33.75],
+        '邢台': [114.48, 37.05],
+        '德州': [116.29, 37.45],
+        '济宁': [116.59, 35.38],
+        '荆州': [112.239741, 30.335165],
+        '宜昌': [111.3, 30.7],
+        '义乌': [120.06, 29.32],
+        '丽水': [119.92, 28.45],
+        '洛阳': [112.44, 34.7],
+        '秦皇岛': [119.57, 39.95],
+        '株洲': [113.16, 27.83],
+        '石家庄': [114.48, 38.03],
+        '莱芜': [117.67, 36.19],
+        '常德': [111.69, 29.05],
+        '保定': [115.48, 38.85],
+        '湘潭': [112.91, 27.87],
+        '金华': [119.64, 29.12],
+        '岳阳': [113.09, 29.37],
+        '长沙': [113, 28.21],
+        '衢州': [118.88, 28.97],
+        '廊坊': [116.7, 39.53],
+        '菏泽': [115.480656, 35.23375],
+        '合肥': [117.27, 31.86],
+        '武汉': [114.31, 30.52],
+        '大庆': [125.03, 46.58]
+    };
+    var convertData = function (data) {
+        var res = [];
+        for (var i = 0; i < data.length; i++) {
+            var geoCoord = geoCoordMap[data[i].name];
+            if (geoCoord) {
+                res.push({
+                    name: data[i].name,
+                    value: geoCoord.concat(data[i].value)
+                });
+            }
+        }
+        return res;
+    };
+    option = {
+        title: {
+            text: resources.text_effectScatter,
+            subtext: 'data from PM25.in',
+            sublink: 'http://www.pm25.in',
+            left: 'center',
+            textStyle: {
+                color: '#fff'
+            }
+        },
+        tooltip: {
+            trigger: 'item'
+        },
+        legend: {
+            orient: 'vertical',
+            y: 'bottom',
+            x: 'left',
+            data: ['pm2.5'],
+            textStyle: {
+                color: '#fff'
+            }
+        },
+        series: [
+            {
+                name: 'pm2.5',
+                type: 'scatter',
+                coordinateSystem: 'geo',
+                data: convertData(data),
+                symbolSize: function (val) {
+                    return val[2] / 10;
+                },
+                label: {
+                    normal: {
+                        formatter: '{b}',
+                        position: 'right',
+                        show: false
+                    },
+                    emphasis: {
+                        show: true
+                    }
+                },
+                itemStyle: {
+                    normal: {
+                        color: '#ddb926'
+                    }
+                }
+            },
+            {
+                name: 'Top 5',
+                type: 'effectScatter',
+                data: convertData(data.sort(function (a, b) {
+                    return b.value - a.value;
+                }).slice(0, 6)),
+                symbolSize: function (val) {
+                    return val[2] / 10;
+                },
+                showEffectOn: 'render',
+                rippleEffect: {
+                    brushType: 'stroke'
+                },
+                hoverAnimation: true,
+                label: {
+                    normal: {
+                        formatter: '{b}',
+                        position: 'right',
+                        show: true
+                    }
+                },
+                itemStyle: {
+                    normal: {
+                        color: '#f4e925',
+                        shadowBlur: 10,
+                        shadowColor: '#333'
+                    }
+                },
+                zlevel: 1
+            }
+        ]
+    };
+
+    echartslayer.setChartOptions(option);
+</script>
+</body>
+</html>

+ 332 - 0
public/supermap/examples/openlayers/echartsGeoLines.html

@@ -0,0 +1,332 @@
+<!--********************************************************************
+* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
+*********************************************************************-->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title data-i18n="resources.title_geoline"></title>
+    <script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
+    <script type="text/javascript" include="echarts,ol3-echarts" src="../../dist/ol/include-ol.js"></script>
+    <style>
+      .ol-overlaycontainer-stopevent{
+        height: 0% !important;
+      }
+    </style>
+</head>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
+<script type="text/javascript">
+    var host = window.isLocal ? window.server : "https://iserver.supermap.io";
+    var map, echartsOptions, url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
+    var map = new ol.Map({
+        target: 'map',
+        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
+            .extend([new ol.supermap.control.Logo()]),
+        view: new ol.View({
+            center: [104, 36],
+            zoom: 5,
+            projection: 'EPSG:4326',
+            multiWorld: true
+        }),
+        layers: [new ol.layer.Tile({
+            source: new ol.source.TileSuperMapRest({
+                url: url,
+                prjCoordSys: {"epsgCode": 4326}
+            }),
+            projection: 'EPSG:4326'
+        })]
+    });
+    var echartslayer = new ol3Echarts(null, {
+        hideOnMoving: true,
+        hideOnZooming: true
+    });
+    echartslayer.appendTo(map);
+
+
+    var geoCoordMap = {
+        '上海': [121.4648, 31.2891],
+        '东莞': [113.8953, 22.901],
+        '东营': [118.7073, 37.5513],
+        '中山': [113.4229, 22.478],
+        '临汾': [111.4783, 36.1615],
+        '临沂': [118.3118, 35.2936],
+        '丹东': [124.541, 40.4242],
+        '丽水': [119.5642, 28.1854],
+        '乌鲁木齐': [87.9236, 43.5883],
+        '佛山': [112.8955, 23.1097],
+        '保定': [115.0488, 39.0948],
+        '兰州': [103.5901, 36.3043],
+        '包头': [110.3467, 41.4899],
+        '北京': [116.4551, 40.2539],
+        '北海': [109.314, 21.6211],
+        '南京': [118.8062, 31.9208],
+        '南宁': [108.479, 23.1152],
+        '南昌': [116.0046, 28.6633],
+        '南通': [121.1023, 32.1625],
+        '厦门': [118.1689, 24.6478],
+        '台州': [121.1353, 28.6688],
+        '合肥': [117.29, 32.0581],
+        '呼和浩特': [111.4124, 40.4901],
+        '咸阳': [108.4131, 34.8706],
+        '哈尔滨': [127.9688, 45.368],
+        '唐山': [118.4766, 39.6826],
+        '嘉兴': [120.9155, 30.6354],
+        '大同': [113.7854, 39.8035],
+        '大连': [122.2229, 39.4409],
+        '天津': [117.4219, 39.4189],
+        '太原': [112.3352, 37.9413],
+        '威海': [121.9482, 37.1393],
+        '宁波': [121.5967, 29.6466],
+        '宝鸡': [107.1826, 34.3433],
+        '宿迁': [118.5535, 33.7775],
+        '常州': [119.4543, 31.5582],
+        '广州': [113.5107, 23.2196],
+        '廊坊': [116.521, 39.0509],
+        '延安': [109.1052, 36.4252],
+        '张家口': [115.1477, 40.8527],
+        '徐州': [117.5208, 34.3268],
+        '德州': [116.6858, 37.2107],
+        '惠州': [114.6204, 23.1647],
+        '成都': [103.9526, 30.7617],
+        '扬州': [119.4653, 32.8162],
+        '承德': [117.5757, 41.4075],
+        '拉萨': [91.1865, 30.1465],
+        '无锡': [120.3442, 31.5527],
+        '日照': [119.2786, 35.5023],
+        '昆明': [102.9199, 25.4663],
+        '杭州': [119.5313, 29.8773],
+        '枣庄': [117.323, 34.8926],
+        '柳州': [109.3799, 24.9774],
+        '株洲': [113.5327, 27.0319],
+        '武汉': [114.3896, 30.6628],
+        '汕头': [117.1692, 23.3405],
+        '江门': [112.6318, 22.1484],
+        '沈阳': [123.1238, 42.1216],
+        '沧州': [116.8286, 38.2104],
+        '河源': [114.917, 23.9722],
+        '泉州': [118.3228, 25.1147],
+        '泰安': [117.0264, 36.0516],
+        '泰州': [120.0586, 32.5525],
+        '济南': [117.1582, 36.8701],
+        '济宁': [116.8286, 35.3375],
+        '海口': [110.3893, 19.8516],
+        '淄博': [118.0371, 36.6064],
+        '淮安': [118.927, 33.4039],
+        '深圳': [114.5435, 22.5439],
+        '清远': [112.9175, 24.3292],
+        '温州': [120.498, 27.8119],
+        '渭南': [109.7864, 35.0299],
+        '湖州': [119.8608, 30.7782],
+        '湘潭': [112.5439, 27.7075],
+        '滨州': [117.8174, 37.4963],
+        '潍坊': [119.0918, 36.524],
+        '烟台': [120.7397, 37.5128],
+        '玉溪': [101.9312, 23.8898],
+        '珠海': [113.7305, 22.1155],
+        '盐城': [120.2234, 33.5577],
+        '盘锦': [121.9482, 41.0449],
+        '石家庄': [114.4995, 38.1006],
+        '福州': [119.4543, 25.9222],
+        '秦皇岛': [119.2126, 40.0232],
+        '绍兴': [120.564, 29.7565],
+        '聊城': [115.9167, 36.4032],
+        '肇庆': [112.1265, 23.5822],
+        '舟山': [122.2559, 30.2234],
+        '苏州': [120.6519, 31.3989],
+        '莱芜': [117.6526, 36.2714],
+        '菏泽': [115.6201, 35.2057],
+        '营口': [122.4316, 40.4297],
+        '葫芦岛': [120.1575, 40.578],
+        '衡水': [115.8838, 37.7161],
+        '衢州': [118.6853, 28.8666],
+        '西宁': [101.4038, 36.8207],
+        '西安': [109.1162, 34.2004],
+        '贵阳': [106.6992, 26.7682],
+        '连云港': [119.1248, 34.552],
+        '邢台': [114.8071, 37.2821],
+        '邯郸': [114.4775, 36.535],
+        '郑州': [113.4668, 34.6234],
+        '鄂尔多斯': [108.9734, 39.2487],
+        '重庆': [107.7539, 30.1904],
+        '金华': [120.0037, 29.1028],
+        '铜川': [109.0393, 35.1947],
+        '银川': [106.3586, 38.1775],
+        '镇江': [119.4763, 31.9702],
+        '长春': [125.8154, 44.2584],
+        '长沙': [113.0823, 28.2568],
+        '长治': [112.8625, 36.4746],
+        '阳泉': [113.4778, 38.0951],
+        '青岛': [120.4651, 36.3373],
+        '韶关': [113.7964, 24.7028]
+    };
+
+    var BJData = [
+        [{name: '北京'}, {name: '上海', value: 95}],
+        [{name: '北京'}, {name: '广州', value: 90}],
+        [{name: '北京'}, {name: '大连', value: 80}],
+        [{name: '北京'}, {name: '南宁', value: 70}],
+        [{name: '北京'}, {name: '南昌', value: 60}],
+        [{name: '北京'}, {name: '拉萨', value: 50}],
+        [{name: '北京'}, {name: '长春', value: 40}],
+        [{name: '北京'}, {name: '包头', value: 30}],
+        [{name: '北京'}, {name: '重庆', value: 20}],
+        [{name: '北京'}, {name: '常州', value: 10}]
+    ];
+
+    var SHData = [
+        [{name: '上海'}, {name: '包头', value: 95}],
+        [{name: '上海'}, {name: '昆明', value: 90}],
+        [{name: '上海'}, {name: '广州', value: 80}],
+        [{name: '上海'}, {name: '郑州', value: 70}],
+        [{name: '上海'}, {name: '长春', value: 60}],
+        [{name: '上海'}, {name: '重庆', value: 50}],
+        [{name: '上海'}, {name: '长沙', value: 40}],
+        [{name: '上海'}, {name: '北京', value: 30}],
+        [{name: '上海'}, {name: '丹东', value: 20}],
+        [{name: '上海'}, {name: '大连', value: 10}]
+    ];
+
+    var GZData = [
+        [{name: '广州'}, {name: '福州', value: 95}],
+        [{name: '广州'}, {name: '太原', value: 90}],
+        [{name: '广州'}, {name: '长春', value: 80}],
+        [{name: '广州'}, {name: '重庆', value: 70}],
+        [{name: '广州'}, {name: '西安', value: 60}],
+        [{name: '广州'}, {name: '成都', value: 50}],
+        [{name: '广州'}, {name: '常州', value: 40}],
+        [{name: '广州'}, {name: '北京', value: 30}],
+        [{name: '广州'}, {name: '北海', value: 20}],
+        [{name: '广州'}, {name: '海口', value: 10}]
+    ];
+
+    var planePath = 'path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z';
+
+    var convertData = function (data) {
+        var res = [];
+        for (var i = 0; i < data.length; i++) {
+            var dataItem = data[i];
+            var fromCoord = geoCoordMap[dataItem[0].name];
+            var toCoord = geoCoordMap[dataItem[1].name];
+            if (fromCoord && toCoord) {
+                res.push({
+                    fromName: dataItem[0].name,
+                    toName: dataItem[1].name,
+                    coords: [fromCoord, toCoord]
+                });
+            }
+        }
+        return res;
+    };
+
+    var color = ['#a6c84c', '#ffa022', '#46bee9'];
+    var series = [];
+    [['北京', BJData], ['上海', SHData], ['广州', GZData]].forEach(function (item, i) {
+        series.push({
+                name: item[0] + ' Top10',
+                type: 'lines',
+                coordinateSystem: 'openlayers',
+                zlevel: 1,
+                effect: {
+                    show: true,
+                    period: 6,
+                    trailLength: 0.7,
+                    color: '#fff',
+                    symbolSize: 3
+                },
+                lineStyle: {
+                    normal: {
+                        color: color[i],
+                        width: 0,
+                        curveness: 0.2
+                    }
+                },
+                data: convertData(item[1])
+            },
+            {
+                name: item[0] + ' Top10',
+                type: 'lines',
+                coordinateSystem: 'geo',
+                zlevel: 2,
+                symbol: ['none', 'arrow'],
+                symbolSize: 10,
+                effect: {
+                    show: true,
+                    period: 6,
+                    trailLength: 0.,
+                    symbol: planePath,
+                    symbolSize: 15
+                },
+                lineStyle: {
+                    normal: {
+                        color: color[i],
+                        width: 1,
+                        opacity: 0.6,
+                        curveness: 0.2
+                    }
+                },
+                data: convertData(item[1])
+            },
+            {
+                name: item[0] + ' Top10',
+                type: 'effectScatter',
+                coordinateSystem: 'openlayers',
+                zlevel: 2,
+                rippleEffect: {
+                    brushType: 'stroke'
+                },
+                label: {
+                    normal: {
+                        show: true,
+                        position: 'right',
+                        formatter: '{b}'
+                    }
+                },
+                symbolSize: function (val) {
+                    return val[2] / 8;
+                },
+                itemStyle: {
+                    normal: {
+                        color: color[i]
+                    }
+                },
+                data: item[1].map(function (dataItem) {
+                    return {
+                        name: dataItem[1].name,
+                        value: geoCoordMap[dataItem[1].name].concat([dataItem[1].value])
+                    };
+                })
+            });
+    });
+
+    echartsOptions = {
+        title: {
+            text: resources.title_geoline,
+            subtext: resources.text_fictitiouData,
+            left: 'center',
+            textStyle: {
+                color: '#fff'
+            }
+        },
+        tooltip: {
+            trigger: 'item'
+        },
+        legend: {
+            orient: 'vertical',
+            top: 'bottom',
+            left: 'left',
+            data: ['北京 Top10', '上海 Top10', '广州 Top10'],
+            textStyle: {
+                color: '#fff'
+            },
+            selectedMode: 'multiple',
+            backgroundColor: 'rgba(128, 128, 128, 0.5)'
+        },
+
+        series: series
+    };
+
+    echartslayer.setChartOptions(echartsOptions);
+</script>
+</body>
+</html>

+ 0 - 0
public/supermap/examples/openlayers/echartsHeatmap.html


Some files were not shown because too many files changed in this diff