-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex1.html
More file actions
42 lines (42 loc) · 1.76 KB
/
Copy pathex1.html
File metadata and controls
42 lines (42 loc) · 1.76 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
<!DOCTYPE html>
<html>
<head>
<link href='//ajax.googleapis.com/ajax/libs/dojo/1.9.1/dijit/themes/claro/claro.css' rel='stylesheet' type='text/css' />
<script src='//ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/dojo.js'></script>
<script src='//cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.js'></script>
<style type='text/css'>
html,body,#border,#map { margin:0; width:100%; height:100%; }
</style>
</head>
<body class='claro'>
<div id='border' data-dojo-type='dijit/layout/BorderContainer'>
<div data-dojo-type='dijit/layout/ContentPane' data-dojo-props='region:"center"'>
<div id='map'></div>
</div>
<div data-dojo-type='dijit/layout/ContentPane' data-dojo-props='region:"trailing"'>
Dojo - OL examples:
<li><a href="http://stackoverflow.com/questions/19587074/how-to-display-geographic-map-using-dojo-1-9">Example 1!</a>
</div>
</div>
<script type='text/javascript'>
require(['dojo/ready', 'dojo/parser'], function (ready, Parser) {
ready(function () {
Parser.parse().then(function () {
var map = new OpenLayers.Map({
div:'map',
displayProjection:new OpenLayers.Projection('EPSG:4326'),
projection:new OpenLayers.Projection('EPSG:900913')
});
map.addLayer(
new OpenLayers.Layer.OSM()
);
map.setCenter(
new OpenLayers.LonLat(0, 0),
2
);
});
});
});
</script>
</body>
</html>