<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>Directions方位展示</title>
<!-- <link rel="stylesheet" type="text/css" href="http://localhost:8080//arcgis_js_api/library/3.18/3.18/dijit/themes/tundra/tundra.css"> -->
<!-- <link rel="stylesheet" type="text/css" href="http://localhost:8080//arcgis_js_api/library/3.18/3.18/dijit/themes/claro/claro.css"> -->
<!-- <link rel="stylesheet" type="text/css" href="http://localhost:8080//arcgis_js_api/library/3.18/3.18/init.js"> -->
<!-- <link rel="stylesheet" type="text/css" href="js/dojo.js"> -->
<link rel="stylesheet" href="http://localhost:8080/arcgis_js_v311_api/arcgis_js_api/library/3.11/3.11/esri/css/esri.css"/>
<link rel="stylesheet" href="http://localhost:8080/arcgis_js_v311_api/arcgis_js_api/library/3.11/3.11/dijit/themes/claro/claro.css"/>
<script type="text/javascript" src="http://localhost:8080/arcgis_js_v311_api/arcgis_js_api/library/3.11/3.11/init.js"></script> <!-- <link rel="stylesheet" type="text/css" href="js/jquery-1.8.3.min.js"> -->
<script type="text/javascript">
dojo.require("esri.map");//类似引入命名空间
//var map = [];
function init(){
esri.config.defaults.io.proxyUrl = "/proxy/proxy.ashx";
var map = new esri.Map("map", {
extent:new esri.geometry.Extent({ xmin:110, ymin:31, xmax:117, ymax:37, spatialReference:{ wkid:4326 } })//选取的空间坐标系范围
});
var henan = new esri.layers.ArcGISTiledMapServiceLayer("http://124.200.40.4:6080/arcgis/rest/services/hnxzqh/MapServer");
//dynamicMapServiceLayer.setOpacity(0.5);//不透明度设置
map.addLayer(henan);
dojo.connect(map,"onExtentChange",showExtent);
dojo.connect(map,"onLoad",function(){
dojo.connect(map,"onMouseMove",showCoordinates);
dojo.connect(map,"onMouseDrag",showCoordinates);
});
}
function showExtent(extent){//显示地图范围(经纬度坐标)
var s="extent<br/>XMin:"+extent.xmin+"<br/>YMin:"+extent.ymin+"<br/>XMax:"+extent.xmax +"<br/>YMax:"+extent.ymax;
dojo.byId("info").innerHTML=s;
}
function showCoordinates(event){//显示坐标
var mp=event.mapPoint;
var mp2=event.screenPoint;
dojo.byId("info2").innerHTML="mapPoint"+mp.x+","+mp.y+"<br/>screenPoint"+mp2.x+","+mp2.y;
}
dojo.addOnLoad(init);
</script>
</head>
<body>
<table>
<tr>
<td><div id="map" style="width:600px; height:450px; border:1px solid #000;"></div></td>
<!-- 设置垂直对齐位置: -->
<td valign="top">
<div id="info"></div>
<div id="info2"></div>
</td>
</tr>
</table>
</body>
</html>

最新文章

  1. IOS9.0中hash值的bug与解决方案
  2. 两个list取不同值
  3. Python基础1:if条件判断 break/continue语句
  4. 当 IDENTITY_INSERT 设置为 OFF 时,不能为表‘XXX’中的标识列插入显式值。
  5. 转载-Web API 入门
  6. hdu3264Open-air shopping malls(二分)
  7. Flash AS 响应双击事件MouseEvent.DOUBLE_CLICK
  8. Linux/Unix shell 自动发送AWR report
  9. P1023 奶牛的锻炼
  10. CoreAnimation4-隐式动画和显式动画
  11. JavaScript超大整数加法
  12. nodeJS之流stream
  13. 4.2 js没有块级作用域
  14. 51 nod 1439 互质对(Moblus容斥)
  15. layui 的 GitHub 及 Gitee (码云) 仓库
  16. Android Studio 下载与安装配置
  17. 18.Mysql SQL优化
  18. 前端开发 - HTML/CSS
  19. Common Gateway Interface Python CGI编程
  20. windows-x64 php5.6+apache2.4+mysql配置

热门文章

  1. [arc076e]connected?
  2. NOIp2018模拟赛三十二
  3. input标签type为number时,输入小数,在Firefox浏览器上输入框标红的问题
  4. 找tensorboard
  5. [HAOI2009]毛毛虫(树形dp)
  6. C++虚函数与纯虚函数用法与区别
  7. shell的通俗理解
  8. Uart,IIC和SPI的区别
  9. 【codeforces 429D】Tricky Function
  10. 洛谷 P2970 [USACO09DEC]自私的放牧Selfish Grazing