1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="WebControl_DNet.index" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  8. <title>WebGis二次开发包实例</title>
  9.  
  10. <style>
  11. .ol-zoom .ol-zoom-out {
  12. margin-top: 204px;
  13. }
  14. .ol-zoomslider {
  15. background-color: transparent;
  16. top: 2.3em;
  17. }
  18.  
  19. .ol-touch .ol-zoom .ol-zoom-out {
  20. margin-top: 212px;
  21. }
  22. .ol-touch .ol-zoomslider {
  23. top: 2.75em;
  24. }
  25.  
  26. .ol-zoom-in.ol-has-tooltip:hover [role=tooltip],
  27. .ol-zoom-in.ol-has-tooltip:focus [role=tooltip] {
  28. top: 3px;
  29. }
  30.  
  31. .ol-zoom-out.ol-has-tooltip:hover [role=tooltip],
  32. .ol-zoom-out.ol-has-tooltip:focus [role=tooltip] {
  33. top: 232px;
  34. }
  35. </style>
  36.  
  37. <!--引入jquery框架-->
  38. <script type="text/javascript" src="js/jquery-easyui-1.4.2/jquery.min.js"></script>
  39.  
  40. <!--引入easyui前端开发包-->
  41. <script type="text/javascript" src="js/jquery-easyui-1.4.2/jquery.easyui.min.js"></script>
  42. <script type='text/javascript' src='js/jquery-easyui-1.4.2/locale/easyui-lang-zh_CN.js'></script>
  43. <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.4.2/themes/default/easyui.css">
  44. <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.4.2/themes/icon.css">
  45. <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.4.2/themes/color.css">
  46.  
  47. <!--引入Openlayers地理信息系统开发包-->
  48. <script type="text/javascript" src="js/Openlayers3.16.0/ol.js"></script>
  49. <link rel="stylesheet" type="text/css" href="js/Openlayers3.16.0/ol.css">
  50.  
  51. <!--引入地图列表扩展包-->
  52. <script type="text/javascript" src="js/Openlayers3.16.0/plugins/maplist.js"></script>
  53.  
  54. <!--引入测量控件扩展包-->
  55. <script type="text/javascript" src="js/Openlayers3.16.0/plugins/measure.js"></script>
  56. <link rel="stylesheet" type="text/css" href="js/Openlayers3.16.0/plugins/measure.css">
  57.  
  58. <!--引入点对象包-->
  59. <script type="text/javascript" src="js/Openlayers3.16.0/plugins/pointobject.js"></script>
  60.  
  61. <!--引入popup提示样式-->
  62. <link rel="stylesheet" type="text/css" href="js/Openlayers3.16.0/plugins/popup.css">
  63.  
  64. <!--引入折线对象包-->
  65. <script type="text/javascript" src="js/Openlayers3.16.0/plugins/lineobject.js"></script>
  66.  
  67. <!--引入贝塞尔曲线包-->
  68. <script type="text/javascript" src="js/Openlayers3.16.0/plugins/beziercurve.js"></script>
  69.  
  70. <!--引入箭头线包-->
  71. <script type="text/javascript" src="js/Openlayers3.16.0/plugins/arrowline.js"></script>
  72.  
  73. <!--引入多边形包-->
  74. <script type="text/javascript" src="js/Openlayers3.16.0/plugins/polygonobject.js"></script>
  75.  
  76. <!--引入位置变换或拖动包-->
  77. <script type="text/javascript" src="js/Openlayers3.16.0/plugins/drag.js"></script>
  78.  
  79. <script>
  80. /******************定义地图全局变量***************/
  81. var map; //定义地图对象
  82. var proj = 'EPSG:4326'; //定义wgs84地图坐标系
  83. var proj_m = 'EPSG:3857'; //定义墨卡托地图坐标系
  84. var mapLayer, mapLayerlabel; //定义图层对象
  85. var source_measure, vector_measure; //定义全局测量控件源和层
  86. var source_point, vector_point; //定义全局点对象源和层
  87. var popup; //定义全局变量popup
  88. var source_zx, vector_zx; //定义全局折线对象源和层
  89. var l; //定义一根全局折线
  90. var source_bezier, vector_bezier; //定义全局贝塞尔曲线对象源和层
  91. var source_arrow, vector_arrow; //定义全局箭头线对象源和层
  92. var source_polygon, vector_polygon; //定义全局多边形对象源和层
  93. var source_circle, vector_circle; //定义全局多边形对象源和层
  94. var source_region, vector_region; //定义全局多边形对象源和层
  95. var source_draw, vector_draw; //定义全局鼠标绘制对象源和层
  96. var mapDragInteraction; //定义拖动交互功能
  97.  
  98. /******************地图初始化函数***************/
  99. function initMap() {
  100. mapDragInteraction = new app.Drag();
  101.  
  102. //初始化map对象
  103. map = new ol.Map({
  104. target: 'map',
  105. projection: proj,
  106. interactions: ol.interaction.defaults().extend([mapDragInteraction]),
  107. view: new ol.View({
  108. center: ol.proj.transform([101.46912, 36.24274], proj, proj_m),
  109. zoom: 5
  110. })
  111. });
  112.  
  113. //初始化地图图层
  114. mapLayer = new ol.layer.Tile({
  115. source: source_google,
  116. projection: proj
  117. });
  118. //初始化标签图层
  119. mapLayerlabel = new ol.layer.Tile({
  120. source: null,
  121. projection: proj
  122. });
  123.  
  124. //将图层加载到地图对象
  125. map.addLayer(mapLayer);
  126. map.addLayer(mapLayerlabel);
  127.  
  128. //导航控件
  129. map.addControl(new ol.control.ZoomSlider());
  130. //鼠标位置控件
  131. map.addControl(new ol.control.MousePosition({
  132. projection: proj,
  133. coordinateFormat: function (coordinate) {
  134. var zoom = map.getView().getZoom();
  135. return '地图级别:' + zoom + ", " + ol.coordinate.format(coordinate, '经度:{x}°, 纬度: {y}°', 10);
  136. }
  137. }));
  138.  
  139. //比例尺控件
  140. map.addControl(new ol.control.ScaleLine());
  141.  
  142. //全屏显示控件
  143. map.addControl(new ol.control.FullScreen());
  144.  
  145. //鹰眼图控件
  146. map.addControl(new ol.control.OverviewMap({
  147. tipLabel: "鹰眼图"
  148. }));
  149.  
  150. /*******************在地图初始化函数中初始化测量控件层************************/
  151. source_measure = new ol.source.Vector();
  152. vector_measure = new ol.layer.Vector({
  153. source: source_measure,
  154. style: new ol.style.Style({
  155. fill: new ol.style.Fill({
  156. color: 'rgba(255, 0, 0, 0.1)'
  157. }),
  158. stroke: new ol.style.Stroke({
  159. color: '#ff8080',
  160. width: 2
  161. })
  162. })
  163. });
  164.  
  165. map.addLayer(vector_measure);
  166.  
  167. /*******************在地图初始化函数中初始化点对象标注层************************/
  168. source_point = new ol.source.Vector();
  169.  
  170. vector_point = new ol.layer.Vector({
  171. source: source_point
  172. });
  173.  
  174. map.addLayer(vector_point);
  175.  
  176. /*******************在地图初始化函数中初始化折线对象标注层************************/
  177. source_zx = new ol.source.Vector();
  178.  
  179. vector_zx = new ol.layer.Vector({
  180. source: source_zx
  181. });
  182.  
  183. map.addLayer(vector_zx);
  184.  
  185. /*******************在地图初始化函数中初始化贝塞尔曲线标注层************************/
  186. source_bezier = new ol.source.Vector();
  187.  
  188. vector_bezier = new ol.layer.Vector({
  189. source: source_bezier
  190. });
  191.  
  192. map.addLayer(vector_bezier);
  193.  
  194. /*******************在地图初始化函数中初始化箭头线标注层************************/
  195. source_arrow = new ol.source.Vector();
  196.  
  197. vector_arrow = new ol.layer.Vector({
  198. source: source_arrow
  199. });
  200.  
  201. map.addLayer(vector_arrow);
  202.  
  203. /*******************在地图初始化函数中初始化多边形面标注层************************/
  204. source_polygon = new ol.source.Vector();
  205.  
  206. vector_polygon = new ol.layer.Vector({
  207. source: source_polygon
  208. });
  209.  
  210. map.addLayer(vector_polygon);
  211.  
  212. /*******************在地图初始化函数中初始化圆标注层************************/
  213. source_circle = new ol.source.Vector();
  214.  
  215. vector_circle = new ol.layer.Vector({
  216. source: source_circle
  217. });
  218.  
  219. map.addLayer(vector_circle);
  220.  
  221. /*******************在地图初始化函数中初始化多边形面标注层************************/
  222. source_region = new ol.source.Vector();
  223.  
  224. vector_region = new ol.layer.Vector({
  225. source: source_region
  226. });
  227.  
  228. map.addLayer(vector_region);
  229.  
  230. /*******************在地图初始化函数中初始化鼠标绘制标注层************************/
  231. source_draw = new ol.source.Vector();
  232.  
  233. vector_draw = new ol.layer.Vector({
  234. source: source_draw
  235. });
  236.  
  237. map.addLayer(vector_draw);
  238.  
  239. /************************在地图初始化时添加popup标记******************************/
  240. var container = document.getElementById('popup');
  241. var content = document.getElementById('popup-content');
  242. var closer = document.getElementById('popup-closer');
  243.  
  244. popup = new ol.Overlay(/** @type {olx.OverlayOptions} */({
  245. element: container,
  246. autoPan: true,
  247. autoPanAnimation: {
  248. duration: 250
  249. },
  250. offset: [0, -32]
  251. }));
  252. map.addOverlay(popup);
  253.  
  254. //为popup上的close按钮添加关闭事件
  255. closer.onclick = function () {
  256. popup.setPosition(undefined);
  257. closer.blur();
  258. return false;
  259. }
  260.  
  261. /*******************在图中监听pointermove事件************************/
  262. map.on('pointermove', pointerMoveHandler); //在measure.js中实现pointerMoveHandler函数
  263. map.on('pointermove', function (e) {
  264. if (e.dragging) {
  265. popup.setPosition(undefined);
  266. closer.blur();
  267. return;
  268. }
  269. });
  270.  
  271. //添加地图单击事件
  272. map.on('singleclick', function (evt) {
  273. var feature = map.forEachFeatureAtPixel(evt.pixel, function (f) {
  274. return f;
  275. });
  276. if (feature && feature.get("id") != null && feature.get("lx") == "Point") {
  277. popup.setPosition(feature.getGeometry().getCoordinates());
  278. var strHtml = '<div style="width: 420px;height: 260px;">';
  279. strHtml += '<div style="width: 100%;height: 50px;font-family:幼圆;font-size: 24pt;line-height: 50px">' + feature.getStyle().getText().getText() + '</div>';
  280. strHtml += '<div style="width: 100%;height: 150px;"> ';
  281. strHtml += '<div style="width: 150px;height: 150px;float: left;"><img src="data:images/nodata.png" style="width: 100%;height: 100%;" /></div>';
  282. strHtml += '<div style="float: left;width: 230px;height: 110px;padding: 20px;font-size:12pt;">简述:这是一个点对象的测试示例,你可以根据需要定制出更多的弹出框版式。</div>';
  283. strHtml += '</div>';
  284. var jwd = ol.proj.transform([feature.get("lon"), feature.get("lat")], 'EPSG:3857', 'EPSG:4326');
  285. strHtml += '<div style="width: 100%;height: 60px; padding: 10px;color: gray;font-size: 11pt;font-family:幼圆;line-height: 25px;">';
  286. strHtml += '<div style="float: left;width: 48%;border-bottom: 1px gray dotted;"><div style="float: left;width: 80px;text-align: left">经度:</div><div style="float: right;width: 120px;text-align: right">' + parseInt(jwd[0] * 100000000) / 100000000 + '°</div></div>';
  287. strHtml += '<div style="float: right;width: 48%;border-bottom: 1px gray dotted;"><div style="float: left;width: 80px;text-align: left">纬度:</div><div style="float: right;width: 120px;text-align: right">' + parseInt(jwd[1] * 100000000) / 100000000 + '°</div></div>';
  288. strHtml += '<div style="float: left;width: 48%;border-bottom: 1px gray dotted;"><div style="float: left;width: 80px;text-align: left">地理位置:</div><div style="float: right;width: 120px;text-align: right">测试位置</div></div>';
  289. strHtml += '<div style="float: right;width: 48%;border-bottom: 1px gray dotted;"><div style="float: left;width: 80px;text-align: left">联系电话:</div><div style="float: right;width: 120px;text-align: right">185********</div></div>';
  290. strHtml += '</div>';
  291. strHtml += '</div>';
  292. content.innerHTML = strHtml;
  293. setPointPropertygrid(feature);
  294. } else {
  295. popup.setPosition(undefined);
  296. closer.blur();
  297. }
  298. });
  299.  
  300. }
  301.  
  302. /******************地图切换方法***************/
  303. function changeBaseMap(sourcelist) {
  304. var cnt = sourcelist.length;
  305. if (1 == cnt) {
  306. mapLayer.setSource(sourcelist[0]);
  307. mapLayerlabel.setSource(null);
  308. } else if (2 == cnt) {
  309. mapLayer.setSource(sourcelist[0]);
  310. mapLayerlabel.setSource(sourcelist[1]);
  311. }
  312. }
  313.  
  314. /******************测量控件切换方法***************/
  315. function startControl(control, self) {
  316. if (self.attr("class").indexOf("l-btn-plain-selected") >= 0) {
  317. $(".easyui-linkbutton").linkbutton("unselect");
  318. self.linkbutton("select");
  319. removeMeasure(source_measure);
  320. if ("line" == control || "area" == control) {
  321. addMeasure(control, source_measure);
  322. } else if ("rectSelect" == control) {
  323. addDrawOnMap("Box");
  324. drawonmap.on('drawend', function (evt) {
  325. var extent = evt.feature.getGeometry().getExtent() //得到选中的区域
  326. var leftdownPoint = ol.proj.transform([extent[0], extent[1]], proj_m, proj);
  327. var rightupPoint = ol.proj.transform([extent[2], extent[3]], proj_m, proj);
  328. alert("左下坐标:" + leftdownPoint + "\n" + "右上坐标:" + rightupPoint);
  329. });
  330. } else if ("circleSelect" == control) {
  331. addDrawOnMap("Circle");
  332. drawonmap.on('drawend', function (evt) {
  333. var center = ol.proj.transform(evt.feature.getGeometry().getCenter(), proj_m, proj);
  334. var radius = evt.feature.getGeometry().getRadius();
  335. alert("圆心坐标:" + center + "\n" + "半径:" + radius);
  336. });
  337. }
  338. } else {
  339. self.linkbutton("unselect");
  340. removeMeasure(source_measure);
  341. clearDrawOnMap();
  342. }
  343. }
  344.  
  345. /*************************计算两点间的距离,p1,p2坐标为wgs84坐标******************************/
  346. function getDistance(p1, p2) {
  347. var wgs84Sphere = new ol.Sphere(6378137);
  348. return wgs84Sphere.haversineDistance(p1, p2);
  349. }
  350.  
  351. /******************在地图上标记一个点对象***************/
  352. //随机生成当前范围内的一个经纬度坐标,用于在地图上标点
  353. function randomPointJWD() {
  354. var topleftPoint = map.getCoordinateFromPixel([10, 10]);
  355. var centerPoint = map.getView().getCenter();
  356. var bottomrightPoint = [centerPoint[0] + (centerPoint[0] - topleftPoint[0]), centerPoint[1] + (centerPoint[1] - topleftPoint[1])];
  357. var jd = topleftPoint[0] + (bottomrightPoint[0] - topleftPoint[0]) * Math.random();
  358. var wd = bottomrightPoint[1] + (topleftPoint[1] - bottomrightPoint[1]) * Math.random();
  359. return [jd, wd];
  360. }
  361.  
  362. //设置点对象属性值
  363. function setPointPropertygrid(point) {
  364. var d = $('#pg_point').propertygrid("getData");
  365. d.rows[0].value = point.get('id');
  366. d.rows[1].value = point.get('lx');
  367. var p = ol.proj.transform([point.get('lon'), point.get('lat')], proj_m, proj);
  368. d.rows[2].value = Math.floor(p[0] * 100000000) / 100000000;
  369. d.rows[3].value = Math.floor(p[1] * 100000000) / 100000000;
  370. d.rows[4].value = point.getStyle().getImage().getOpacity();
  371. d.rows[5].value = point.getStyle().getImage().getScale();
  372. d.rows[6].value = point.getStyle().getImage().getRotateWithView();
  373. d.rows[7].value = point.getStyle().getImage().getRotation();
  374. d.rows[8].value = point.getStyle().getImage().getSrc();
  375. d.rows[9].value = point.getStyle().getText().getTextAlign();
  376. d.rows[10].value = point.getStyle().getText().getTextBaseline();
  377. d.rows[11].value = point.getStyle().getText().getFont();
  378. d.rows[12].value = point.getStyle().getText().getText();
  379. d.rows[13].value = point.getStyle().getText().getFill().getColor();
  380. for (var i = 0; i < d.total; i++) {
  381. $('#pg_point').propertygrid("refreshRow", i);
  382. }
  383. }
  384.  
  385. //添加一个点
  386. var point_sl = 0;
  387. //layer:{ol.source.Vector}:需要添加点对象的图层
  388. //label:{string}:点对象名称
  389. //iconname:{string}:点对象的图标名称
  390. function addPoint(layer, label, iconname) {
  391. var p = randomPointJWD();
  392. var style = createStyle(1, 1, false, 0, "images/imgpoints/" + iconname, 'center', 'bottom', 'bold 12px 幼圆', label + point_sl, '#aa3300');
  393. var p = createPoint("point" + point_sl, "Point", p[0], p[1], style);
  394. layer.addFeature(p);
  395. setPointPropertygrid(p);
  396. point_sl++;
  397. }
  398.  
  399. //更新点对象属性值
  400. //layer:{ol.source.Vector}:需要更新点对象的图层
  401. function updatePoint(layer) {
  402. var d = $('#pg_point').propertygrid("getData");
  403. var f = layer.getFeatureById(d.rows[0].value); //通过id在点图层上找到相应的Feature对象
  404. var style = createStyle(d.rows[4].value, d.rows[5].value, d.rows[6].value, d.rows[7].value, d.rows[8].value, d.rows[9].value, d.rows[10].value, d.rows[11].value, d.rows[12].value, d.rows[13].value);
  405. var jd = parseInt(d.rows[2].value * 100000000) / 100000000;
  406. var wd = parseInt(d.rows[3].value * 100000000) / 100000000;
  407. var jwd = ol.proj.transform([jd, wd], proj, proj_m);
  408. var p = createPoint(f.get("id"), f.get("lx"), jwd[0], jwd[1], style); //根据新的属性重新构造一个点对象
  409. layer.removeFeature(f); //删除老的点对象
  410. layer.addFeature(p); //在图层上添加点对象
  411. }
  412.  
  413. /******************在地图上标记一个折线对象***************/
  414. var timer_zx;
  415. var zx_sl = 1;
  416. function startDrawLine() {
  417. if (null == l) {
  418. var style = createLineStyle("black", 2, 'round', 'round');
  419. l = createLine("zxtest", "zx", [], style);
  420. source_zx.addFeature(l);
  421. }
  422. var coord;
  423. timer_zx = window.setInterval(function () {
  424. coord = randomPointJWD();
  425. l.getGeometry().appendCoordinate(coord);
  426. $("#zx_croodinates").html($("#zx_croodinates").html() + zx_sl++ + "." + ol.proj.transform(coord, proj_m, proj) + "<br>");
  427. }, 1000);
  428. }
  429.  
  430. function stopDrawLine() {
  431. window.clearInterval(timer_zx);
  432. }
  433.  
  434. function clearDrawLine() {
  435. stopDrawLine();
  436. source_zx.removeFeature(l);
  437. l = null;
  438. $("#zx_croodinates").html("");
  439. zx_sl = 1;
  440. }
  441.  
  442. /**************************绘制贝塞尔曲线*****************************/
  443. function drawBezierCurve(n) {
  444. var arrPoints = [];
  445. for (var i = 0; i <= n; i++) {
  446. arrPoints.push(randomPointJWD());
  447. }
  448. var arrbline = createBezierCurvePoints(n, arrPoints);
  449. var style = createLineStyle("#ff0080", 2, 'round', 'round');
  450. var f = createLine("bezier_nj" + Math.random(), "bezier", arrbline, style);
  451. source_bezier.addFeature(f);
  452. }
  453.  
  454. function clearBezierCurve() {
  455. source_bezier.clear();
  456. }
  457.  
  458. /**************************绘制箭头线*****************************/
  459. var arrow_sl = 0;
  460. function drawArrowLine() {
  461. var arrarrow = createArrowPoints(map.getCoordinateFromPixel([300 + arrow_sl * 10, 350 + arrow_sl * 10]), map.getCoordinateFromPixel([500 + arrow_sl * 10, 500 + arrow_sl * 10]), map.getCoordinateFromPixel([700 + arrow_sl * 10, 300 + arrow_sl * 10]));
  462. var style = createLineStyle("#ff8000", 2, 'round', 'round');
  463. var f = createLine("arrow" + Math.random(), "arrow", arrarrow, style);
  464. source_arrow.addFeature(f);
  465. arrow_sl++;
  466. }
  467.  
  468. function clearArrowLine() {
  469. source_arrow.clear();
  470. }
  471.  
  472. /**************************绘制多边形区域*****************************/
  473. function randomScreenPixel(r) {
  474. var centerSceenPixel = map.getPixelFromCoordinate(map.getView().getCenter()); //获取地图中心点的屏幕坐标
  475. var screenX = Math.floor(r + (centerSceenPixel[0] * 2 - 2 * r) * Math.random());
  476. var screenY = Math.floor(r + (centerSceenPixel[1] * 2 - 2 * r) * Math.random());
  477. return [screenX, screenY];
  478. }
  479.  
  480. function drawRegularPolygon(n) {
  481. var r = 100; //定义正多边形外接圆的半径,单位是像素
  482. var centerScreenPolygon = randomScreenPixel(r); //随机生成多边形外接圆圆心点像素坐标
  483. var arrPoints = new Array();
  484. //得到正多边形各个端点的像素坐标
  485. var cpx, cpy;
  486. for (var i = 0; i < n; i++) {
  487. cpx = Math.floor(r * Math.cos(i * 2 * Math.PI / n)) + centerScreenPolygon[0];
  488. cpy = Math.floor(r * Math.sin(i * 2 * Math.PI / n)) + centerScreenPolygon[1];
  489. arrPoints.push(map.getCoordinateFromPixel([cpx, cpy]));
  490. }
  491. arrPoints.push(arrPoints[0]);
  492.  
  493. var style = createPolygonStyle("#ff0080", 2, 'rgba(0, 255, 0, 0.2)');
  494. var f = createPolygon("polygon" + Math.random(), "polygon", [arrPoints], style);
  495. source_polygon.addFeature(f);
  496. }
  497.  
  498. function clearRegularPolygon() {
  499. source_polygon.clear();
  500. }
  501.  
  502. /**************************绘制圆形区域*****************************/
  503. function drawCircle() {
  504. var center = randomPointJWD();
  505. var style = createPolygonStyle("#000080", 2, 'rgba(0, 0, 255, 0.2)');
  506. var f = createCircle("circle" + Math.random(), "circle", center, parseInt($("#txt_radius").textbox("getText")), style);
  507. source_circle.addFeature(f);
  508. }
  509.  
  510. function clearCircle() {
  511. source_circle.clear();
  512. }
  513.  
  514. /**************************在屏幕中间绘制集结地域*****************************/
  515. var region_sl = 0;
  516. function drawRegion() {
  517. var p1 = map.getCoordinateFromPixel([500 + region_sl * 10, 300 + region_sl * 10]);
  518. var p2 = map.getCoordinateFromPixel([660 + region_sl * 10, 250 + region_sl * 10]);
  519. var p3 = map.getCoordinateFromPixel([700 + region_sl * 10, 400 + region_sl * 10]);
  520. var style = createPolygonStyle("#800080", 2, 'rgba(200, 0, 255, 0.1)');
  521. var arrPoints = createRegionPoints(p1, p2, p3);
  522. var f = createPolygon("region" + Math.random(), "region", [arrPoints], style);
  523. source_region.addFeature(f);
  524. region_sl++;
  525. }
  526.  
  527. function clearRegion() {
  528. source_region.clear();
  529. }
  530.  
  531. /**************************用鼠标绘制各种图形*****************************/
  532. var drawonmap; // global so we can remove it later
  533. function addDrawOnMap(type) { //The geometry type. One of 'Point', 'LineString', 'LinearRing', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon', 'GeometryCollection', 'Circle'.
  534. if (drawonmap) {
  535. map.removeInteraction(drawonmap);
  536. }
  537. if (type !== 'None') {
  538. var geometryFunction, maxPoints;
  539. if (type === 'Square') {
  540. type = 'Circle';
  541. geometryFunction = ol.interaction.Draw.createRegularPolygon(4);
  542. } else if (type === 'Box') {
  543. type = 'LineString';
  544. maxPoints = 2;
  545. geometryFunction = function (coordinates, geometry) {
  546. if (!geometry) {
  547. geometry = new ol.geom.Polygon(null);
  548. }
  549. var start = coordinates[0];
  550. var end = coordinates[1];
  551. geometry.setCoordinates([
  552. [start, [start[0], end[1]], end, [end[0], start[1]], start]
  553. ]);
  554. return geometry;
  555. };
  556. }
  557.  
  558. var style = createPolygonStyle("#808080", 2, 'rgba(200, 0, 255, 0.1)');
  559. drawonmap = new ol.interaction.Draw({
  560. source: source_draw,
  561. style: style,
  562. type: /** @type {ol.geom.GeometryType} */(type),
  563. geometryFunction: geometryFunction,
  564. maxPoints: maxPoints
  565. });
  566. map.addInteraction(drawonmap);
  567. }
  568. }
  569.  
  570. function clearDrawOnMap() {
  571. source_draw.clear();
  572. addDrawOnMap("None");
  573. }
  574.  
  575. /*****************************开启或关闭图上feature的拖动函数*******************************/
  576. function dragChange(flag) {
  577. if (flag) {
  578. map.addInteraction(mapDragInteraction);
  579. } else {
  580. map.removeInteraction(mapDragInteraction);
  581. }
  582. }
  583.  
  584. </script>
  585. </head>
  586. <body onload="initMap()" class="easyui-layout" style="margin: 0;padding: 0;">
  587. <div data-options="region:'north'" style="height:100px;overflow: hidden;background-image: url('images/bg_title.png');">
  588. <img src="data:images/toptitle.png" style="width:1050px;height: 80px;margin-top: 10px;margin-left: 30px;" />
  589. </div>
  590. <div data-options="region:'center'" class="easyui-layout" style="border: none" >
  591. <div data-options="region:'north'" style="height:35px;overflow: hidden;background-color: lightyellow">
  592. <div style="float:left;padding-top:3px;padding-left: 10px;border:none;font-size: 10pt;">
  593. <a id="btn_cljl" href="javascript:startControl('line',$('#btn_cljl'))" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-cj',toggle:true">测量距离</a>
  594. <a id="btn_clmj" href="javascript:startControl('area',$('#btn_clmj'))" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-cmj',toggle:true">测量面积</a>|
  595. <a id="btn_jxxz" href="javascript:startControl('rectSelect',$('#btn_jxxz'))" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-jxxz',toggle:true">矩形选择</a>
  596. <a id="btn_yxxz" href="javascript:startControl('circleSelect',$('#btn_yxxz'))" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-yxxz',toggle:true">圆形选择</a>|
  597. <input id="chk_point_drag" name="chk_point_drag" type="checkbox" checked="true" onchange="dragChange(this.checked)">可拖动&nbsp;|
  598. <a href="#" class="easyui-menubutton" data-options="plain:true,iconCls:'icon-dzdt',menu:'#menu_maplist'">在线地图</a>
  599. <a href="#" class="easyui-menubutton" data-options="plain:true,iconCls:'icon-wxdt',menu:'#menu_maplist_offline'">离线地图</a>
  600. <a id="export-png" href="#" download="map.png" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-print'">地图导出</a>|
  601. <a href="javascript:closeWindow();" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-no'">关闭</a>
  602. </div>
  603. <div id="div_measureoutput" style="float:right;padding-right: 10px;border:none ;font-size: 12pt;line-height: 35px;text-align: right;width: 230px;height: 35px;"></div>
  604. </div>
  605. <div data-options="region:'center'" class="easyui-layout">
  606. <div data-options="region:'west',collapsible:true" title="标图面板" style="width:270px;overflow: hidden;">
  607. <div class="easyui-accordion" style="width:100%;height:100%;">
  608. <div title="点对象" data-options="iconCls:'icon-addpoint'" style="padding:10px;">
  609. <div style="height:35px;width: 100%; ">
  610. <a class="easyui-menubutton c8" data-options="menu:'#menu_pointlist',iconCls:'icon-addpoint'">新增点对象</a>&nbsp;&nbsp;&nbsp;&nbsp;
  611. <a class="easyui-linkbutton" href="javascript:updatePoint(source_point, 'pg_point')" data-options="iconCls:'icon-reload'">刷新当前点</a>
  612. </div>
  613. <div style="width:100%;">
  614. <table id="pg_point" class="easyui-propertygrid" data-options="
  615. data: {'total':14,'rows':[
  616. {'name':'ID','value':'','group':'图形'},
  617. {'name':'类型','value':'Point','group':'图形'},
  618. {'name':'经度','value':'','group':'图形','editor':{type:'numberbox',options:{precision:8}}},
  619. {'name':'纬度','value':'','group':'图形','editor':{type:'numberbox',options:{precision:8}}},
  620. {'name':'透明度','value':'1','group':'图形','editor':{type:'numberbox',options:{precision:2}}},
  621. {'name':'缩放比例','value':'1','group':'图形','editor':{type:'numberbox',options:{precision:2}}},
  622. {'name':'跟随地图旋转','value':'false','group':'图形','editor':{type:'combobox',options:{valueField:'id',textField:'text',editable:false,panelHeight:'auto',data:[{'id':'true','text':'true'},{'id':'false','text':'false'}]}}},
  623. {'name':'旋转角度','value':'0','group':'图形','editor':{type:'numberbox',options:{precision:2}}},
  624. {'name':'图片地址','value':'','group':'图形','editor':'text'},
  625. {'name':'水平位置','value':'left','group':'文字','editor':{type:'combobox',options:{valueField:'id',textField:'text',editable:false,panelHeight:'auto',data:[{'id':'left','text':'left'},{'id':'right','text':'right'},{'id':'center','text':'center'},{'id':'end','text':'end'},{'id':'start','text':'start'}]}}},
  626. {'name':'垂直位置','value':'bottom','group':'文字','editor':{type:'combobox',options:{valueField:'id',textField:'text',editable:false,panelHeight:'auto',data:[{'id':'bottom','text':'bottom'},{'id':'top','text':'top'},{'id':'middle','text':'middle'},{'id':'alphabetic','text':'alphabetic'},{'id':'hanging','text':'hanging'},{'id':'ideographic','text':'ideographic'}]}}},
  627. {'name':'字体','value':'bold 12px 幼圆','group':'文字','editor':'text'},
  628. {'name':'内容','value':'','group':'文字','editor':'text'},
  629. {'name':'颜色','value':'#ff0000','group':'文字','editor':'text'}
  630. ]},
  631. method: 'get',
  632. showGroup: true,
  633. scrollbarSize: 0,
  634. showHeader:false,
  635. columns: [[
  636. {field:'name',title:'MyName',sortable:false},
  637. {field:'value',title:'MyValue',width:170,resizable:false,formatter:function(value){
  638. var s='<div>';
  639. s += '<div style=\'float:right;width:18px;height:18px;background:'+value+'\'>&nbsp;</div>';
  640. s += value;
  641. s += '<div style=\'clear:both\'</div>';
  642. s += '</div>';
  643. return s;
  644. } }
  645. ]]
  646. ">
  647. </table>
  648. </div>
  649. </div>
  650. <div title="折线" data-options="iconCls:'icon-line_zx'" style="padding:10px;">
  651. <div style="height:30px;width: 100%;font-family: 幼圆;font-size: 12pt;text-align: center">
  652. 画连续折线
  653. </div>
  654. <div style="height:30px; width:100%;text-align: center">
  655. <a class="easyui-linkbutton" href="javascript:startDrawLine()" data-options="iconCls:'icon-playstart'">开始</a>&nbsp;&nbsp;
  656. <a class="easyui-linkbutton" href="javascript:stopDrawLine()" data-options="iconCls:'icon-playstop'">停止</a>&nbsp;&nbsp;
  657. <a class="easyui-linkbutton" href="javascript:clearDrawLine()" data-options="iconCls:'icon-playrefresh'">清除</a>&nbsp;&nbsp;
  658. </div>
  659. <div id="zx_croodinates" style="height:80%;width: 100%;font-family: 幼圆;font-size: 12pt;text-align: center">
  660.  
  661. </div>
  662. </div>
  663. <div title="贝塞尔曲线" data-options="iconCls:'icon-line_bezier'" style="padding:10px;">
  664. <div style="height: 30px; width:100%;text-align: center">
  665. <a id="bsl1" class="easyui-linkbutton" href="javascript:drawBezierCurve(2)">随机画二阶曲线</a>
  666. </div>
  667. <div style="height: 140px; width:100%;text-align: center">
  668. <img src="data:images/bezier/2jbezier.gif" /><br>
  669. B(t)=(1-t)<sup>2</sup>P<sub>0</sub>+2t(1-t)P<sub>1</sub>+t<sup>2</sup>P<sub>2</sub>,t∈[0,1]
  670. </div>
  671. <div style="height: 30px; width:100%;text-align: center">
  672. <a id="bsl2" class="easyui-linkbutton" href="javascript:drawBezierCurve(3)">随机画三阶曲线</a>
  673. </div>
  674. <div style="height: 150px; width:100%;text-align: center">
  675. <img src="data:images/bezier/3jbezier.gif"/><br>
  676. B(t)=(1-t)<sup>3</sup>P<sub>0</sub>+3t(1-t)<sup>2</sup>P<sub>1</sub>+3t<sup>2</sup>(1-t)P<sub>2</sub>+t<sup>3</sup>P<sub>3</sub>,t∈[0,1]
  677. </div>
  678. <div style="height: 30px; width:100%;text-align: center">
  679. <a class="easyui-linkbutton" href="javascript:clearBezierCurve()" data-options="iconCls:'icon-playrefresh'">清除</a>
  680. </div>
  681. <div style="height: 150px; width:100%;text-align: center">
  682. <img src="data:images/bezier/njform.png" style="width:250px;height:181px"/><br>
  683. </div>
  684. </div>
  685. <div title="在屏幕中央画一个矢量箭头" data-options="iconCls:'icon-line_arrow'" style="padding:10px;text-align: center">
  686. <div style="height: 30px; width:100%;text-align: center">
  687. <a class="easyui-linkbutton" href="javascript:drawArrowLine()">画箭头线</a>
  688. <a class="easyui-linkbutton" href="javascript:clearArrowLine()" data-options="iconCls:'icon-playrefresh'">清除</a>
  689. </div>
  690. <div style="height: 150px; width:100%;text-align: center">
  691. <img src="data:images/arrow/arrow.png" style="width:250px;height:181px"/><br>
  692. </div>
  693. </div>
  694. <div title="多边形" data-options="iconCls:'icon-line_zx'" style="padding:10px;">
  695. <div style="height:30px;width: 100%;font-family: 幼圆;font-size: 12pt;text-align: center">
  696. 随机生成点画多边形
  697. </div>
  698. <div style="height:30px; width:100%;text-align: center">
  699. <select id="cc_polygon" class="easyui-combobox" data-options="valueField:'id',textField:'text',editable:false,panelHeight:'auto',data:[{'id':3,'text':'三边形','selected':true},{'id':4,'text':'四边形'},{'id':5,'text':'五边形'},{'id':6,'text':'六边形'},{'id':7,'text':'七边形'},{'id':8,'text':'八边形'},{'id':9,'text':'九边形'},{'id':10,'text':'十边形'}]" style="width:70px;"></select>
  700. <a class="easyui-linkbutton" href="javascript:drawRegularPolygon($('#cc_polygon').combobox('getValue'))" data-options="iconCls:'icon-playstart'">随机画一个</a>&nbsp;&nbsp;
  701. <a class="easyui-linkbutton" href="javascript:clearRegularPolygon()" data-options="iconCls:'icon-playrefresh'">清除</a>
  702. </div>
  703. </div>
  704. <div title="圆" data-options="iconCls:'icon-line_qyx'" style="padding:10px;">
  705. <div style="height:30px;width: 100%;font-family: 幼圆;font-size: 12pt;text-align: center">
  706. 随机画一个圆
  707. </div>
  708. <div style="height:30px;width: 100%;font-family: 幼圆;font-size: 12pt;text-align: center">
  709. 半径:<input id="txt_radius" class="easyui-textbox" style="width:100px">
  710. </div>
  711. <div style="height: 30px; width:100%;text-align: center">
  712. <a class="easyui-linkbutton" href="javascript:drawCircle()" data-options="iconCls:'icon-playstart'">画一个圆</a>&nbsp;&nbsp;
  713. <a class="easyui-linkbutton" href="javascript:clearCircle()" data-options="iconCls:'icon-playrefresh'">清除</a>
  714. </div>
  715. </div>
  716. <div title="在屏幕中央画一个集结地域" data-options="iconCls:'icon-line_qyx'" style="padding:10px;">
  717. <div style="height: 30px; width:100%;text-align: center">
  718. <a class="easyui-linkbutton" href="javascript:drawRegion()" data-options="iconCls:'icon-playstart'">画集结地域</a>&nbsp;&nbsp;
  719. <a class="easyui-linkbutton" href="javascript:clearRegion()" data-options="iconCls:'icon-playrefresh'">清除</a>
  720. </div>
  721. <div style="height: 150px; width:100%;text-align: center">
  722. <img src="data:images/region/region.png" style="width:250px;height:181px"/><br>
  723. </div>
  724. </div>
  725. <div title="用鼠标绘制图形" data-options="iconCls:'icon-line_qyx'" style="padding:10px;">
  726. <div style="height: 30px; width:100%;text-align: center">
  727. <a class="easyui-linkbutton" href="javascript:addDrawOnMap('Point')">画点</a>
  728. <a class="easyui-linkbutton" href="javascript:addDrawOnMap('LineString')">画折线</a>
  729. <a class="easyui-linkbutton" href="javascript:addDrawOnMap('Polygon')">画多边形</a>
  730. <a class="easyui-linkbutton" href="javascript:addDrawOnMap('Circle')">画圆形</a>
  731. <a class="easyui-linkbutton" href="javascript:addDrawOnMap('Square')">画正方形</a>
  732. <a class="easyui-linkbutton" href="javascript:addDrawOnMap('Box')">画矩形</a>
  733. <a class="easyui-linkbutton" href="javascript:clearDrawOnMap()" data-options="iconCls:'icon-playrefresh'">清除</a>
  734. </div>
  735. </div>
  736. </div>
  737. </div>
  738. <div data-options="region:'center'">
  739. <div style= "overflow: hidden;width:100%;height: 100%;" id="map">
  740. <div id="popup" class="ol-popup">
  741. <a href="#" id="popup-closer" class="ol-popup-closer"></a>
  742. <div id="popup-content"></div>
  743. </div>
  744. </div>
  745. </div>
  746. </div>
  747. </div>
  748. <div id="menu_pointlist" style="width:150px;">
  749. <div data-options="iconCls:'icon-point_jc'" onclick="addPoint(source_point, '机场', 'jc.png')">机场</div>
  750. <div data-options="iconCls:'icon-point_gk'" onclick="addPoint(source_point, '港口', 'gk.png')">港口</div>
  751. <div data-options="iconCls:'icon-point_ck'" onclick="addPoint(source_point, '仓库', 'ck.png')">仓库</div>
  752. <div data-options="iconCls:'icon-point_yz'" onclick="addPoint(source_point, '加油站', 'yz.png')">加油站</div>
  753. <div class="menu-sep"></div>
  754. <div data-options="iconCls:'icon-point_zlsc'" onclick="addPoint(source_point, '自来水厂', 'zlsc.png')">自来水厂</div>
  755. <div data-options="iconCls:'icon-point_qy'" onclick="addPoint(source_point, '企业', 'qy.png')">企业</div>
  756. <div data-options="iconCls:'icon-point_cl'" onclick="addPoint(source_point, '车辆', 'cl.png')">车辆</div>
  757. <div class="menu-sep"></div>
  758. <div data-options="iconCls:'icon-point_bg'" onclick="addPoint(source_point, '宾馆', 'bg.png')">宾馆</div>
  759. <div data-options="iconCls:'icon-point_cy'" onclick="addPoint(source_point, '餐饮', 'cy.png')">餐饮</div>
  760. <div data-options="iconCls:'icon-point_tcc'" onclick="addPoint(source_point, '高速收费站', 'tcc.png')">高速收费站</div>
  761. <div data-options="iconCls:'icon-point_jyz'" onclick="addPoint(source_point, '加油站', 'jyz.png')">加油站</div>
  762. <div data-options="iconCls:'icon-point_jtd'" onclick="addPoint(source_point, '交通灯', 'jtd.png')">交通灯</div>
  763. <div data-options="iconCls:'icon-point_yh'" onclick="addPoint(source_point, '银行', 'yh.png')">银行</div>
  764. <div data-options="iconCls:'icon-point_yy'" onclick="addPoint(source_point, '医院', 'yy.png')">医院</div>
  765. <div data-options="iconCls:'icon-point_poi'" onclick="addPoint(source_point, '兴趣点', 'poi.png')">兴趣点</div>
  766. </div>
  767. <div id="menu_maplist" style="width:150px;">
  768. <div onclick="changeBaseMap([source_google])">Google电子地图</div>
  769. <div onclick="changeBaseMap([source_googledx])">Google地形图</div>
  770. <div onclick="changeBaseMap([source_googlesat])">Google卫星地图</div>
  771. <div class="menu-sep"></div>
  772. <div onclick="changeBaseMap([source_qq])">腾讯soso电子地图</div>
  773. <div onclick="changeBaseMap([source_qqdx, source_qqdxlabel])">腾讯soso地形图</div>
  774. <div onclick="changeBaseMap([source_qqsat, source_qqsatlabel])">腾讯soso卫星地图</div>
  775. <div class="menu-sep"></div>
  776. <div onclick="changeBaseMap([source_baidu])">百度电子地图</div>
  777. <div onclick="changeBaseMap([source_baidusat, source_baidusatlabel])">百度卫星地图</div>
  778. <div class="menu-sep"></div>
  779. <div onclick="changeBaseMap([source_gaode])">高德电子地图</div>
  780. <div onclick="changeBaseMap([source_gaodesat, source_gaodesatlabel])">高德卫星地图</div>
  781. <div class="menu-sep"></div>
  782. <div onclick="changeBaseMap([source_tiandi, source_tiandilabel])">天地电子地图</div>
  783. <div onclick="changeBaseMap([source_tiandisat, source_tiandilabel])">天地卫星地图</div>
  784. </div>
  785. <div id="menu_maplist_offline" style="width:150px;">
  786. <div onclick="changeBaseMap([source_arcgis_offline])">arcgis瓦片电子地图</div>
  787. <div onclick="changeBaseMap([source_arcgissat_offline])">arcgis瓦片卫星地图</div>
  788. <div class="menu-sep"></div>
  789. <div onclick="changeBaseMap([source_sqlite_offline])">Sqlite数据库电子地图</div>
  790. <div onclick="changeBaseMap([source_sqlitesat_offline])">Sqlite数据库卫星地图 </div>
  791. </div>
  792. <div id="win_tip" class="easyui-window" title="提示" style="width:700px;height:400px;overflow: hidden" data-options="iconCls:'icon-info',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true">
  793. <div style="width: 100%;height: 30px;text-align: center;line-height: 30px;color: red;font-size: 12pt">当前浏览器可能不支持地图的导出功能,各类浏览器支持情况请看下图所示。</div>
  794. <img src="data:images/browser.jpg" style="width:100%;height: 330px" />
  795. </div>
  796. </body>
  797. </html>

