-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex-js.html
59 lines (46 loc) · 1.76 KB
/
index-js.html
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Brython Maps API</title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css">
<style type="text/css">
html, body, #map{
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
</style>
<script type="text/javascript">var dojoConfig = { parseOnLoad: true };</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/"></script>
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("esri.geometry");
dojo.ready(function(){
main_map = new esri.Map("map", {
basemap: "topo",
center: [-71.05854, 42.359686],
zoom: 10
});
dojo.connect(main_map, "onLoad", function(){
// re-center map
main_map.centerAndZoom( [ -71, 42 ], 8 )
// test creating a point, adding a marker
var sr = new esri.SpatialReference( { "wkid": 4326 } )
var pt = new esri.geometry.Point( [-71, 42], sr )
var symbol = new esri.symbol.PictureMarkerSymbol( "marker.png", 40, 40 )
var gr = new esri.Graphic( pt, symbol )
main_map.graphics.add( gr )
});
});
</script>
</head>
<body>
<div id="map">
</div>
</body>
</html>