]> git.uio.no Git - u/erikhf/frm.git/blobdiff - src/components/map/map.ts
[showdetails]merged master itno showdetails
[u/erikhf/frm.git] / src / components / map / map.ts
index b69817dc77a47496eb54bae95f44a2ff2d020130..e38c770b3452a721f1547c8e2f1173df919654ef 100644 (file)
@@ -13,6 +13,7 @@ import {Headers, Http} from 'angular2/http';
 export class Map {
 
     hideModal: any;
+    expandModal:any;
     map:Object;
     http:Http;
     LEVEL:number;
@@ -36,6 +37,8 @@ export class Map {
         this.uprunned = false;
         // this.COLORS = {'red','brown',',yellow','green',',pink','purple','gray','black'};
         this.hideModal = document.getElementById("divModal").style.visibility = "hidden";
+        this.expandModal = document.getElementById("expandModal").style.visibility = "hidden";
+
     }
 
     showModal(){
@@ -48,6 +51,15 @@ export class Map {
 
     }
 
+    showExpandModal(){
+        return this.hideModal = document.getElementById("expandModal").style.visibility = "visible";
+    }
+
+    closeExpandModal(){
+        return this.hideModal = document.getElementById("expandModal").style.visibility = "hidden";
+
+    }
+
     getMap() {
         return this.map;
     }
@@ -212,15 +224,7 @@ export class Map {
                 if (instance.runned == false && instance.LEVEL < 4) {
                     instance.setRunned(true);
 
-                    let infowindow = new google.maps.InfoWindow({
-                        //TODO: Style this
-                        content: '<div> <button >DrillUP</button>' +
-                        ' <button ">DrillDOWN</button>' +
-                        '<button ">SEEINFO</button></div>'
-                    });
-
-                    infowindow.setPosition(event.latlng);
-                    // infowindow.open(instance.map);
+                    instance.showExpandModal();
 
                     let id = event.feature.O.id;
                     instance.setParent(id);
@@ -253,7 +257,6 @@ export class Map {
                     marker.setMap(instance.map);
                     instance.showModal();
 
-
                     instance.addUnit();
 
                 }