-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMoveableFrameTestPage.html
More file actions
54 lines (49 loc) · 2.09 KB
/
Copy pathMoveableFrameTestPage.html
File metadata and controls
54 lines (49 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>测试</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.18//dijit/themes/tundra/tundra.css" />
<link rel="stylesheet" href="https://js.arcgis.com/3.18/esri/css/esri.css" />
<link rel="stylesheet" href="UCMapWebGIS/widgets/themes/darkangel/darkangel.css" />
<link rel="stylesheet" href="UCMapWebGIS/widgets/themes/darkangel/override.css" />
<script>
var dojoConfig = {
locale: 'en',
isDebug: true,
async: true,
packages: [{
"name": "UCMapWebGIS",
"location": location.pathname.replace(/\/[^/]+$/, "") + "/UCMapWebGIS"
}]
};
</script>
<script src="https://js.arcgis.com/3.18/"></script>
<script>
require(["dojo/parser", "dojo/_base/window", "dojo/dom-style",
"esri/map", "esri/layers/ArcGISTiledMapServiceLayer",
"UCMapWebGIS/widgets/BaseWidget", "UCMapWebGIS/widgets/MoveableWidgetFrame", "dojo/domReady!"],
function (parser, win, domStyle, Map, ArcGISTiledMapServiceLayer, _BaseWidget, MoveableWidgetFrame) {
parser.parse();
var map = new Map("mapDiv");
var agoServiceURL = "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer";
var agoLayer = new ArcGISTiledMapServiceLayer(agoServiceURL);
map.addLayer(agoLayer);
var tocWidget = new _BaseWidget();
tocWidget.setTitle("可用地图资源");
//tocWidget.setMap(map);
// tocWidget.startup();
var frame = new MoveableWidgetFrame();
frame.setWidget(tocWidget);
domStyle.set(frame.domNode, "top", "50%");
domStyle.set(frame.domNode, "left", "40%");
frame.placeAt(win.body());
frame.startup();
});
</script>
</head>
<body class="tundra">
<div id="mapDiv" style="position: relative; height: 1000px; border: 1px solid #000;">
</div>
</body>
</html>