WebGis二次开发包实例的更多相关文章

  1. Openlayers3 WebGis二次开发包实例

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs& ...

  2. [转]QGis2.9在windows下的编译以及二次开发包下载

    今天心血来潮,将QGis在github上的代码更新后,又编译了一下.留意到源代码包里面的INSTALL文件有更新,于是本次编译完全基于官方的编译说明.编译过程非常顺利,除了在CMake的第一次conf ...

  3. PIE.NET-SDK插件式二次开发文档

    一 PIE.Net开发环境部署 1.     开发环境部署 确保Win7系统已安装SP1 安装Visual Studio2013(支持VS2010/2012/2013/2015) 安装PIESDK.e ...

  4. PIE.NET-SDK组件式二次开发文档

    一.PIE.Net开发环境及目录说明 1.   开发环境 确保Win7系统已安装SP1 安装Visual Studio2013(支持VS2010/2012/2013/2015) 安装PIESDK.ex ...

  5. 第一周博客之二---OA项目环境搭建及开发包部署

    OA项目环境搭建 一个项目想要能够在开发人员打包好项目包之后进行测试,就必须进行项目测试环境的搭建,要根据开发工程师的开发环境采用不同的测试环境,以下只是浅谈下Java项目OA(办公自动化平台)的环境 ...

  6. *** wechat-php-sdk 微信公众平台php开发包

    wechat-php-sdk 微信公众平台php开发包,细化各项接口操作,支持链式调用,欢迎Fork此项目weixin developer SDK. 项目地址:https://github.com/d ...

  7. Chilkat----开源站点之VS2010 CKMailMan一个很好的邮件发送开源开发包

    Chilkat 是一个很好的开源站点,有各种开源库. 开发语言主要有Classic ASP •C • C++ • C# • Delphi ActiveX • Delphi DLL • Visual F ...

  8. .NET 的 WebSocket 开发包比较(转)

    .NET 的 WebSocket 开发包比较 编者按 本文出现在第三方产品评论部分中.在这一部分的文章只提供给会员,不允许工具供应商用来以任何方式和形式来促销或宣传产品.请会员报告任何垃圾信息或广告. ...

  9. Python开发包推荐系列之xml、html解析器PyQuery

    使用python,喜欢她的简洁是一方面,另外就是它有着丰富的开发包 好用又方便 接下来会给大家推荐一系列很赞的开发包. 在解析html.xml过程中,我们有不少的包可以用.比如bs.lxml.xmlt ...

