123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <!--********************************************************************
- * 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>
- </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" src="../../dist/leaflet/include-leaflet.js"></script>
- <script type="text/javascript">
- var host = window.isLocal ? window.server : "https://iserver.supermap.io";
- var map, thiessenAnalystService, gThiessenAnalystParameters,
- baseUrl = host + "/iserver/services/map-changchun/rest/maps/长春市区图",
- serviceUrl = host + "/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst";
- map = L.map('map', {
- crs: L.CRS.NonEarthCRS({
- bounds: L.bounds([48.4, -7668.25], [8958.85, -55.58]),
- origin: L.point(48.4, -55.58)
- }),
- center: [-3375, 5105],
- maxZoom: 18,
- zoom: 1
- });
- L.supermap.tiledMapLayer(baseUrl, {noWrap: true})
- .addTo(map)
- .once("load", function () {
- thiessenAnalystProcess();
- });
- function thiessenAnalystProcess() {
- var pointsList = [
- [5238.998556, -1724.229865],
- [4996.270055, -2118.538477],
- [5450.34263, -2070.794081],
- [5317.70775, -2521.162355],
- [5741.149405, -1970.130198],
- [4716.133098, -1575.858795],
- [5447.671615, -2255.928819],
- [4783.423507, -1135.598744],
- [5472.712382, -2189.15344],
- [5752.716961, -2425.40363]
- ];
- gThiessenAnalystParameters = new SuperMap.GeometryThiessenAnalystParameters({
- points: pointsList
- });
- thiessenAnalystService = L.supermap.spatialAnalystService(serviceUrl);
- thiessenAnalystService.thiessenAnalysis(gThiessenAnalystParameters, function (serviceResult) {
- L.geoJSON(serviceResult.result.regions, {weight: 2}).addTo(map);
- })
- }
- </script>
- </body>
- </html>
|