-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathopenlayers1.html
33 lines (32 loc) · 992 Bytes
/
openlayers1.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
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="assets/libs/ol.css" type="text/css">
<style>
.map {
height: 400px;
width: 100%;
}
</style>
<script src="assets/libs/ol.js" type="text/javascript"></script>
<title>OpenLayers 3 example</title>
</head>
<body>
<h2>My Map</h2>
<div id="map" class="map"></div>
<script type="text/javascript">
var map = new ol.Map({
target: 'map',
layers: [
//OB new ol.layer.Tile({ source: new ol.source.MapQuest({layer: 'hyb'}) }),
new ol.layer.Tile({ source: new ol.source.MapQuest({layer: 'osm'}) }),
new ol.layer.Tile({ opacity: .5, source: new ol.source.OSM() })
],
view: new ol.View2D({
center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'),
zoom: 4
})
});
</script>
</body>
</html>