随机推荐

  1. windows pip 安装 转载

    经常在使用Python的时候需要安装各种模块,而pip是很强大的模块安装工具,但是由于国外官方pypi经常被墙,导致不可用,所以我们最好是将自己使用的pip源更换一下,这样就能解决被墙导致的装不上库的 ...

  2. js把时间转化为 ‘2019-07-01’ 格式

    将new Date()数据转化为‘2019-07-01’格式 //时间 function formatDate(date) { var y = date.getFullYear(); ; m = m ...

  3. leetcode-95-不同的二叉搜索树(卡特兰数)

    题目描述: 方法一:动态规划 O(n^2) O(n) class Solution: def numTrees(self, n: int) -> int: dp = [0]*(n+1) dp[0 ...

  4. 【JZOJ3362】【BZOJ3758】数数

    description 神犇最近闲来无事,于是就思考哲学,研究数字之美.在神犇看来,如果一个数的各位能够被分成两个集合,而且这两个集合里的数的和相等,那么这个数就是优美的(具体原因就只有神犇才知道了) ...

  5. 拦截器和自定义注解@interface

    1 .拦截器(Interceptor): 用于在某个方法被访问之前进行拦截,然后在Handler执行之前或之后加入某些操作,其实就是AOP的一种实现策略. 拦截用户的请求并进行相应的处理,比如:判断用 ...

  6. Laravel 不同环境加载不同的.env文件

    假设有4个.env文件.分别为 .env.local .env.dev .env.test .env.prd 方式一 第一步:bootstrap\app.php 加入代码 $envs = ['loca ...

  7. 模板——tarjan求割点

    在一个无向图中,如果有一个顶点集合,删除这个顶点集合以及这个集合中所有顶点相关联的边以后,图的连通分量增多,就称这个点集为割点集合. 注意求割点中的low定义: 割点中low[u]记录节点u或u的子树 ...

  8. 04_Spring AOP两种代理方法

    什么是AOP?           AOP为Aspect Oriented Programming的缩写,意为:面向切面编程,通过预编译方式和运行期动态代理实现程序功能的统一维护的一种技术.AOP是O ...

  9. 让ASPX页面可以提交html标签代码的配置

    1:打开web.config文件,在system.web节点里,添加<httpRuntime requestValidationMode="2.0" /> 2:在asp ...

  10. 2019-3-16-win10-uwp-鼠标移动到图片上切换图片

    title author date CreateTime categories win10 uwp 鼠标移动到图片上切换图片 lindexi 2019-03-16 14:43:46 +0800 201 ...