123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="Access-Control-Allow-Origin" content="*">
- <title>城管通Map Test</title>
- <script src="jquery/jquery-2.2.3.min.js"></script>
- <script src="Common/mapClass/GisShare.js"></script>
- <script type="text/javascript" src="jquery/xml2json.js"></script>
- <script>
- function doGetGraphicByJson_click() {
- var jsonStr = '{"ExChangeRoot": {"Features": [' +
- ' { "type": "polygon", "featureName": "用地", "Feature":[ {"Geometry": { "Rings": [{ "Ring": "1000,-1000|0,-1500|-1000,-1000|-1000,1000|1000,1000|2000,0" } ]},"Attribute": { "ID": "1", "地块面积": "100", "建筑限高": "20" }, "ToolTip": "用地地块","Color": "yellow", "Style": "solid" } ] },' +
- '{ "type": "polyline", "featureName": "道路", "Feature": [{"ShowInfo":"yes", "Geometry": {"Paths": [{ "Path": "3778,-2008|2777,-2816|3777,-3021|3777,-3529|3772,-3928|3774,-4405|3777,-5206" }] }, "Attribute": {"ID": "2","道路名": "人民大道", "道路长度": "10000", "道路宽度": "25" }, "ToolTip": "人民大道", "Color": [225,0,0,0.5], "Size": "5" }] },' +
- '{ "type": "point", "featureName": "兴趣点", "Feature":[ { "Geometry": { "Points":[ { "Point": "2600,900" } ]},"Attribute": { "ID": "3","名称": "东方明珠" }, "ToolTip": "东方明珠","Color": "blue", "Size": "10", "Style": "square"}]}]}}';
- // var jsonStr = '{"ExChangeRoot": {"Features": [' +
- // '{ "type": "point", "Feature":[ { "Geometry": { "Points":[ { "Point": "2600,900,100" } ]},' +
- // '"Attribute": { "id": "3","名称": "",newImgWidth:"20",newImgHeight:"20" }, "ToolTip": "东方明珠","ImgUrl":"http://10.101.35.46/zhwj/assets/image/水源.png" ,' +
- // '"ImgWidth":"92px" ,"ImgHeight":"92px" }]}]}}';
- var jsonStr2='{"ExChangeRoot":{"Features":[ {"type":"point","Feature":[{"Geometry":{"Points":[{"Point":"2600,900,600"}]},"Attribute":{"编号": "310114","地址": "嘉定区安亭镇昌吉路153号","经度": "6653.29804326876","区名": "嘉定区","类型": 1,"名称": "上海市嘉定自来水有限公司","维度": "-28418.3397776738","坐标x": "121.168663","坐标y": "31.295120","水源编号": "281270"},"ToolTip":"东方明珠","ImgUrl":"https://10.101.35.50/zhwj/assets/image/水源.png","ImgWidth":"92px","ImgHeight":"92px","TextSize":"10","TextColor":[255,0,0]}]}]}}';
- doGetGraphicByJson(jsonStr2, true);
- }
- function doDeletePointById_click() {
- doDeletePointById(3)
- }
- function btPointByJson() {
- var jsonStr = '{"ExChangeRoot": {"Features": [' +
- ' { "type": "point", "featureName": "兴趣点", "Feature":[ { "Geometry": { "Points":[ { "Point": "-771.067748323432,4616.52835227014" } ]},"Attribute": { "ID": "1","名称": "测试点1" }, "ToolTip": "东方明珠","Color": "blue", "Size": "10", "Style": "square"}] },' +
- '{ "type": "point", "featureName": "兴趣点", "Feature":[ { "Geometry": { "Points":[ { "Point": "-323.288,7877.093000000001" } ]},"Attribute": { "ID": "2","名称": "测试点2" }, "ToolTip": "东方明珠","Color": "blue", "Size": "10", "Style": "square"}] },' +
- '{ "type": "point", "featureName": "兴趣点", "Feature":[ { "Geometry": { "Points":[ { "Point": "1939.53,1942.0980000000002" } ]},"Attribute": { "ID": "3","名称": "东方明珠" }, "ToolTip": "东方明珠","Color": "blue", "Size": "10", "Style": "square"}]}]}}';
- doGetGraphicByJson(jsonStr);
- }
- function doquery() {
- var str = txtQueryStr.value;
- var layerName = txtQueryLayerName.value;
- query(str, layerName);
- }
- function onMapLoaded() {
- alert("加载完成");
- }
- var f00 = 0;
- var f01 = 0;
- var f02 = 0;
- var f03 = 0;
- var f04 = 0;
- var f05 = 0;
- var f06 = 0;
- var f07 = 0;
- var f08 = 0;
- var f09 = 0;
- var f10 = 0;
- function doQueryByWhere() {
- var whereString = document.getElementById("txtSearchWhere");
- var layerName = document.getElementById("txtSearchLayerName");
- var str = whereString.value;
- var layerName = txtQueryLayerName.value;
- queryByWhereStr(str, layerName);
- }
- function btOpenFeatureLayerByNameClick() {
- var layerName = document.getElementById("txtSearchLayerName");
- if (layerName.value.length > 0) {
- if (parseInt(f00) == 1) {
- f00 = 0;
- }
- else {
- f00 = 1;
- }
- doOpenFeatureLayerByName(layerName.value, f00);
- }
- }
- function btOpenFeatureLayerClick0() {
- if (parseInt(f00) == 1) {
- f00 = 0;
- }
- else {
- f00 = 1;
- }
- doOpenFeatureLayer0(f00);
- }
- function btOpenFeatureLayerClick1() {
- if (parseInt(f01) == 1) {
- f01 = 0;
- }
- else {
- f01 = 1;
- }
- doOpenFeatureLayer1(f01);
- }
- function btOpenFeatureLayerClick2() {
- if (parseInt(f02) == 1) {
- f02 = 0;
- }
- else {
- f02 = 1;
- }
- doOpenFeatureLayer2(f02);
- }
- function btOpenFeatureLayerClick3() {
- if (parseInt(f03) == 1) {
- f03 = 0;
- }
- else {
- f03 = 1;
- }
- doOpenFeatureLayer3(f03);
- }
- function btOpenFeatureLayerClick4() {
- if (parseInt(f04) == 1) {
- f04 = 0;
- }
- else {
- f04 = 1;
- }
- doOpenFeatureLayer4(f04);
- }
- function btOpenFeatureLayerClick5() {
- if (parseInt(f05) == 1) {
- f05 = 0;
- }
- else {
- f05 = 1;
- }
- doOpenFeatureLayer5(f05);
- }
- function btOpenFeatureLayerClick6() {
- if (parseInt(f06) == 1) {
- f06 = 0;
- }
- else {
- f06 = 1;
- }
- doOpenFeatureLayer6(f06);
- }
- function btOpenFeatureLayerClick7() {
- if (parseInt(f07) == 1) {
- f07 = 0;
- }
- else {
- f07 = 1;
- }
- doOpenFeatureLayer7(f07);
- }
- function btOpenFeatureLayerClick8() {
- if (parseInt(f08) == 1) {
- f08 = 0;
- }
- else {
- f08 = 1;
- }
- doOpenFeatureLayer8(f08);
- }
- function btOpenFeatureLayerClick9() {
- if (parseInt(f09) == 1) {
- f09 = 0;
- }
- else {
- f09 = 1;
- }
- doOpenFeatureLayer9(f09);
- }
- function btOpenFeatureLayerClick10() {
- if (parseInt(f10) == 1) {
- f10 = 0;
- }
- else {
- f10 = 1;
- }
- doOpenFeatureLayer10(f10);
- }
- function btFlashFE0Click() {
- doFlashStatus("违章建筑");
- }
- function btFlashFE1Click() {
- doFlashStatus("虹口烟感");
- }
- function btFlashFE2Click() {
- doFlashStatus("门磁");
- }
- function btFlashFE3Click() {
- doFlashStatus("");
- }
- function btSetCenterExtentByPointR() {
- var x = 0;
- var y = 0;
- var r = 100;
- setCenterExtentByPointR(x, y, r)
- }
- function btDrawCircle() {
- doDrawCircle([225, 200, 0, 0.8])
- }
- function btQueryByCircle() {
- doQueryByCircle("BUILDING", "assets/image/btReset.png", 10, 10)
- }
- function SetExtent(num) {
- doSetExtent(num);
- }
- function btOnLocation() {
- var x = document.getElementById("txtXStr").value;
- var y = document.getElementById("txtYStr").value;
- var Attribute = '{ "ID": "1","名称": "测试点1" }';
- var ToolTip = '测试点1';
- var ImgUrl = 'https://static.arcgis.com/images/Symbols/Shapes/BlackStarLargeB.png';
- var ImgWidth = "92px";
- var ImgHeight = "92px";
- doOnLocation(x, y, Attribute, ToolTip, ImgUrl, ImgWidth, ImgHeight);
- }
- function btOnLocationforGrid() {
- var x = document.getElementById("txtXStr").value;
- var y = document.getElementById("txtYStr").value;
- doOnLocationforGrid(x, y);
- }
- // window.onmessage = function(e) {
- // var payload = JSON.parse(e.data);
- // switch (payload.method) {
- // case "measureLengthCallback":{
- // var len = payload.data[0];
- // break;
- // }
- // }
- // }
- // var measureLengthCallback = function (length){
- // var len = length;
- // };
- function btMeasureLength() {
- var x = document.getElementById("txtStartXStr").value;
- var y = document.getElementById("txtStartYStr").value;
- var x1 = document.getElementById("txtEndXStr").value;
- var y1 = document.getElementById("txtEndYStr").value;
- doMeasureLengthByPoint(x, y, x1, y1, "measureLengthCallback");
- }
- function btNewQuery() {
- var str = document.getElementById("txtQueryStr").value;
- var layerName = document.getElementById("txtQueryLayerName").value;
- doNewQuery(str, layerName);
- }
- function btGridQuery() {
- var str = document.getElementById("txtQueryGridStr").value;
- var isgoto = false;
- doGridQuery(str, isgoto);
- }
- function btChangeLayerStateByName() {
- var layerName = document.getElementById("txtLayerStr").value;
- // doOpenFeatureLayerByName("街道乡镇", true, "1=1");
- doOpenFeatureLayerByName("十二月内存量零", true, "1=1");
- // doOpenFeatureLayerByName("非法行医",true,"所属区='宝山区'");
- }
- function btCloseChangeLayer() {
- doCloseChangeLayer();
- }
- function btOnLocationforAddress() {
- var x = document.getElementById("txtXStr").value;
- var y = document.getElementById("txtYStr").value;
- doOnLocationforAddress(x, y);
- }
- function btOnPointQuery() {
- var x = document.getElementById("txtXStr").value;
- var y = document.getElementById("txtYStr").value;
- var radius = 50;//米
- var layername = document.getElementById("txtQueryLayerName").value;
- // doOnQueryByPoint(x,y,"上水井盖",radius,true);
- doOnQueryByPoint(x, y, "万米网格", radius, true, false);
- }
- function btOnGridQuery() {
- var grid = "19258";
- var layername = document.getElementById("txtQueryLayerName").value;
- doOnQueryByGrid(grid, "路灯");
- }
- function btOnMapCenter() {
- doOnMapCenter();
- }
- function btOnMapLevel() {
- doOnMapLevel();
- }
- function btOnMapSetCenter() {
- var x = document.getElementById("txtXStr").value;
- var y = document.getElementById("txtYStr").value;
- doOnMapSetCenter(x, y);
- }
- function btOnGetXYbyAddress() {
- var address = document.getElementById("txtAddressStr").value;
- doOnGetXYbyAddress(address);
- }
- function btOnSetInitExtentByStr() {
- doOnSetInitExtentByStr("区县边界", "浦东新区");
- // doOnSetInitExtentByStr("街道乡镇","万祥镇");
- }
- function btQueryByCondition() {
- var str = "1=1";
- var layername = "废物箱(桶)";
- var isShow = true;
- var isGoTo = true;
- doOnQueryByCondition(str, layername, isShow, isGoTo);
- }
- function btChangeLayerStateByNameandWhere() {
- // doOpenFeatureLayerByNameandWhere("上水井盖",1 ,"枫林街道",false,false);
- // var type = 1;//街道
- // var name = "枫林街道";
- // var layername ="上水井盖";
- // var isOpen = true;
- // var isGoTo = true;
- // doOpenFeatureLayerByNameandWhere(layername,type ,name,isGoTo,isOpen);
- var type = "2";//区
- var name = "徐汇区";
- var layername = "上水井盖";
- var isOpen = true;
- var isGoTo = true;
- doOpenFeatureLayerByNameandWhere(layername, type, name, isGoTo, isOpen);
- }
- function btChangeLayerClose() {
- var type = 1;//街道
- var name = "枫林街道";
- var layername = "上水井盖";
- var isOpen = false;
- var isGoTo = false;
- doOpenFeatureLayerByNameandWhere(layername, type, name, isGoTo, isOpen);
- // var type = 1;//街道
- // var name = "枫林街道";
- // var layername ="上水井盖";
- // var isOpen = false;
- // var isGoTo = false;
- // doOpenFeatureLayerByNameandWhere("上水井盖",1 ,"徐家汇街道",true,true);
- }
- function btOnClickLocation() {
- // var x=document.getElementById("txtXStr").value;
- // var y=document.getElementById("txtYStr").value;
- var Attribute = '{ "ID": "1","名称": "测试点1" }';
- var ToolTip = '测试点1';
- var ImgUrl = 'https://static.arcgis.com/images/Symbols/Shapes/BlackStarLargeB.png';
- // var ImgUrl = 'https://map.3h-weixin.com/images/location.png';
- var ImgWidth = '32px';
- var ImgHeight = '32px';
- doOnClickLocation(Attribute, ToolTip, ImgUrl, ImgWidth, ImgHeight);
- }
- function btOnresizeType() {
- var radius = 50;
- var layername = "上水井盖";
- doOnSetResizeType(1);//地址
- //
- // var radius = 50;
- // // var layername = "上水井盖";
- // //2查地址
- // doOnSetResizeType(2,radius,layername);//部件
- // doOnSetResizeType(3,radius,layername);//查地址部件
- }
- function btOnSetCluster() {
- var layername = "上水井盖";
- doOnSetLayerCluster(layername, true);
- }
- function btOnSetClusterClose() {
- var layername = "上水井盖";
- doOnSetLayerCluster(layername, false);
- }
- function btOnShowPolygonandText() {
- // var type = "街道乡镇";//街道
- // var name = "枫林街道";
- // var text = "you are here1 \n you are here2";
- var jsonarr = [{"type": "1", "name": "香花桥街道", "text": "统计1:456\n统计2:123"},
- {"type": "1", "name": "徐泾镇", "text": "统计1:456\n统计2:123"}];
- doOnShowPolygonandText(jsonarr);
- }
- // function btTest(){
- // var xml='<Result>\n' +
- // '<Status>False</Status>\n' +
- // '<StatusMessage>The table was not found. [合并数据]</StatusMessage>\n' +
- // '<IsLocInArea>1</IsLocInArea>\n' +
- // '<HappenAddress>练塘镇联农村四联362号</HappenAddress>\n' +
- // '<PoiAddress>练塘镇联农村四联362号</PoiAddress>\n' +
- // '<PoiName>练塘镇联农村四联</PoiName>\n' +
- // '<StreetName> </StreetName>\n' +
- // '<StreetCode> </StreetCode>\n' +
- // '<District> </District>\n' +
- // '<Community> </Community>\n' +
- // '<CommunityCode> </CommunityCode>\n' +
- // '<GridNo> </GridNo>\n' +
- // '<Road> </Road>\n' +
- // '<X>-44338.8083793</X>\n' +
- // '<Y>-27297.96031892</Y>\n' +
- // '<ZrGridNo> </ZrGridNo>\n' +
- // '<BlockID> </BlockID>\n' +
- // '<BlockName> </BlockName>\n' +
- // '<CQCodes> </CQCodes>\n' +
- // '<RailSafetyZone> </RailSafetyZone>\n' +
- // '<Rivers/>\n' +
- // '<IsPrecise>False</IsPrecise>\n' +
- // '<TypeName>门牌</TypeName>\n' +
- // '<Time>1.258秒</Time>\n' +
- // '</Result>';
- // // var test = xmltojson(xml,'Result',true);
- // var test1 = $.xml2json(xml);
- // // console.log(test);
- // console.log(test1);
- // }On
- function btOnClickLocationGetLatLog() {
- // var Attribute = '{ "ID": "1","名称": "测试点1" }';
- // var ToolTip = '测试点1';
- // var ImgUrl = 'https://static.arcgis.com/images/Symbols/Shapes/BlackStarLargeB.png';
- // var ImgWidth = '32px';
- // var ImgHeight = '32px';
- doOnLocationGetLatLon("#FF0000");
- }
- function btOndrawSquare() {
- doOnDrawPolygonSquare();
- // drawSquare();
- }
- function btOndrawCircle() {
- doOnDrawPolygonCircle();
- }
- function btLightArea() {
- var colorList = [{
- name: "静安区",
- color: [255, 255, 0, 0.6],
- text: "静安区:\n aaaa",
- textColor: "blue",
- text2: "123",
- textColor2: "red",
- },{
- name: "宝山区",
- color: [255, 255, 0, 0.6],
- text2: "232",
- textColor2: "red",
- text3: "<div style='background: red'>宝山区</div>",
- textColor3: "rgba(225, 0, 0, 0.5)"
- }
- ]
- doOnLightArea("区县边界", "区县名称 in ('静安区','宝山区')", colorList, "区县名称");
- }
- function btShowAreaName() {
- var type = $("#selectLightType").val();
- doShowAreaName("区县边界", "区县名称", true, 14, "#FF0000")
- }
- function bt2Dor3D(where) {
- switch2Dor3DMap(where);
- }
- function btRouteClick() {
- var TestData = [
- [{name: 'A', xy: [100, 200]}, {name: 'B', xy: [1000, 2000], value: 95,width:10}],
- [{name: 'A', xy: [100, 200]}, {name: 'C', xy: [-100, -2000], value: 90,width:20}],
- [{name: 'A', xy: [100, 200]}, {name: 'E', xy: [1000, -3000], value: 80,width:5}],
- [{name: 'A', xy: [100, 200]}, {name: 'F', xy: [2000, 4000], value: 70}],
- [{name: 'A', xy: [100, 200]}, {name: 'G', xy: [3000, -5000], value: 60}],
- [{name: 'A', xy: [100, 200]}, {name: 'H', xy: [4000, 7000], value: 50}],
- [{name: 'A', xy: [100, 200]}, {name: 'I', xy: [5000, -2000], value: 40}],
- [{name: 'A', xy: [100, 200]}, {name: 'J', xy: [6000, 9000], value: 30}],
- [{name: 'A', xy: [100, 200]}, {name: 'K', xy: [7000, -1000], value: 20}],
- [{name: 'A', xy: [100, 200]}, {name: 'L', xy: [8000, 2000], value: 10}]
- ];
- doEchartsRoute(TestData, "", "", 40);
- }
- function btWaterRouteClick() {
- doWaterRouteClick("1=1");
- }
- function btPopupWinClick() {
- var x = 2600;
- var y = 900;
- var popsArray = [{
- //地图坐标
- x: x,
- y: y,
- //popup内容的文字,只是个示范,当然格式不限
- content: "<iframe src='red.html' style='width:300px;height:400px'></iframe>",
- //气泡窗口div的id唯一标识
- id: "info1"
- },
- {
- x: -1133.713,
- y: -2313.15,
- content: "<button onclick='popupClick({id:0})'>ss</button>",
- id: "info2"
- }]
- doPopupIn(popsArray, false);
- }
- function btClosePopupWinClick() {
- doClosePopupIn();
- }
- function btCorrugatedPointByOid() {
- var ORGANIZATION_ID_List = ["9349b6df19344947805984d4b288565d", "5b440954408a4c9c95e34ec0e8a1caf3", "cb988219c7f042a8a17eabdfedb33f8c"]
- doCorrugatedPointByOid(ORGANIZATION_ID_List);
- }
- function btClearCorrugatedPoint() {
- doClearCorrugatedPoint()
- }
- function xyToStreetId() {
- doXyToStreetId(1, 1);
- }
- function btGoToGraphic() {
- doGoToGraphic("区县边界", "区县名称='徐汇区'")
- // doGoToGraphic("街道乡镇","街道名称='华亭镇'")
- // doGoToGraphic("点",[[0,0],[1000,1000]]);
- }
- //返回方法
- function doXyToStreetIdReturn(streetId) {
- console.log(streetId)
- }
- function clickLightAreaReturn(attr) {
- console.log(attr)
- }
- function moveInLightAreaReturn(attr) {
- console.log(attr)
- }
- function clickWaterTankReturn(attr) {
- console.log(attr)
- }
- function moveOutLightAreaReturn(attr) {
- console.log(attr)
- }
- function moveOutDrawLayerReturn(attr) {
- console.log(attr)
- }
- function moveInDrawLayerReturn(attr) {
- console.log(attr)
- }
- function clickDrawLayerReturn(attr) {
- console.log(attr)
- }
- function doPopupClickReturn(json) {
- alert(json.id)
- }
- function closePopupReturn(id) {
- console.log(id)
- }
- function clickWZXYFeatureReturn(attr) {
- debugger
- }
- function clickApparitorFeatureReturn(arr) {
- debugger
- console.log(arr[0].name)
-
- }
- function btGoToJZ() {
- doGoToJZ("固定监测站", "",document.getElementById("radius").value)
- }
- function btShowBuildlayer(where){
- ShowBuildlayer(where);
- }
- function btShowBuildlayerSX(where){
- ShowBuildlayerSX(where);
- }
- function btResettingMap(){
- ResettingMap();
- }
- function btconsoleXYZ(){
- consoleXYZ();
- }
- function btClusterByJson() {
- var list= [{
- id:'1',
- name:'aa',
- cjX:4000,
- cjY:-2310,
- cameraIndexCode:'1111',
- latitude:4000,
- longitude:-2310,
- },{
- id:'2',
- name:'aa1',
- cjX:4000,
- cjY:4000,
- cameraIndexCode:'1111',
- latitude:4000,
- longitude:-2310,
- },{
- id:'3',
- name:'aa2',
- cjX:-4200,
- cjY:-4011,
- cameraIndexCode:'1111',
- latitude:4000,
- longitude:-2310,
- },{
- id:'4',
- name:'aa3',
- cjX:-4221,
- cjY:-4000,
- cameraIndexCode:'1111',
- latitude:4000,
- longitude:-2310,
- } ];
- var img=[{src:'http://10.101.35.50/zhwj/assets/image/水源.png',imgwidth:'25px',imgHeight:'25px'},
- {src:'http://10.101.35.50/zhwj/assets/image/水厂.png',imgwidth:'25px',imgHeight:'25px'}];
- doClusterByJson(list,img)
- }
- function bt2ChangerExtent() {
- var xmax=256584;
- var xmin=-263908;
- var ymax=81205.64627439517;
- var ymin=-65099.3105455185;
- ChangerExtent(xmax,xmin,ymax,ymin);
- }
- function btOnMapSetCenter3D() {
- var x = document.getElementById("txtXStr").value;
- var y = document.getElementById("txtYStr").value;
- doOnMapSetCenter3D(x, y,8,null,null);
- }
- function btHeatMap(type) {
- HeatMap(type);
- }
- </script>
- </head>
- <body>
- <div>
- <button onclick="xyToStreetId()">坐标转街道id</button>
- <!--放大范围0-13-->
- <button id="btZoomIn" onclick="ZoomIn(4)">放大</button>
- <button id="btZoomOut" onclick="ZoomOut(2)">缩小</button>
- <button id="btClear" onclick="Clear('all')">清空地图</button>
- <button id="btViewTest" onclick="ViewChange()">切换地图</button>
- <button id="btFullExtent" onclick="fullExtent()">全景</button>
- <button id="btDrawPolygon" onclick="measureSquare()">测面积</button>
- <button id="btDrawPolyline" onclick="measureLength()">测距离</button>
- <button id="btPrintPicture" onclick="downLoadPicture()">导出图片</button>
- <button id="btGetGraphicByJson" onclick="doGetGraphicByJson_click()">根据json撒点线面</button>
- <button onclick="doDeletePointById_click()">根据id删除点</button>
- <button id="btPointByJson" onclick="btPointByJson()">测试</button>
- <button id="btnCircle" onclick="drawSquare()">画圈</button>
- <button id="btSetExtent1" onclick="SetExtent(1);">范围一</button>
- <button id="btSetExtent2" onclick="SetExtent(2);">范围二</button>
- <button id="btSetExtent3" onclick="SetExtent(3);">范围三</button>
- <!-- 2019 12 by hm -->
- <input id="txtXStr" placeholder="经度"/>
- <input id="txtYStr" placeholder="纬度"/>
- <button onclick="btOnLocation()"> 定位</button>
- <button onclick="btOnLocationforGrid()"> 网格</button>
- <button onclick="btOnLocationforAddress()"> 地址</button>
- <input id="txtStartXStr" placeholder="起点经度"/>
- <input id="txtStartYStr" placeholder="起点纬度"/>
- <input id="txtEndXStr" placeholder="终点经度"/>
- <input id="txtEndYStr" placeholder="终点纬度"/>
- <button onclick="btMeasureLength()"> 两点测距</button>
- <input id="txtQueryStr" placeholder="关键词" value="1=1"/>
- <input id="txtQueryLayerName" placeholder="搜索图层名" value="路灯"/>
- <button onclick="btNewQuery()">图层查询</button>
- <input id="txtQueryGridStr" placeholder="关键词" value="1=1"/>
- <button onclick="btGridQuery()">网格查询</button>
- <input id="txtLayerStr" placeholder="图层名"/>
- <button onclick="btChangeLayerStateByName()">图层开关</button>
- <button onclick="btCloseChangeLayer()">关闭所有图层开关</button>
- <button onclick="btOnPointQuery()">点查询</button>
- <button onclick="btOnGridQuery()">网格查询</button>
- <button onclick="btOnMapCenter()"> 地图中心点</button>
- <button onclick="btOnMapLevel()"> 地图层级</button>
- <button onclick="btOnMapSetCenter()"> 设置地图中心点</button>
- <input id="txtAddressStr" placeholder="路名"/>
- <button onclick="btOnGetXYbyAddress()"> 地址获得XY</button>
- <button onclick="btOnSetInitExtentByStr()"> 四至范围</button>
- <button onclick="btQueryByCondition()">doOnQueryByCondition</button>
- <button onclick="btChangeLayerStateByNameandWhere()">条件图层开关</button>
- <button onclick="btChangeLayerClose()">条件图层关</button>
- <!--<button onclick="btTest()"> Test</button>-->
- <button onclick="btOnClickLocation()"> 点击绘制点并返回信息</button>
- <button onclick="btOnresizeType()"> 设置resizeType</button>
- <button onclick="btOnSetCluster()"> 聚合开关</button>
- <button onclick="btOnSetClusterClose()"> 聚合开关</button>
- <button onclick="btOnShowPolygonandText()">测试</button>
- <button onclick="btOnClickLocationGetLatLog()">画点(点击)</button>
- <button onclick="btOndrawSquare()">画方</button>
- <button onclick="btOndrawCircle()">画⚪</button>
- <span>
- <select id="selectLightType">
- <option value="区县边界">区县边界</option>
- <option value="街道乡镇">街道乡镇</option>
- <option value="居委会">居委会</option>
- </select>
- <input type="text" id="txtLightCondition" placeholder="条件">
- <button id="btOpenFeatureLayer3" onclick="btLightArea()">高亮区县街道</button>
- <button onclick="btShowAreaName()">显示区县名称</button>
- </span>
- <button id="btRoute" onclick="btRouteClick()">迁移图效果</button>
- <button id="btPopupWin" onclick="btPopupWinClick()">放置自定义对话框</button>
- <button id="btClosePopupWin" onclick="btClosePopupWinClick()">关闭自定义对话框</button>
- <button onclick="btCorrugatedPointByOid()">传id撒波纹点</button>
- <button onclick="btWaterRouteClick()">水源地溯源</button>
- <button onclick="btGoToGraphic()">聚焦到</button>
- <button onclick="btClusterByJson()">聚合</button>
- <button onclick="btGoToJZ()">基站</button>
- <input type="number" id="radius" value="1000">
- <button onclick="btShowBuildlayer(true)">切换3D</button>
- <button onclick="btShowBuildlayer(false)">切换2D</button>
- <button onclick="btShowBuildlayerSX(true)">水箱显示</button>
- <button onclick="btShowBuildlayerSX(false)">水箱隐藏</button>
- <button onclick="btResettingMap()">重置</button>
- <button onclick="btconsoleXYZ()">获取xyz</button>
- <button onclick="bt2Dor3D('3D')">切换3D</button>
- <button onclick="bt2Dor3D('2D')">切换2D</button>
- <button onclick="bt2ChangerExtent()" >四至范围</button>
- <button onclick="btOnMapSetCenter3D()"> 设置地图中心点3d</button>
- <button onclick="btHeatMap(0)" >热力图</button>
- <button onclick="btHeatMap(1)" >热力图</button>
- <button onclick="btHeatMap('clear')" >清空热力图</button>
- <div style="width: 10px;height: 10px;background: #0c80ba" onc></div>
- <div>
- <iframe id="myMap" src="GisShareApp3D2.html" width="1536px" height="988px" frameborder="no" border="0"
- marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"/>
- </div>
- </div>
- </body>
- </html>
|