tomcat基本使用和超图基本jsp例子
生活随笔
收集整理的這篇文章主要介紹了
tomcat基本使用和超图基本jsp例子
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
先把JDK安裝好;
tomcat分為安裝版,解壓版;通常使用解壓版;解壓后目錄結(jié)構(gòu)如圖;
啟動tomcat的方式:進入bin目錄,雙擊批處理文件startup;
啟動好以后桌面會出現(xiàn)控制臺;
查看如圖網(wǎng)址,出現(xiàn)tomcat的貓的起始頁面;表明tomcat運行正常,JDK已經(jīng)安裝好;
新建一個jsp,實現(xiàn)加載超圖地圖的基本功能,效果如圖;
1.jsp的位置如圖;
超圖庫文件的位置如圖;
1.jsp;
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%String path = request.getContextPath(); %> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>supermap demo1</title><link href='<%=path%>/script/libs/css/bootstrap.min.css' rel='stylesheet' /> <link href='<%=path%>/script/libs/css/bootstrap-responsive.min.css' rel='stylesheet' /> <script src='<%=path%>/supermapDemo/script/supermap/libs/SuperMap.Include.js'></script><style type="text/css">body{margin: 0;overflow: hidden;background: #fff;}#map{position: relative;height: 500px;width:800px;border:1px solid #3473b7;} </style></head> <body onload="init()"> <p>today is : <%= (new java.util.Date()).toLocaleString()%> </p><div id="map"></div></body> <script type="text/javascript">var map,layer,// url="http://ip:8080/Map/181b9990-xxxx-a056-db14d1327af2/fqImage";// url="http://ip:8080/Map/181b9990-xxxx-a056-db14d1327af2/fqImgLabel";url="http://ip:8080/Map/181b9990-xxxx-a056-db14d1327af2/fqVector";urlfqvec="http://maps.xxmap.cn/Map/181b9990-xxxx-a056-db14d1327af2/fqVector";urlfqdz="http://maps.xxmap.cn/Map/181b9990-xxxx-a056-db14d1327af2/fqImage";//邊界// var bounds = new SuperMap.Bounds(xx.52 , xx.22,xxx.23 , xx.04 );//影像// var bounds = new SuperMap.Bounds(xx.28 , xx.22,xxx.5 , xx.48 );//注記var bounds = new SuperMap.Bounds(xx.28 , xx.22,xxx.5 , xx.48 );//電子地圖function init(){map = new SuperMap.Map("map",{controls:[new SuperMap.Control.Navigation() ,new SuperMap.Control.Zoom()]});layer = new SuperMap.Layer.TiledDynamicRESTLayer("World", urlfqvec, {transparent: true, cacheEnabled: true}, { dpi:95.99999999999939,maxExtent:bounds,// resolutions:[0.001,0.0005,0.0002,0.0001,0.00005,0.00002,0.00001,0.000005,0.000002,0.000001,0.0000005,0.0000002,0.0000001 ]resolutions:[0.001,0.0005,0.0002,0.0001,0.00005,0.00002,0.00001,0.000005,0.000002,0.000001,0.0000005,0.0000002,0.0000001 ]});map.addLayer(layer);map.setCenter(new SuperMap.LonLat(xx.87 , xx.87), 2);//影像// map.setCenter(new SuperMap.LonLat(xxx.01 , xx.8), 3);//影像注記// map.setCenter(new SuperMap.LonLat(xx.92756 , xx.58345), 4);//電子地圖}</script></html>?
總結(jié)
以上是生活随笔為你收集整理的tomcat基本使用和超图基本jsp例子的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Windows驱动开发-_驱动对象学习和
- 下一篇: Windows驱动开发 - 设备对象初步