-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathusejson.html
76 lines (69 loc) · 2.54 KB
/
usejson.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!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, #main_map{
height: 100%;
width: 100%;
padding: 0;
margin: 0;
font-family: georgia, arial, sans-serif;
}
#overlay{
width: 20%;
position: absolute;
right: 5%;
top: 50px;
background-color: #fff;
padding: 15px;
}
</style>
<script type="text/javascript">var dojoConfig = { parseOnLoad:true };</script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/"></script>
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("esri.geometry");
var ptmaker = function(coord, sr){
return new esri.js.geometry.Point( coord, sr.js );
};
var picmaker = function(pic, w, h){
return new esri.js.symbol.PictureMarkerSymbol( pic, w, h );
};
var grmaker = function(pt, symbol){
return new esri.js.Graphic( pt, symbol );
};
var wgs84;
dojo.ready(function(){
wgs84 = new esri.SpatialReference( { wkid: 4326 } );
main_map = new esri.Map("main_map", {
basemap: "topo",
center: [-71.05854, 42.359686],
zoom: 10
});
dojo.connect(main_map, "onLoad", function(){
var s = document.createElement("script");
s.type = "text/javascript";
s.src = "brython.js?v=4";
s.onload = function(){ brython(); };
document.body.appendChild(s);
});
});
</script>
<script type="text/python" src="usejson.py?v=19"></script>
</head>
<body class="nihilo">
<div id="main_map" class="shadow" data-dojo-type="dijit.layout.ContentPane">
</div>
<div id="overlay">
<h3>Vanishing-Glass</h3>
<p>This map was made with <a href="http://brython.info">client-side Python</a>, Esri's JavaScript API, and JSON data.</p>
<p><a href="https://github.com/cityofboston/vanishing-glass/blob/gh-pages/usejson.py">Python source</a> and <a href="https://github.com/cityofboston/vanishing-glass">full project</a> on GitHub</p>
</div>
</body>
</html>