Fixed map (pair programming)
authorErik Haider Forsén <erikhf@ifi.uio.no>
Thu, 12 Nov 2015 13:11:13 +0000 (14:11 +0100)
committerErik Haider Forsén <erikhf@ifi.uio.no>
Thu, 12 Nov 2015 13:11:13 +0000 (14:11 +0100)
src/components/map/map.html
src/components/map/map.ts
src/css/map.css [new file with mode: 0644]
src/index.html

index 2dc2687..ad19e7d 100644 (file)
@@ -1,3 +1 @@
-<div class="col-md-12" style="background: green; height: 200px; width: 200px;  ">
-
-</div>
\ No newline at end of file
+<div id="map"></div>
index d3e329d..b926e92 100644 (file)
@@ -1,5 +1,6 @@
 import {Component, CORE_DIRECTIVES} from 'angular2/angular2';
 
+
 @Component({
     selector: 'mou-map',
     directives: [CORE_DIRECTIVES],
@@ -8,8 +9,13 @@ import {Component, CORE_DIRECTIVES} from 'angular2/angular2';
 
 
 export class Map {
-    writeYolo() {
-        console.log("yol");
+    constructor(){
+        this.initMap();
+    }
+
+    initMap(){
+        let map = new google.maps.Map(document.getElementById("map"),
+            {center:{lat:59,lng:11},zoom:12});
     }
 
 }
diff --git a/src/css/map.css b/src/css/map.css
new file mode 100644 (file)
index 0000000..ce6d49b
--- /dev/null
@@ -0,0 +1,9 @@
+html, body {
+    height: 100%;
+    margin: 0;
+    padding: 0;
+}
+
+#map {
+    height: 1000px;
+}
\ No newline at end of file
index 9946342..c712323 100644 (file)
         var serverResponse = JSON.parse(xhReq.responseText);
         var dhisAPI = serverResponse.activities.dhis.href;
     </script>
+    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDlgw6kZAQvD8ex_md-6wb_NcnVlZWkbE4"></script>
     <script src="../node_modules/systemjs/dist/system.src.js"></script>
     <script src="../node_modules/angular2/bundles/angular2.dev.js"></script>
     <script src="../node_modules/angular2/bundles/http.dev.js"></script>
     <script src="../node_modules/angular2/bundles/router.dev.js"></script>
     <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
     <script src="../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
-    <link type="text/css" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
-
-
+    <link rel="stylesheet" type="text/css" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
+    <link rel="stylesheet" type="text/css" href="css/map.css">
 
     <script>
         System.config({