GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — iClient-JavaScript/examples/leaflet/12_heatMap.html at master · lyinghappy/iClient-JavaScript Expand file tree/ Copy path12_heatMap.htmlMore file actions 54 lines (53 loc) · 2.02 KB / Copy path12_heatMap.htmlFile metadata and controls54 lines (53 loc) · 2.02 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 <!--******************************************************************** * Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved. *********************************************************************--> <!--******************************************************************** * 该示例需要引入 * leaflet.heat (https://github.com/Leaflet/Leaflet.heat) *********************************************************************--> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title data-i18n="resources.title_heatMap"></title> <script type="text/javascript" include="randomcolor" src="../js/include-web.js"></script> <style> #heatNumbers, #heatRadius { width: 50px; display: inline-block; } </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" include="leaflet.heat" src="../../dist/leaflet/include-leaflet.js"></script> <script type="text/javascript"> var host = window.isLocal ? window.server : "https://iserver.supermap.io"; var map, resultLayer, url = host + "/iserver/services/map-china/rest/maps/China"; map = L.map('map', { preferCanvas: true, center: [39.89, 116.35], maxZoom: 18, zoom: 11 }); new L.supermap.TiledMapLayer(url).addTo(map); loadHeatMap(); function loadHeatMap() { var heatNumbers = 150, heatRadius = 30; var num = parseInt(heatNumbers); num = (num > 0) ? num : 0; var radius = parseInt(heatRadius); radius = (radius > 0) ? radius : 0; var heatPoints = []; for (var i = 0; i < num; i++) { heatPoints[i] = [Math.random() * 0.28 + 39.78, Math.random() * 0.5 + 116.12, Math.random() * 80]; } resultLayer = L.heatLayer(heatPoints, { radius: radius, minOpacity: 0.5 }).addTo(map); } </script> </body> </html> |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |