app.directive('map', function() {
  return {
    restrict: 'E',
    scope: {
      onCreate: '&'
    },
    link: function ($scope, $element, $attr) {
      function initialize() {

        navigator.geolocation.getCurrentPosition(function (position) {
          $scope.position = position;


          var mapOptions = {
            center: new google.maps.LatLng(position.coords.latitude, position.coords.longitude),
            zoom: 16,
            mapTypeId: google.maps.MapTypeId.ROADMAP,
            zoomControl: false,
            mapTypeControl: false,
            streetViewControl: false,
          };
          var map = new google.maps.Map($element[0], mapOptions);
          var image = {
            url: "../img/motor-bike-64.png",
          // size: new google.maps.Size(71, 71),
          // origin: new google.maps.Point(0, 0),
          // anchor: new google.maps.Point(17, 34),
          scaledSize: new google.maps.Size(37, 37)
        };

        var marker = new google.maps.Marker({
          map: map,
          position: new google.maps.LatLng(position.coords.latitude, position.coords.longitude),
          animation: google.maps.Animation.DROP,
          icon: image
        });

        $scope.onCreate({map: map});

        // Stop the side bar from dragging when mousedown/tapdown on the map
        google.maps.event.addDomListener($element[0], 'mousedown', function (e) {
          e.preventDefault();
          return false;
        });
      });
    }

    if (document.readyState === "complete") {
      initialize();
    } else {
      google.maps.event.addDomListener(window, 'load', initialize);
      }
    }
  }
});
@@ -285,17 +285,16 @@
 ition;%0A%0A
-%0A
         
@@ -605,16 +605,17 @@
      %7D;%0A
+%0A
         
@@ -943,36 +943,40 @@
 37, 37)%0A        
+  
 %7D;%0A%0A
+  
         var mark
@@ -1015,16 +1015,18 @@
         
+  
 map: map
@@ -1027,16 +1027,18 @@
 p: map,%0A
+  
         
@@ -1118,32 +1118,34 @@
 rds.longitude),%0A
+  
           animat
@@ -1187,16 +1187,18 @@
         
+  
 icon: im
@@ -1209,21 +1209,25 @@
         
+  
 %7D);%0A%0A
+  
         
@@ -1252,24 +1252,26 @@
 ap: map%7D);%0A%0A
+  
         // S
@@ -1339,24 +1339,26 @@
 map%0A        
+ 
+ 
 google.maps.
@@ -1429,16 +1429,18 @@
         
+  
 e.preven
@@ -1461,16 +1461,18 @@
         
+  
 return f
@@ -1481,28 +1481,32 @@
 se;%0A        
+ 
+ 
 %7D);%0A
+  
       %7D);%0A  
@@ -1511,11 +1511,15 @@
     
+ 
+ 
 %7D%0A%0A
+  
     
@@ -1566,16 +1566,18 @@
 %7B%0A      
+  
 initiali
@@ -1586,16 +1586,18 @@
 ();%0A    
+  
 %7D else %7B
@@ -1597,16 +1597,18 @@
  else %7B%0A
+  
       go

fix indentation and formatting