| @@ -0,0 +1 @@ | |||||
| http://www.nongshen.net/static/logo/logo.png | |||||
| @@ -0,0 +1,225 @@ | |||||
| <!DOCTYPE html> | |||||
| <html> | |||||
| <head> | |||||
| <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |||||
| <meta name="keywords" content="天地图" /> | |||||
| <title>天地图-地图API-web定位并获取详细地址</title> | |||||
| <script type="text/javascript" src="https://api.tianditu.gov.cn/api?v=4.0&tk=cc4aba6e967096098249efa069733067"></script> | |||||
| <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |||||
| <style type="text/css"> | |||||
| body, | |||||
| html { | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| margin: 0; | |||||
| font-family: "Microsoft YaHei" | |||||
| } | |||||
| #mapDiv { | |||||
| width: 100%; | |||||
| height: 400px | |||||
| } | |||||
| input, | |||||
| b, | |||||
| p { | |||||
| margin-left: 5px; | |||||
| font-size: 14px | |||||
| } | |||||
| </style> | |||||
| </head> | |||||
| <body onLoad="onLoad()"> | |||||
| <div id="mapDiv"></div> | |||||
| <p>用H5定位所在位置</p> | |||||
| <span id="localInfo"></span><br/> | |||||
| <span id="zuobiao"></span><br/> | |||||
| <div style="width:84%;background:#CCFF66; text-color:#F00; font-size:50px; text-align:center; margin:auto;" onClick="closeWindow();">点击返回</div> | |||||
| <script> | |||||
| var map; | |||||
| //天地图key | |||||
| const mapKey = "cc4aba6e967096098249efa069733067"; | |||||
| //初始化地图级别 | |||||
| var zoom = 12; | |||||
| //当前位置 | |||||
| var detaillocation; | |||||
| //返回坐标 | |||||
| var textZb; | |||||
| //加载地图 | |||||
| function onLoad() { | |||||
| //初始化地图对象 | |||||
| map = new T.Map("mapDiv"); | |||||
| //设置显示地图的中心点和级别 | |||||
| map.centerAndZoom(new T.LngLat(116.40969, 38.89945), zoom); | |||||
| //创建地图类型控件对象 | |||||
| var _mapType = new T.Control.MapType(); | |||||
| //添加地图类型控件 | |||||
| map.addControl(_mapType); | |||||
| //创建缩放平移控件对象 | |||||
| _zoomControl = new T.Control.Zoom(); | |||||
| //添加缩放平移控件 | |||||
| map.addControl(_zoomControl); | |||||
| //创建缩放平移控件对象 | |||||
| _zoomControl.setPosition(T_ANCHOR_TOP_LEFT); | |||||
| //创建定位对象lo | |||||
| var lo = new T.Geolocation(); | |||||
| //创建右键菜单对象 | |||||
| var menu = new T.ContextMenu({ | |||||
| width: 140 | |||||
| }); | |||||
| //添加右键菜单 | |||||
| var txtMenuItem = [{ | |||||
| text: '放大', | |||||
| callback: function() { | |||||
| map.zoomIn() | |||||
| } | |||||
| }, | |||||
| { | |||||
| text: '缩小', | |||||
| callback: function() { | |||||
| map.zoomOut() | |||||
| } | |||||
| }, | |||||
| { | |||||
| text: '放置到最大级', | |||||
| callback: function() { | |||||
| map.setZoom(18) | |||||
| } | |||||
| }, | |||||
| { | |||||
| text: '查看全国', | |||||
| callback: function() { | |||||
| map.setZoom(4) | |||||
| } | |||||
| }, | |||||
| { | |||||
| text: '获得右键点击处坐标', | |||||
| isDisable: false, | |||||
| callback: function(lnglat) { | |||||
| alert(lnglat.getLng() + "," + lnglat.getLat()); | |||||
| } | |||||
| } | |||||
| ]; | |||||
| for (var i = 0; i < txtMenuItem.length; i++) { | |||||
| //添加菜单项 | |||||
| var item = new T.MenuItem(txtMenuItem[i].text, txtMenuItem[i].callback); | |||||
| //item.disable(); | |||||
| menu.addItem(item); | |||||
| if (i == 1 || i == 3) { | |||||
| //添加分割线 | |||||
| menu.addSeparator(); | |||||
| } | |||||
| } | |||||
| //装载菜单 | |||||
| map.addContextMenu(menu); | |||||
| //定位回调函数 | |||||
| fn = function(e) { | |||||
| //alert(JSON.stringify(e)); | |||||
| //当前为移动端时 | |||||
| if (this.getStatus() == 0) { | |||||
| textZb = (e.lnglat); | |||||
| console.log(textZb); | |||||
| console.log("手机端:"+e); | |||||
| //获取地理位置信息并设置到标注 | |||||
| getDetailLocation(e.lnglat, e.lnglat); | |||||
| } | |||||
| //当前为PC端时 | |||||
| if (this.getStatus() == 1) { | |||||
| map.centerAndZoom(e.lnglat, e.level) | |||||
| console.log(e); | |||||
| //获取地理位置信息并设置到标注 | |||||
| getDetailLocation("PC端:"+e.lnglat, e.lnglat); | |||||
| } | |||||
| } | |||||
| //设置标注 | |||||
| function setMarker(e) { | |||||
| var marker = new T.Marker(e); | |||||
| map.addOverLay(marker); | |||||
| var markerInfoWin = new T.InfoWindow("" + detaillocation); | |||||
| marker.addEventListener("click", function() { | |||||
| marker.openInfoWindow(markerInfoWin); | |||||
| }); | |||||
| } | |||||
| //通过经纬度获取详细地址 | |||||
| function getDetailLocation(lnglat_lng, lnglat_lat) { | |||||
| $.ajax({ | |||||
| url: "https://api.tianditu.gov.cn/geocoder", | |||||
| type: 'GET', | |||||
| contentType: "application/json;charset=utf-8", | |||||
| data: { | |||||
| tk: mapKey, | |||||
| type: "geocode", | |||||
| postStr: "{'lon':" + lnglat_lng.lng + ",'lat':" + lnglat_lat.lat + ",'ver':1}" | |||||
| }, | |||||
| success: function(data) { | |||||
| var addressdata = eval("(" + data + ")"); | |||||
| //截取地址信息显示在span上 | |||||
| detaillocation = addressdata.result.formatted_address; | |||||
| $("#localInfo").text(detaillocation + "->" + (new Date()).toLocaleDateString()); | |||||
| $("#zuobiao").text("坐标->"+lnglat_lng.lng+","+lnglat_lat.lat); | |||||
| console.log(detaillocation); | |||||
| if (addressdata.msg == "ok" && addressdata.status == 0) { | |||||
| //将位置信息设置到标注 | |||||
| setMarker(lnglat_lat); | |||||
| } else { | |||||
| //dosomething | |||||
| } | |||||
| }, | |||||
| error: function(er, er1, er2) { | |||||
| alert("获取失败"); | |||||
| } | |||||
| }); | |||||
| } | |||||
| //开始定位 | |||||
| lo.getCurrentPosition(fn); | |||||
| } | |||||
| function closeWindow() | |||||
| { | |||||
| if(window.parent) // 跨域iframe传递数据 | |||||
| { | |||||
| window.parent.postMessage(`LOCATION:${textZb ? JSON.stringify(textZb) : ''}`, '*'); | |||||
| } | |||||
| console.log("返回"); | |||||
| console.log(textZb); | |||||
| let chars = window.location.href.split("exiturl=")[1] || ""; | |||||
| console.log(chars); | |||||
| location.href = `${chars}&lat=${textZb.lat}&lng=${textZb.lng}`; | |||||
| //window.opener.document.xxxxxx.value=text.value; | |||||
| window.close(); | |||||
| } | |||||
| </script> | |||||
| </body> | |||||
| </html> | |||||
| @@ -0,0 +1,96 @@ | |||||
| <!DOCTYPE html> | |||||
| <html lang="en"> | |||||
| <head> | |||||
| <meta charset="UTF-8"> | |||||
| <title>Document</title> | |||||
| <script type="text/javascript" src="http://api.tianditu.com/api?v=4.0&tk=cc4aba6e967096098249efa069733067"></script> | |||||
| <script> | |||||
| var map,control; | |||||
| function onLoad() { | |||||
| // 初始化地图对象 | |||||
| map = new T.Map('mapDiv'); | |||||
| // 设置显示地图的中心点和级别 | |||||
| map.centerAndZoom(new T.LngLat(117.985096, 37.3801), 8); | |||||
| // 允许鼠标滚轮缩放地图 | |||||
| map.enableScrollWheelZoom(); | |||||
| /* | |||||
| //添加鹰眼控件 | |||||
| var miniMap = new T.Control.OverviewMap({ | |||||
| isOpen: true, | |||||
| size: new T.Point(150, 150) | |||||
| }); | |||||
| map.addControl(miniMap); | |||||
| */ | |||||
| // 创建比例尺控件对象 | |||||
| var scale = new T.Control.Scale(); | |||||
| // 添加比例尺控件 | |||||
| map.addControl(scale); | |||||
| // 创建缩放平移控件对象 | |||||
| control = new T.Control.Zoom(); | |||||
| // 添加缩放平移控件 | |||||
| map.addControl(control); | |||||
| control.setPosition(T_ANCHOR_TOP_RIGHT); | |||||
| // 创建标记图片对象(支持更换图标) | |||||
| var icon = new T.Icon({ | |||||
| iconUrl: "http://api.tianditu.com/img/map/markerA.png", | |||||
| iconSize: new T.Point(19, 27), | |||||
| iconAnchor: new T.Point(10, 25) | |||||
| }); | |||||
| // 后台要传来的json数据(测试数据) | |||||
| var jsonStr = "[{'longitude':'117.976101','latitude':'37.418297','address':'滨州','code':'yykj','waterRight':'1300','waterConsumption':'620','state':'0'},{'longitude':'117.985650','latitude':'37.379740','address':'a区','code':'xdgj'}]"; | |||||
| // json串转json对象 | |||||
| var json = eval('(' + jsonStr + ')'); | |||||
| var marker,content; | |||||
| // 循环获取json数据 | |||||
| for (var i = 0; i < json.length; i++) { | |||||
| // 创建标注 | |||||
| marker = new T.Marker(new T.LngLat(json[i].longitude,json[i].latitude),{icon: icon}); | |||||
| // 准备标注信息 | |||||
| content = "点击信息"; | |||||
| // 将标注添加到地图中 | |||||
| map.addOverLay(marker); | |||||
| // 为标注添加点击事件 | |||||
| addClickHandler(content,marker); | |||||
| } | |||||
| function addClickHandler(content,marker){ | |||||
| // 为标注添加点击事件 | |||||
| marker.addEventListener("click",function(e){ | |||||
| openInfo(content,e); | |||||
| } | |||||
| );} | |||||
| function openInfo(content,e){ | |||||
| // 获取标注的经纬坐标 | |||||
| var point = e.lnglat; | |||||
| // 创建标注 | |||||
| marker = new T.Marker(point); | |||||
| // 创建信息窗口对象 | |||||
| var markerInfoWin = new T.InfoWindow(content,{offset:new T.Point(0,-20)}); | |||||
| // 开启信息窗口 | |||||
| map.openInfoWindow(markerInfoWin,point); | |||||
| } | |||||
| } | |||||
| </script> | |||||
| </head> | |||||
| <body onLoad="onLoad()"> | |||||
| <div id="mapDiv" style="position:absolute;width:1400px; height:500px"></div> | |||||
| </body> | |||||
| </html> | |||||
| ———————————————— | |||||
| 版权声明:本文为CSDN博主「爱吃芒果2」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 | |||||
| 原文链接:https://blog.csdn.net/weixin_52072568/article/details/127391217 | |||||
| @@ -0,0 +1 @@ | |||||
| http://www.nongshen.net/static/tdtLocation/location.html | |||||
| @@ -0,0 +1,110 @@ | |||||
| [ { | |||||
| "name":"A", | |||||
| "value":[ | |||||
| { | |||||
| "name":"安徽省", | |||||
| "subset":[ | |||||
| { | |||||
| "name":"烈山区", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"宿州市", | |||||
| "url":"http://lingangqu.nongshen.net:81/api" | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| }, | |||||
| { | |||||
| "name":"C", | |||||
| "value":[ | |||||
| { | |||||
| "name":"重庆市", | |||||
| "subset":[ | |||||
| { | |||||
| "name":"大足区", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"万州区", | |||||
| "url":"http://lingangqu.nongshen.net:81/api" | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| }, | |||||
| { | |||||
| "name":"S", | |||||
| "value":[ | |||||
| { | |||||
| "name":"四川省", | |||||
| "subset":[ | |||||
| { | |||||
| "name":"仪陇县", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"康定市", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| } | |||||
| ] | |||||
| }, | |||||
| { | |||||
| "name":"山东省", | |||||
| "subset":[ | |||||
| { | |||||
| "name":"乳山市", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"临港区", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"荣成市", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"文登区", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"环翠区", | |||||
| "url":"http://192.168.31.178:8080/api" | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| }, | |||||
| { | |||||
| "name":"N", | |||||
| "value":[ | |||||
| { | |||||
| "name":"内蒙", | |||||
| "subset":[ | |||||
| { | |||||
| "name":"克什克腾旗", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"乌兰浩特市", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"乌兰察布市", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"鄂托克旗", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| }, | |||||
| { | |||||
| "name":"九原区", | |||||
| "url":"https://dazu.nongshen.net/api" | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| @@ -0,0 +1,15 @@ | |||||
| [ { | |||||
| "name":"H", | |||||
| "value":[ | |||||
| { | |||||
| "name":"河南省", | |||||
| "subset":[ | |||||
| { | |||||
| "name":"西峡县", | |||||
| "url":"https://xixiaxian.nongshen.net/api" | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| @@ -0,0 +1,166 @@ | |||||
| <!DOCTYPE html | |||||
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
| <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN" xml:lang="zh-CN"> | |||||
| <head> | |||||
| <meta charset="utf-8"> | |||||
| <title>智慧平台工具下载</title> | |||||
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |||||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |||||
| <meta name="keywords" content="服务,服务介绍,北京农燊高科信息技术有限公司,农燊高科,北京农燊,农燊,农燊高科信息技术" /> | |||||
| <meta name="description" cxontent="服务,服务介绍,北京农燊高科信息技术有限公司,农燊高科,北京农燊,农燊,农燊高科信息技术" /> | |||||
| <link href="../static/css/main.css" rel="stylesheet" type="text/css" /> | |||||
| <link href="../static/css/index.css" rel="stylesheet" type="text/css" /> | |||||
| </head> | |||||
| <body> | |||||
| <div class="main"> | |||||
| <div class="topTab"> | |||||
| <!-- | |||||
| <div class="w-1200 tabBox"> | |||||
| <img src="../static/images/logo.png" alt="" class="fl"/> | |||||
| <ul class="fl m-l-30"> | |||||
| <li>智慧平台工具下载</li> | |||||
| <li><a href="product.html" id="product">产品</a></li> | |||||
| <li><a href="javascript:void(0);">案例</a></li> | |||||
| <li><a href="service.html">服务</a></li> | |||||
| <li><a href="about.html">关于</a></li> | |||||
| <li><a href="javascript:void(0);" class="active">下载</a></li> | |||||
| </ul> | |||||
| <div class="fr m-t-15"> | |||||
| <div class="phone fl"> | |||||
| <img src="../static/images/phone.png" alt=""/> | |||||
| <p>400-879-1505</p> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| <a href="about.html#tellUs" class="fl m-r-20 serviceBtn buttonHover">产品咨询</a> | |||||
| </div> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| --> | |||||
| <div class="w-1200 downLoad" style="margin-top: 20px"> | |||||
| <p class="downTit">工具下载</p> | |||||
| <table width="100%" cellspacing="0"> | |||||
| <tr> | |||||
| <td style="width: 20%">工具分类</td> | |||||
| <td style="width: 20%">版本型号</td> | |||||
| <td style="width: 20%">文件大小</td> | |||||
| <td style="width: 20%">安装说明</td> | |||||
| <td style="width: 20%">工具下载</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>打印控件 32位</td> | |||||
| <td>Win32位</td> | |||||
| <td>4.4M</td> | |||||
| <td><a href="../static/downFile/打印控件_谷歌浏览器调试.docx" title="点我查看!" style='color:red'><img src="../static/images/yw.png" width="20" height="20"></a></td> | |||||
| <td><a href="../static/downFile/CLodop_Setup_for_Win32NT.exe"><img src="../static/images/ljxz.png" class="buttonHover"></a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>打印控件 64位</td> | |||||
| <td>Win64位</td> | |||||
| <td>5.4M</td> | |||||
| <td><a href="../static/downFile/打印控件_谷歌浏览器调试.docx" title="点我查看!" style='color:red'><img src="../static/images/yw.png" width="20" height="20"></a></td> | |||||
| <td><a href="../static/downFile/CLodop_Setup_for_Win64NT.exe"><img src="../static/images/ljxz.png" class="buttonHover"></a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>成者高拍仪驱动</td> | |||||
| <td>Shine 1000C</td> | |||||
| <td>75.2M</td> | |||||
| <td></td> | |||||
| <td><a href="../static/downFile/CZURPlugin_1.0.21.602_Setup.exe"><img src="../static/images/ljxz.png" class="buttonHover"></a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>科密高拍仪驱动</td> | |||||
| <td>GP1300AF</td> | |||||
| <td>32M</td> | |||||
| <td></td> | |||||
| <td><a href="../static/downFile/KHGpyServer_3.4.exe"><img src="../static/images/ljxz.png" class="buttonHover"></a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>良田高拍仪驱动</td> | |||||
| <td>S1020A3、S1000A3</td> | |||||
| <td>150M</td> | |||||
| <td></td> | |||||
| <td><a href="../static/downFile/WebCamera_EL_D_V1.2.3.exe"><img src="../static/images/ljxz.png" class="buttonHover"></a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>向日葵被远程工具</td> | |||||
| <td>9.8.2</td> | |||||
| <td>4.5M</td> | |||||
| <td></td> | |||||
| <td><a href="../static/downFile/SunloginClient9.8.2.exe"><img src="../static/images/ljxz.png" class="buttonHover"></a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>谷歌浏览器</td> | |||||
| <td>ChromeSetup</td> | |||||
| <td>1.1M</td> | |||||
| <td></td> | |||||
| <td><a href="../static/downFile/ChromeSetup.exe"><img src="../static/images/ljxz.png" class="buttonHover"></a></td> | |||||
| </tr> | |||||
| </table> | |||||
| </div> | |||||
| <div class="consulting"> | |||||
| </div> | |||||
| <!-- | |||||
| <div class="consulting"> | |||||
| <div class="w-1200 consulting_box"> | |||||
| <img src="../static/images/consulting_img.png" alt=""/> | |||||
| <p>以农立命,以信立燊,高科立业。</p> | |||||
| <div> | |||||
| <a href="about.html#tellUs" class="buttonHover">立即咨询</a> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <div class="w-1200 bottomAbout"> | |||||
| <div class="bottomAbout_box"> | |||||
| <ul style="width: 250px;"> | |||||
| <p>关于</p> | |||||
| <li>关于我们</li> | |||||
| <li>加入我们</li> | |||||
| <li>团队</li> | |||||
| </ul> | |||||
| <ul style="width: 250px;"> | |||||
| <p>服务</p> | |||||
| <li>服务条款</li> | |||||
| <li>隐私协议</li> | |||||
| </ul> | |||||
| <ul style="width: 250px;"> | |||||
| <p>产品</p> | |||||
| <li>如何使用</li> | |||||
| <li>视频介绍</li> | |||||
| <li>更新历史</li> | |||||
| <li>FAQ</li> | |||||
| </ul> | |||||
| <ul style="width: 450px;"> | |||||
| <p>关注我们</p> | |||||
| <li class="fl m-r-25"><img src="../static/images/wb.png" alt=""/></li> | |||||
| <li class="fl m-r-25"><img src="../static/images/wx.png" alt=""/></li> | |||||
| <li class="fl m-r-25"><img src="../static/images/qq.png" alt=""/></li> | |||||
| <div class="clear"></div> | |||||
| </ul> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| <p>©北京农燊高科信息技术有限公司 京ICP备2021008228号</p> | |||||
| </div> | |||||
| --> | |||||
| </div> | |||||
| <script type="text/javascript" src="../static/js/lib/swiper/swiper.min.js"></script> | |||||
| <script type="text/javascript" src="../static/js/project/main.js"></script> | |||||
| </body> | |||||
| </html> | |||||