text: // Generated by CoffeeScript 1.9.3
  var ICON_BLUE, ICON_GREEN, ICON_HOME, ICON_HOME_BLUE, ICON_RED, ICON_SCHOOL, ICON_SCHOOL_BLUE, ICON_SEARCH, INIT_COORDS, MAP_CENTER, RECOM_BOUNDS;
  
  ICON_WHITE = {
    url: "img/maps/whitepin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_BLUE = {
    url: "img/maps/bluepin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_RED = {
    url: "img/maps/redpin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_GREEN = {
    url: "img/maps/greenpin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_SCHOOL = {
    url: "img/maps/schoolpin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_SCHOOL_BLUE = {
    url: "img/maps/schoolpin_blue.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_HOME = {
    url: "img/maps/homepin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_HOME_BLUE = {
    url: "img/maps/homepin_blue.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_SEMI_BLACK = {
    url: "img/maps/semiblackpin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_BLACK = {
    url: "img/maps/blackpin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_YELLOW = {
    url: "img/maps/yellowpin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  ICON_SEARCH = {
    url: "img/maps/bluepin.png",
    scaledSize: new google.maps.Size(22, 40),
    origin: new google.maps.Point(0, 0)
  };
  
  INIT_COORDS = {
    lat: 55.7387,
    lng: 37.6032
  };
  
  MAP_CENTER = new google.maps.LatLng(55.7387, 37.6032);
  
  RECOM_BOUNDS = new google.maps.LatLngBounds(new google.maps.LatLng(INIT_COORDS.lat - 0.5, INIT_COORDS.lng - 0.5, new google.maps.LatLng(INIT_COORDS.lat + 0.5, INIT_COORDS.lng + 0.5)));
  
  this.newMarker = function(id, latLng, map, type, server_id) {
    if (type == null) {
      type = 'green';
    }
    return new google.maps.Marker({
      map: map,
      position: latLng,
      icon: getMarkerType(type),
      id: id,
      type: type,
      lat: latLng.lat(),
      lng: latLng.lng(),
      server_id: server_id
    });
  };
  
  this.getMarkerType = function(type) {
      switch (type) {
          case 'green': {
              return ICON_GREEN
          }
          case 'red': {
              return ICON_RED
          }
          case 'blue': {
              return ICON_BLUE
          }
          case 'white': {
              return ICON_WHITE
          }
          case 'black': {
              return ICON_BLACK
          }
          case 'semi-black': {
              return ICON_SEMI_BLACK
          }
      }
  }
  
  this.addMarker = function(map, latLng) {
    return new google.maps.Marker({
      map: map,
      position: latLng
    });
  };
  
  this.infoWindow = function(contentString) {
    return new google.maps.InfoWindow({
      content: contentString
    });
  };
  
  this.getDistance = function(latLng, callback) {
    return $.get("metro/getDistance", {
      lat: latLng.lat(),
      lng: latLng.lng()
    }, function(response) {
      return callback(response);
    }, "json");
  };
  