forked from alosaimii/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadamsExample.html
More file actions
135 lines (118 loc) · 4.93 KB
/
adamsExample.html
File metadata and controls
135 lines (118 loc) · 4.93 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<html>
<head>
<title>
ExtJS Layout Example
</title>
<!--<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.5/js/dojo/dijit/themes/claro/claro.css"/>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.2.1/resources/css/ext-all.css" />-->
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.io/ext-4.0.7-gpl/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/esri/dijit/css/Popup.css"/>
<style type="text/css">
html, body {
font:normal 12px verdana;
margin:0;
padding:0;
border:0 none;
overflow:hidden;
height:100%;
}
</style>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8compact"
type="text/javascript"></script>
<script type="text/javascript" charset="utf-8" src="http://cdn.sencha.io/ext-4.0.7-gpl/ext-all.js"></script>
</script>
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");
dojo.require("esri.dijit.Popup");
dojo.require("dojo.number");
var map;
Ext.onReady(function () {
var viewport = new Ext.Viewport(
{
layout: "fit",
title: "EXT JS Layout",
items: [
{
layout: "border",
items: [
{
region: "center",
title: "center",
id: "centerPanel",
listeners: {
afterrender: initDojo
}
},
{
region: "south",
height: 80,
collapsible: false,
contentEl: "footer" // this gets the content from the div named "footer"
},
{
region: "west",
title: "Left Panel",
width: 150,
split: true,
collapsible: true,
html: "Left panel content. This panel is collapsible and can be resized using the splitter",
listeners: {
collapse: resizeMap,
expand: resizeMap
}
}
]
}
]
}
);
});
function initDojo() {
dojo.addOnLoad(dojoReady);
}
function dojoReady() {
var initialExtent = new esri.geometry.Extent({ "xmin": -118.61, "ymin": 34.34, "xmax": -118.09, "ymax": 34.56, "spatialReference": { "wkid": 4326} });
var popup = new esri.dijit.Popup(null, dojo.create("div"));
var cmp = Ext.getCmp('centerPanel');
map = new esri.Map(cmp.body.dom, {
extent: esri.geometry.geographicToWebMercator(initialExtent),
infoWindow: popup
});
dojo.connect(map, 'onLoad', function (theMap) {
dojo.connect(window, 'resize', map, map.resize);
});
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(basemap);
// var template = new esri.dijit.PopupTemplate({
// title: "Geologic Outcrop",
// description:"{lithology_type} with the following metamorphic facies: {metamorphic_facies}"
// });
// var featureLayer = new esri.layers.FeatureLayer("http://sampleserver5.arcgisonline.com/ArcGIS/rest/services/Energy/Geology/MapServer/9",{
// mode:esri.layers.FeatureLayer.MODE_SNAPSHOT,
// infoTemplate:template,
// outFields:["lithology_type","metamorphic_facies"]
// });
// map.addLayer(featureLayer);
}
function resizeMap() {
map.resize();
}
</script>
</head>
<body>
<!-- use class="x-hide-display" to prevent a brief flicker of the content
-->
<div id="header">
<span>Header content goes here</span>
</div>
<div id="center" class="x-hide-display" style="z-index: 100;">
</div>
<div id="props-panel" class="x-hide-display">
</div>
<div id="footer" class="x-hide-display">
<span>Footer content goes here<span>
</div>
<div id="north" class="x-hide-display">
</div>
</body>