PageRenderTime 1864ms CodeModel.GetById 255ms app.highlight 892ms RepoModel.GetById 413ms app.codeStats 4ms

/dist/angular-google-maps.js

https://github.com/Avallach160/angular-google-maps
JavaScript | 8179 lines | 5587 code | 912 blank | 1680 comment | 1246 complexity | 5b46c9cd9301c7325406bca0244ddf29 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/*! angular-google-maps 1.1.3 2014-06-18
   2 *  AngularJS directives for Google Maps
   3 *  git: https://github.com/nlaplante/angular-google-maps.git
   4 */
   5/*
   6!
   7The MIT License
   8
   9Copyright (c) 2010-2013 Google, Inc. http://angularjs.org
  10
  11Permission is hereby granted, free of charge, to any person obtaining a copy
  12of this software and associated documentation files (the "Software"), to deal
  13in the Software without restriction, including without limitation the rights
  14to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  15copies of the Software, and to permit persons to whom the Software is
  16furnished to do so, subject to the following conditions:
  17
  18The above copyright notice and this permission notice shall be included in
  19all copies or substantial portions of the Software.
  20
  21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  24AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  25LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  26OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  27THE SOFTWARE.
  28
  29angular-google-maps
  30https://github.com/nlaplante/angular-google-maps
  31
  32@authors
  33Nicolas Laplante - https://plus.google.com/108189012221374960701
  34Nicholas McCready - https://twitter.com/nmccready
  35*/
  36
  37
  38(function() {
  39  angular.module("google-maps.directives.api.utils", []);
  40
  41  angular.module("google-maps.directives.api.managers", []);
  42
  43  angular.module("google-maps.directives.api.models.child", ["google-maps.directives.api.utils"]);
  44
  45  angular.module("google-maps.directives.api.models.parent", ["google-maps.directives.api.managers", "google-maps.directives.api.models.child"]);
  46
  47  angular.module("google-maps.directives.api", ["google-maps.directives.api.models.parent"]);
  48
  49  angular.module("google-maps", ["google-maps.directives.api"]).factory("debounce", [
  50    "$timeout", function($timeout) {
  51      return function(fn) {
  52        var nthCall;
  53        nthCall = 0;
  54        return function() {
  55          var argz, later, that;
  56          that = this;
  57          argz = arguments;
  58          nthCall++;
  59          later = (function(version) {
  60            return function() {
  61              if (version === nthCall) {
  62                return fn.apply(that, argz);
  63              }
  64            };
  65          })(nthCall);
  66          return $timeout(later, 0, true);
  67        };
  68      };
  69    }
  70  ]);
  71
  72}).call(this);
  73
  74(function() {
  75  angular.element(document).ready(function() {
  76    if (!(google || (typeof google !== "undefined" && google !== null ? google.maps : void 0) || (google.maps.InfoWindow != null))) {
  77      return;
  78    }
  79    google.maps.InfoWindow.prototype._open = google.maps.InfoWindow.prototype.open;
  80    google.maps.InfoWindow.prototype._close = google.maps.InfoWindow.prototype.close;
  81    google.maps.InfoWindow.prototype._isOpen = false;
  82    google.maps.InfoWindow.prototype.open = function(map, anchor) {
  83      this._isOpen = true;
  84      this._open(map, anchor);
  85    };
  86    google.maps.InfoWindow.prototype.close = function() {
  87      this._isOpen = false;
  88      this._close();
  89    };
  90    google.maps.InfoWindow.prototype.isOpen = function(val) {
  91      if (val == null) {
  92        val = void 0;
  93      }
  94      if (val == null) {
  95        return this._isOpen;
  96      } else {
  97        return this._isOpen = val;
  98      }
  99    };
 100    /*
 101    Do the same for InfoBox
 102    TODO: Clean this up so the logic is defined once, wait until develop becomes master as this will be easier
 103    */
 104
 105    if (!window.InfoBox) {
 106      return;
 107    }
 108    window.InfoBox.prototype._open = window.InfoBox.prototype.open;
 109    window.InfoBox.prototype._close = window.InfoBox.prototype.close;
 110    window.InfoBox.prototype._isOpen = false;
 111    window.InfoBox.prototype.open = function(map, anchor) {
 112      this._isOpen = true;
 113      this._open(map, anchor);
 114    };
 115    window.InfoBox.prototype.close = function() {
 116      this._isOpen = false;
 117      this._close();
 118    };
 119    return window.InfoBox.prototype.isOpen = function(val) {
 120      if (val == null) {
 121        val = void 0;
 122      }
 123      if (val == null) {
 124        return this._isOpen;
 125      } else {
 126        return this._isOpen = val;
 127      }
 128    };
 129  });
 130
 131}).call(this);
 132
 133/*
 134    Author Nick McCready
 135    Intersection of Objects if the arrays have something in common each intersecting object will be returned
 136    in an new array.
 137*/
 138
 139
 140(function() {
 141  _.intersectionObjects = function(array1, array2, comparison) {
 142    var res,
 143      _this = this;
 144    if (comparison == null) {
 145      comparison = void 0;
 146    }
 147    res = _.map(array1, function(obj1) {
 148      return _.find(array2, function(obj2) {
 149        if (comparison != null) {
 150          return comparison(obj1, obj2);
 151        } else {
 152          return _.isEqual(obj1, obj2);
 153        }
 154      });
 155    });
 156    return _.filter(res, function(o) {
 157      return o != null;
 158    });
 159  };
 160
 161  _.containsObject = _.includeObject = function(obj, target, comparison) {
 162    var _this = this;
 163    if (comparison == null) {
 164      comparison = void 0;
 165    }
 166    if (obj === null) {
 167      return false;
 168    }
 169    return _.any(obj, function(value) {
 170      if (comparison != null) {
 171        return comparison(value, target);
 172      } else {
 173        return _.isEqual(value, target);
 174      }
 175    });
 176  };
 177
 178  _.differenceObjects = function(array1, array2, comparison) {
 179    if (comparison == null) {
 180      comparison = void 0;
 181    }
 182    return _.filter(array1, function(value) {
 183      return !_.containsObject(array2, value);
 184    });
 185  };
 186
 187  _.withoutObjects = function(array, array2) {
 188    return _.differenceObjects(array, array2);
 189  };
 190
 191  _.indexOfObject = function(array, item, comparison, isSorted) {
 192    var i, length;
 193    if (array == null) {
 194      return -1;
 195    }
 196    i = 0;
 197    length = array.length;
 198    if (isSorted) {
 199      if (typeof isSorted === "number") {
 200        i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted);
 201      } else {
 202        i = _.sortedIndex(array, item);
 203        return (array[i] === item ? i : -1);
 204      }
 205    }
 206    while (i < length) {
 207      if (comparison != null) {
 208        if (comparison(array[i], item)) {
 209          return i;
 210        }
 211      } else {
 212        if (_.isEqual(array[i], item)) {
 213          return i;
 214        }
 215      }
 216      i++;
 217    }
 218    return -1;
 219  };
 220
 221  _["extends"] = function(arrayOfObjectsToCombine) {
 222    return _.reduce(arrayOfObjectsToCombine, function(combined, toAdd) {
 223      return _.extend(combined, toAdd);
 224    }, {});
 225  };
 226
 227}).call(this);
 228
 229/*
 230    Author: Nicholas McCready & jfriend00
 231    _async handles things asynchronous-like :), to allow the UI to be free'd to do other things
 232    Code taken from http://stackoverflow.com/questions/10344498/best-way-to-iterate-over-an-array-without-blocking-the-ui
 233
 234    The design of any funcitonality of _async is to be like lodash/underscore and replicate it but call things
 235    asynchronously underneath. Each should be sufficient for most things to be derrived from.
 236
 237    TODO: Handle Object iteration like underscore and lodash as well.. not that important right now
 238*/
 239
 240
 241(function() {
 242  var async;
 243
 244  async = {
 245    each: function(array, callback, doneCallBack, pausedCallBack, chunk, index, pause) {
 246      var doChunk;
 247      if (chunk == null) {
 248        chunk = 20;
 249      }
 250      if (index == null) {
 251        index = 0;
 252      }
 253      if (pause == null) {
 254        pause = 1;
 255      }
 256      if (!pause) {
 257        throw "pause (delay) must be set from _async!";
 258        return;
 259      }
 260      if (array === void 0 || (array != null ? array.length : void 0) <= 0) {
 261        doneCallBack();
 262        return;
 263      }
 264      doChunk = function() {
 265        var cnt, i;
 266        cnt = chunk;
 267        i = index;
 268        while (cnt-- && i < (array ? array.length : i + 1)) {
 269          callback(array[i], i);
 270          ++i;
 271        }
 272        if (array) {
 273          if (i < array.length) {
 274            index = i;
 275            if (pausedCallBack != null) {
 276              pausedCallBack();
 277            }
 278            return setTimeout(doChunk, pause);
 279          } else {
 280            if (doneCallBack) {
 281              return doneCallBack();
 282            }
 283          }
 284        }
 285      };
 286      return doChunk();
 287    },
 288    map: function(objs, iterator, doneCallBack, pausedCallBack, chunk) {
 289      var results;
 290      results = [];
 291      if (objs == null) {
 292        return results;
 293      }
 294      return _async.each(objs, function(o) {
 295        return results.push(iterator(o));
 296      }, function() {
 297        return doneCallBack(results);
 298      }, pausedCallBack, chunk);
 299    }
 300  };
 301
 302  window._async = async;
 303
 304  angular.module("google-maps.directives.api.utils").factory("async", function() {
 305    return window._async;
 306  });
 307
 308}).call(this);
 309
 310(function() {
 311  var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
 312
 313  angular.module("google-maps.directives.api.utils").factory("BaseObject", function() {
 314    var BaseObject, baseObjectKeywords;
 315    baseObjectKeywords = ['extended', 'included'];
 316    BaseObject = (function() {
 317      function BaseObject() {}
 318
 319      BaseObject.extend = function(obj) {
 320        var key, value, _ref;
 321        for (key in obj) {
 322          value = obj[key];
 323          if (__indexOf.call(baseObjectKeywords, key) < 0) {
 324            this[key] = value;
 325          }
 326        }
 327        if ((_ref = obj.extended) != null) {
 328          _ref.apply(this);
 329        }
 330        return this;
 331      };
 332
 333      BaseObject.include = function(obj) {
 334        var key, value, _ref;
 335        for (key in obj) {
 336          value = obj[key];
 337          if (__indexOf.call(baseObjectKeywords, key) < 0) {
 338            this.prototype[key] = value;
 339          }
 340        }
 341        if ((_ref = obj.included) != null) {
 342          _ref.apply(this);
 343        }
 344        return this;
 345      };
 346
 347      return BaseObject;
 348
 349    })();
 350    return BaseObject;
 351  });
 352
 353}).call(this);
 354
 355/*
 356    Useful function callbacks that should be defined at later time.
 357    Mainly to be used for specs to verify creation / linking.
 358
 359    This is to lead a common design in notifying child stuff.
 360*/
 361
 362
 363(function() {
 364  angular.module("google-maps.directives.api.utils").factory("ChildEvents", function() {
 365    return {
 366      onChildCreation: function(child) {}
 367    };
 368  });
 369
 370}).call(this);
 371
 372(function() {
 373  angular.module("google-maps.directives.api.utils").service("EventsHelper", [
 374    "Logger", function($log) {
 375      return {
 376        setEvents: function(marker, scope, model) {
 377          if (angular.isDefined(scope.events) && (scope.events != null) && angular.isObject(scope.events)) {
 378            return _.compact(_.map(scope.events, function(eventHandler, eventName) {
 379              if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName])) {
 380                return google.maps.event.addListener(marker, eventName, function() {
 381                  return eventHandler.apply(scope, [marker, eventName, model, arguments]);
 382                });
 383              } else {
 384                return $log.info("MarkerEventHelper: invalid event listener " + eventName);
 385              }
 386            }));
 387          }
 388        }
 389      };
 390    }
 391  ]);
 392
 393}).call(this);
 394
 395(function() {
 396  var __hasProp = {}.hasOwnProperty,
 397    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
 398
 399  angular.module("google-maps.directives.api.utils").factory("FitHelper", [
 400    "BaseObject", "Logger", function(BaseObject, $log) {
 401      var FitHelper, _ref;
 402      return FitHelper = (function(_super) {
 403        __extends(FitHelper, _super);
 404
 405        function FitHelper() {
 406          _ref = FitHelper.__super__.constructor.apply(this, arguments);
 407          return _ref;
 408        }
 409
 410        FitHelper.prototype.fit = function(gMarkers, gMap) {
 411          var bounds, everSet,
 412            _this = this;
 413          if (gMap && gMarkers && gMarkers.length > 0) {
 414            bounds = new google.maps.LatLngBounds();
 415            everSet = false;
 416            return _async.each(gMarkers, function(gMarker) {
 417              if (gMarker) {
 418                if (!everSet) {
 419                  everSet = true;
 420                }
 421                return bounds.extend(gMarker.getPosition());
 422              }
 423            }, function() {
 424              if (everSet) {
 425                return gMap.fitBounds(bounds);
 426              }
 427            });
 428          }
 429        };
 430
 431        return FitHelper;
 432
 433      })(BaseObject);
 434    }
 435  ]);
 436
 437}).call(this);
 438
 439(function() {
 440  angular.module("google-maps.directives.api.utils").service("GmapUtil", [
 441    "Logger", "$compile", function(Logger, $compile) {
 442      var getCoords, validateCoords;
 443      getCoords = function(value) {
 444        if (Array.isArray(value) && value.length === 2) {
 445          return new google.maps.LatLng(value[1], value[0]);
 446        } else if (angular.isDefined(value.type) && value.type === "Point") {
 447          return new google.maps.LatLng(value.coordinates[1], value.coordinates[0]);
 448        } else {
 449          return new google.maps.LatLng(value.latitude, value.longitude);
 450        }
 451      };
 452      validateCoords = function(coords) {
 453        if (angular.isUndefined(coords)) {
 454          return false;
 455        }
 456        if (_.isArray(coords)) {
 457          if (coords.length === 2) {
 458            return true;
 459          }
 460        } else if ((coords != null) && (coords != null ? coords.type : void 0)) {
 461          if (coords.type === "Point" && _.isArray(coords.coordinates) && coords.coordinates.length === 2) {
 462            return true;
 463          }
 464        }
 465        if (coords && angular.isDefined((coords != null ? coords.latitude : void 0) && angular.isDefined(coords != null ? coords.longitude : void 0))) {
 466          return true;
 467        }
 468        return false;
 469      };
 470      return {
 471        getLabelPositionPoint: function(anchor) {
 472          var xPos, yPos;
 473          if (anchor === void 0) {
 474            return void 0;
 475          }
 476          anchor = /^([-\d\.]+)\s([-\d\.]+)$/.exec(anchor);
 477          xPos = parseFloat(anchor[1]);
 478          yPos = parseFloat(anchor[2]);
 479          if ((xPos != null) && (yPos != null)) {
 480            return new google.maps.Point(xPos, yPos);
 481          }
 482        },
 483        createMarkerOptions: function(coords, icon, defaults, map) {
 484          var opts;
 485          if (map == null) {
 486            map = void 0;
 487          }
 488          if (defaults == null) {
 489            defaults = {};
 490          }
 491          opts = angular.extend({}, defaults, {
 492            position: defaults.position != null ? defaults.position : getCoords(coords),
 493            icon: defaults.icon != null ? defaults.icon : icon,
 494            visible: defaults.visible != null ? defaults.visible : validateCoords(coords)
 495          });
 496          if (map != null) {
 497            opts.map = map;
 498          }
 499          return opts;
 500        },
 501        createWindowOptions: function(gMarker, scope, content, defaults) {
 502          if ((content != null) && (defaults != null) && ($compile != null)) {
 503            return angular.extend({}, defaults, {
 504              content: this.buildContent(scope, defaults, content),
 505              position: defaults.position != null ? defaults.position : angular.isObject(gMarker) ? gMarker.getPosition() : getCoords(scope.coords)
 506            });
 507          } else {
 508            if (!defaults) {
 509              Logger.error("infoWindow defaults not defined");
 510              if (!content) {
 511                return Logger.error("infoWindow content not defined");
 512              }
 513            } else {
 514              return defaults;
 515            }
 516          }
 517        },
 518        buildContent: function(scope, defaults, content) {
 519          var parsed, ret;
 520          if (defaults.content != null) {
 521            ret = defaults.content;
 522          } else {
 523            if ($compile != null) {
 524              parsed = $compile(content)(scope);
 525              if (parsed.length > 0) {
 526                ret = parsed[0];
 527              }
 528            } else {
 529              ret = content;
 530            }
 531          }
 532          return ret;
 533        },
 534        defaultDelay: 50,
 535        isTrue: function(val) {
 536          return angular.isDefined(val) && val !== null && val === true || val === "1" || val === "y" || val === "true";
 537        },
 538        isFalse: function(value) {
 539          return ['false', 'FALSE', 0, 'n', 'N', 'no', 'NO'].indexOf(value) !== -1;
 540        },
 541        getCoords: getCoords,
 542        validateCoords: validateCoords,
 543        validatePath: function(path) {
 544          var array, i, polygon, trackMaxVertices;
 545          i = 0;
 546          if (angular.isUndefined(path.type)) {
 547            if (!Array.isArray(path) || path.length < 2) {
 548              return false;
 549            }
 550            while (i < path.length) {
 551              if (!((angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) || (typeof path[i].lat === "function" && typeof path[i].lng === "function"))) {
 552                return false;
 553              }
 554              i++;
 555            }
 556            return true;
 557          } else {
 558            if (angular.isUndefined(path.coordinates)) {
 559              return false;
 560            }
 561            if (path.type === "Polygon") {
 562              if (path.coordinates[0].length < 4) {
 563                return false;
 564              }
 565              array = path.coordinates[0];
 566            } else if (path.type === "MultiPolygon") {
 567              trackMaxVertices = {
 568                max: 0,
 569                index: 0
 570              };
 571              _.forEach(path.coordinates, function(polygon, index) {
 572                if (polygon[0].length > this.max) {
 573                  this.max = polygon[0].length;
 574                  return this.index = index;
 575                }
 576              }, trackMaxVertices);
 577              polygon = path.coordinates[trackMaxVertices.index];
 578              array = polygon[0];
 579              if (array.length < 4) {
 580                return false;
 581              }
 582            } else if (path.type === "LineString") {
 583              if (path.coordinates.length < 2) {
 584                return false;
 585              }
 586              array = path.coordinates;
 587            } else {
 588              return false;
 589            }
 590            while (i < array.length) {
 591              if (array[i].length !== 2) {
 592                return false;
 593              }
 594              i++;
 595            }
 596            return true;
 597          }
 598        },
 599        convertPathPoints: function(path) {
 600          var array, i, latlng, result, trackMaxVertices;
 601          i = 0;
 602          result = new google.maps.MVCArray();
 603          if (angular.isUndefined(path.type)) {
 604            while (i < path.length) {
 605              latlng;
 606              if (angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) {
 607                latlng = new google.maps.LatLng(path[i].latitude, path[i].longitude);
 608              } else if (typeof path[i].lat === "function" && typeof path[i].lng === "function") {
 609                latlng = path[i];
 610              }
 611              result.push(latlng);
 612              i++;
 613            }
 614          } else {
 615            array;
 616            if (path.type === "Polygon") {
 617              array = path.coordinates[0];
 618            } else if (path.type === "MultiPolygon") {
 619              trackMaxVertices = {
 620                max: 0,
 621                index: 0
 622              };
 623              _.forEach(path.coordinates, function(polygon, index) {
 624                if (polygon[0].length > this.max) {
 625                  this.max = polygon[0].length;
 626                  return this.index = index;
 627                }
 628              }, trackMaxVertices);
 629              array = path.coordinates[trackMaxVertices.index][0];
 630            } else if (path.type === "LineString") {
 631              array = path.coordinates;
 632            }
 633            while (i < array.length) {
 634              result.push(new google.maps.LatLng(array[i][1], array[i][0]));
 635              i++;
 636            }
 637          }
 638          return result;
 639        },
 640        extendMapBounds: function(map, points) {
 641          var bounds, i;
 642          bounds = new google.maps.LatLngBounds();
 643          i = 0;
 644          while (i < points.length) {
 645            bounds.extend(points.getAt(i));
 646            i++;
 647          }
 648          return map.fitBounds(bounds);
 649        }
 650      };
 651    }
 652  ]);
 653
 654}).call(this);
 655
 656(function() {
 657  var __hasProp = {}.hasOwnProperty,
 658    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
 659
 660  angular.module("google-maps.directives.api.utils").factory("Linked", [
 661    "BaseObject", function(BaseObject) {
 662      var Linked;
 663      Linked = (function(_super) {
 664        __extends(Linked, _super);
 665
 666        function Linked(scope, element, attrs, ctrls) {
 667          this.scope = scope;
 668          this.element = element;
 669          this.attrs = attrs;
 670          this.ctrls = ctrls;
 671        }
 672
 673        return Linked;
 674
 675      })(BaseObject);
 676      return Linked;
 677    }
 678  ]);
 679
 680}).call(this);
 681
 682(function() {
 683  angular.module("google-maps.directives.api.utils").service("Logger", [
 684    "$log", function($log) {
 685      return {
 686        logger: $log,
 687        doLog: false,
 688        info: function(msg) {
 689          if (this.doLog) {
 690            if (this.logger != null) {
 691              return this.logger.info(msg);
 692            } else {
 693              return console.info(msg);
 694            }
 695          }
 696        },
 697        error: function(msg) {
 698          if (this.doLog) {
 699            if (this.logger != null) {
 700              return this.logger.error(msg);
 701            } else {
 702              return console.error(msg);
 703            }
 704          }
 705        },
 706        warn: function(msg) {
 707          if (this.doLog) {
 708            if (this.logger != null) {
 709              return this.logger.warn(msg);
 710            } else {
 711              return console.warn(msg);
 712            }
 713          }
 714        }
 715      };
 716    }
 717  ]);
 718
 719}).call(this);
 720
 721(function() {
 722  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
 723    __hasProp = {}.hasOwnProperty,
 724    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
 725
 726  angular.module("google-maps.directives.api.utils").factory("ModelKey", [
 727    "BaseObject", function(BaseObject) {
 728      var ModelKey;
 729      return ModelKey = (function(_super) {
 730        __extends(ModelKey, _super);
 731
 732        function ModelKey(scope) {
 733          this.scope = scope;
 734          this.setIdKey = __bind(this.setIdKey, this);
 735          this.modelKeyComparison = __bind(this.modelKeyComparison, this);
 736          ModelKey.__super__.constructor.call(this);
 737          this.defaultIdKey = "id";
 738          this.idKey = void 0;
 739        }
 740
 741        ModelKey.prototype.evalModelHandle = function(model, modelKey) {
 742          if (model === void 0) {
 743            return void 0;
 744          }
 745          if (modelKey === 'self') {
 746            return model;
 747          } else {
 748            return model[modelKey];
 749          }
 750        };
 751
 752        ModelKey.prototype.modelKeyComparison = function(model1, model2) {
 753          var scope;
 754          scope = this.scope.coords != null ? this.scope : this.parentScope;
 755          if (scope == null) {
 756            throw "No scope or parentScope set!";
 757          }
 758          return this.evalModelHandle(model1, scope.coords).latitude === this.evalModelHandle(model2, scope.coords).latitude && this.evalModelHandle(model1, scope.coords).longitude === this.evalModelHandle(model2, scope.coords).longitude;
 759        };
 760
 761        ModelKey.prototype.setIdKey = function(scope) {
 762          return this.idKey = scope.idKey != null ? scope.idKey : this.defaultIdKey;
 763        };
 764
 765        return ModelKey;
 766
 767      })(BaseObject);
 768    }
 769  ]);
 770
 771}).call(this);
 772
 773(function() {
 774  angular.module("google-maps.directives.api.utils").factory("ModelsWatcher", [
 775    "Logger", function(Logger) {
 776      return {
 777        figureOutState: function(idKey, scope, childObjects, comparison, callBack) {
 778          var adds, mappedScopeModelIds, removals,
 779            _this = this;
 780          adds = [];
 781          mappedScopeModelIds = {};
 782          removals = [];
 783          return _async.each(scope.models, function(m) {
 784            var child;
 785            if (m[idKey] != null) {
 786              mappedScopeModelIds[m[idKey]] = {};
 787              if (childObjects[m[idKey]] == null) {
 788                return adds.push(m);
 789              } else {
 790                child = childObjects[m[idKey]];
 791                if (!comparison(m, child.model)) {
 792                  adds.push(m);
 793                  return removals.push(child.model);
 794                }
 795              }
 796            } else {
 797              return Logger.error("id missing for model " + (m.toString()) + ", can not use do comparison/insertion");
 798            }
 799          }, function() {
 800            return _async.each(childObjects.values(), function(c) {
 801              var id;
 802              if (c == null) {
 803                Logger.error("child undefined in ModelsWatcher.");
 804                return;
 805              }
 806              if (c.model == null) {
 807                Logger.error("child.model undefined in ModelsWatcher.");
 808                return;
 809              }
 810              id = c.model[idKey];
 811              if (mappedScopeModelIds[id] == null) {
 812                return removals.push(c.model[idKey]);
 813              }
 814            }, function() {
 815              return callBack({
 816                adds: adds,
 817                removals: removals
 818              });
 819            });
 820          });
 821        }
 822      };
 823    }
 824  ]);
 825
 826}).call(this);
 827
 828/*
 829    Simple Object Map with a lenght property to make it easy to track length/size
 830*/
 831
 832
 833(function() {
 834  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
 835
 836  angular.module("google-maps.directives.api.utils").factory("PropMap", function() {
 837    var PropMap, propsToPop;
 838    propsToPop = ['get', 'put', 'remove', 'values', 'keys', 'length'];
 839    PropMap = (function() {
 840      function PropMap() {
 841        this.keys = __bind(this.keys, this);
 842        this.values = __bind(this.values, this);
 843        this.remove = __bind(this.remove, this);
 844        this.put = __bind(this.put, this);
 845        this.get = __bind(this.get, this);
 846        this.length = 0;
 847      }
 848
 849      PropMap.prototype.get = function(key) {
 850        return this[key];
 851      };
 852
 853      PropMap.prototype.put = function(key, value) {
 854        if (this[key] == null) {
 855          this.length++;
 856        }
 857        return this[key] = value;
 858      };
 859
 860      PropMap.prototype.remove = function(key) {
 861        delete this[key];
 862        return this.length--;
 863      };
 864
 865      PropMap.prototype.values = function() {
 866        var all, keys,
 867          _this = this;
 868        all = [];
 869        keys = _.keys(this);
 870        _.each(keys, function(value) {
 871          if (_.indexOf(propsToPop, value) === -1) {
 872            return all.push(_this[value]);
 873          }
 874        });
 875        return all;
 876      };
 877
 878      PropMap.prototype.keys = function() {
 879        var all, keys,
 880          _this = this;
 881        keys = _.keys(this);
 882        all = [];
 883        _.each(keys, function(prop) {
 884          if (_.indexOf(propsToPop, prop) === -1) {
 885            return all.push(prop);
 886          }
 887        });
 888        return all;
 889      };
 890
 891      return PropMap;
 892
 893    })();
 894    return PropMap;
 895  });
 896
 897}).call(this);
 898
 899(function() {
 900  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
 901    __hasProp = {}.hasOwnProperty,
 902    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
 903
 904  angular.module("google-maps.directives.api.managers").factory("ClustererMarkerManager", [
 905    "Logger", "FitHelper", function($log, FitHelper) {
 906      var ClustererMarkerManager;
 907      ClustererMarkerManager = (function(_super) {
 908        __extends(ClustererMarkerManager, _super);
 909
 910        function ClustererMarkerManager(gMap, opt_markers, opt_options, opt_events) {
 911          var self;
 912          this.opt_events = opt_events;
 913          this.fit = __bind(this.fit, this);
 914          this.destroy = __bind(this.destroy, this);
 915          this.clear = __bind(this.clear, this);
 916          this.draw = __bind(this.draw, this);
 917          this.removeMany = __bind(this.removeMany, this);
 918          this.remove = __bind(this.remove, this);
 919          this.addMany = __bind(this.addMany, this);
 920          this.add = __bind(this.add, this);
 921          ClustererMarkerManager.__super__.constructor.call(this);
 922          self = this;
 923          this.opt_options = opt_options;
 924          if ((opt_options != null) && opt_markers === void 0) {
 925            this.clusterer = new MarkerClusterer(gMap, void 0, opt_options);
 926          } else if ((opt_options != null) && (opt_markers != null)) {
 927            this.clusterer = new MarkerClusterer(gMap, opt_markers, opt_options);
 928          } else {
 929            this.clusterer = new MarkerClusterer(gMap);
 930          }
 931          this.attachEvents(this.opt_events, "opt_events");
 932          this.clusterer.setIgnoreHidden(true);
 933          this.noDrawOnSingleAddRemoves = true;
 934          $log.info(this);
 935        }
 936
 937        ClustererMarkerManager.prototype.add = function(gMarker) {
 938          return this.clusterer.addMarker(gMarker, this.noDrawOnSingleAddRemoves);
 939        };
 940
 941        ClustererMarkerManager.prototype.addMany = function(gMarkers) {
 942          return this.clusterer.addMarkers(gMarkers);
 943        };
 944
 945        ClustererMarkerManager.prototype.remove = function(gMarker) {
 946          return this.clusterer.removeMarker(gMarker, this.noDrawOnSingleAddRemoves);
 947        };
 948
 949        ClustererMarkerManager.prototype.removeMany = function(gMarkers) {
 950          return this.clusterer.addMarkers(gMarkers);
 951        };
 952
 953        ClustererMarkerManager.prototype.draw = function() {
 954          return this.clusterer.repaint();
 955        };
 956
 957        ClustererMarkerManager.prototype.clear = function() {
 958          this.clusterer.clearMarkers();
 959          return this.clusterer.repaint();
 960        };
 961
 962        ClustererMarkerManager.prototype.attachEvents = function(options, optionsName) {
 963          var eventHandler, eventName, _results;
 964          if (angular.isDefined(options) && (options != null) && angular.isObject(options)) {
 965            _results = [];
 966            for (eventName in options) {
 967              eventHandler = options[eventName];
 968              if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) {
 969                $log.info("" + optionsName + ": Attaching event: " + eventName + " to clusterer");
 970                _results.push(google.maps.event.addListener(this.clusterer, eventName, options[eventName]));
 971              } else {
 972                _results.push(void 0);
 973              }
 974            }
 975            return _results;
 976          }
 977        };
 978
 979        ClustererMarkerManager.prototype.clearEvents = function(options) {
 980          var eventHandler, eventName, _results;
 981          if (angular.isDefined(options) && (options != null) && angular.isObject(options)) {
 982            _results = [];
 983            for (eventName in options) {
 984              eventHandler = options[eventName];
 985              if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) {
 986                $log.info("" + optionsName + ": Clearing event: " + eventName + " to clusterer");
 987                _results.push(google.maps.event.clearListeners(this.clusterer, eventName));
 988              } else {
 989                _results.push(void 0);
 990              }
 991            }
 992            return _results;
 993          }
 994        };
 995
 996        ClustererMarkerManager.prototype.destroy = function() {
 997          this.clearEvents(this.opt_events);
 998          this.clearEvents(this.opt_internal_events);
 999          return this.clear();
1000        };
1001
1002        ClustererMarkerManager.prototype.fit = function() {
1003          return ClustererMarkerManager.__super__.fit.call(this, this.clusterer.getMarkers(), this.clusterer.getMap());
1004        };
1005
1006        return ClustererMarkerManager;
1007
1008      })(FitHelper);
1009      return ClustererMarkerManager;
1010    }
1011  ]);
1012
1013}).call(this);
1014
1015(function() {
1016  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
1017    __hasProp = {}.hasOwnProperty,
1018    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
1019
1020  angular.module("google-maps.directives.api.managers").factory("MarkerManager", [
1021    "Logger", "FitHelper", function(Logger, FitHelper) {
1022      var MarkerManager;
1023      MarkerManager = (function(_super) {
1024        __extends(MarkerManager, _super);
1025
1026        MarkerManager.include(FitHelper);
1027
1028        function MarkerManager(gMap, opt_markers, opt_options) {
1029          this.fit = __bind(this.fit, this);
1030          this.handleOptDraw = __bind(this.handleOptDraw, this);
1031          this.clear = __bind(this.clear, this);
1032          this.draw = __bind(this.draw, this);
1033          this.removeMany = __bind(this.removeMany, this);
1034          this.remove = __bind(this.remove, this);
1035          this.addMany = __bind(this.addMany, this);
1036          this.add = __bind(this.add, this);
1037          var self;
1038          MarkerManager.__super__.constructor.call(this);
1039          self = this;
1040          this.gMap = gMap;
1041          this.gMarkers = [];
1042          this.$log = Logger;
1043          this.$log.info(this);
1044        }
1045
1046        MarkerManager.prototype.add = function(gMarker, optDraw) {
1047          this.handleOptDraw(gMarker, optDraw, true);
1048          return this.gMarkers.push(gMarker);
1049        };
1050
1051        MarkerManager.prototype.addMany = function(gMarkers) {
1052          var gMarker, _i, _len, _results;
1053          _results = [];
1054          for (_i = 0, _len = gMarkers.length; _i < _len; _i++) {
1055            gMarker = gMarkers[_i];
1056            _results.push(this.add(gMarker));
1057          }
1058          return _results;
1059        };
1060
1061        MarkerManager.prototype.remove = function(gMarker, optDraw) {
1062          var index, tempIndex;
1063          this.handleOptDraw(gMarker, optDraw, false);
1064          if (!optDraw) {
1065            return;
1066          }
1067          index = void 0;
1068          if (this.gMarkers.indexOf != null) {
1069            index = this.gMarkers.indexOf(gMarker);
1070          } else {
1071            tempIndex = 0;
1072            _.find(this.gMarkers, function(marker) {
1073              tempIndex += 1;
1074              if (marker === gMarker) {
1075                index = tempIndex;
1076              }
1077            });
1078          }
1079          if (index != null) {
1080            return this.gMarkers.splice(index, 1);
1081          }
1082        };
1083
1084        MarkerManager.prototype.removeMany = function(gMarkers) {
1085          var _this = this;
1086          return this.gMarkers.forEach(function(marker) {
1087            return _this.remove(marker);
1088          });
1089        };
1090
1091        MarkerManager.prototype.draw = function() {
1092          var deletes,
1093            _this = this;
1094          deletes = [];
1095          this.gMarkers.forEach(function(gMarker) {
1096            if (!gMarker.isDrawn) {
1097              if (gMarker.doAdd) {
1098                return gMarker.setMap(_this.gMap);
1099              } else {
1100                return deletes.push(gMarker);
1101              }
1102            }
1103          });
1104          return deletes.forEach(function(gMarker) {
1105            return _this.remove(gMarker, true);
1106          });
1107        };
1108
1109        MarkerManager.prototype.clear = function() {
1110          var gMarker, _i, _len, _ref;
1111          _ref = this.gMarkers;
1112          for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1113            gMarker = _ref[_i];
1114            gMarker.setMap(null);
1115          }
1116          delete this.gMarkers;
1117          return this.gMarkers = [];
1118        };
1119
1120        MarkerManager.prototype.handleOptDraw = function(gMarker, optDraw, doAdd) {
1121          if (optDraw === true) {
1122            if (doAdd) {
1123              gMarker.setMap(this.gMap);
1124            } else {
1125              gMarker.setMap(null);
1126            }
1127            return gMarker.isDrawn = true;
1128          } else {
1129            gMarker.isDrawn = false;
1130            return gMarker.doAdd = doAdd;
1131          }
1132        };
1133
1134        MarkerManager.prototype.fit = function() {
1135          return MarkerManager.__super__.fit.call(this, this.gMarkers, this.gMap);
1136        };
1137
1138        return MarkerManager;
1139
1140      })(FitHelper);
1141      return MarkerManager;
1142    }
1143  ]);
1144
1145}).call(this);
1146
1147(function() {
1148  angular.module("google-maps").factory("array-sync", [
1149    "add-events", function(mapEvents) {
1150      return function(mapArray, scope, pathEval, pathChangedFn) {
1151        var geojsonArray, geojsonHandlers, geojsonWatcher, isSetFromScope, legacyHandlers, legacyWatcher, mapArrayListener, scopePath, watchListener;
1152        isSetFromScope = false;
1153        scopePath = scope.$eval(pathEval);
1154        if (!scope["static"]) {
1155          legacyHandlers = {
1156            set_at: function(index) {
1157              var value;
1158              if (isSetFromScope) {
1159                return;
1160              }
1161              value = mapArray.getAt(index);
1162              if (!value) {
1163                return;
1164              }
1165              if (!value.lng || !value.lat) {
1166                return scopePath[index] = value;
1167              } else {
1168                scopePath[index].latitude = value.lat();
1169                return scopePath[index].longitude = value.lng();
1170              }
1171            },
1172            insert_at: function(index) {
1173              var value;
1174              if (isSetFromScope) {
1175                return;
1176              }
1177              value = mapArray.getAt(index);
1178              if (!value) {
1179                return;
1180              }
1181              if (!value.lng || !value.lat) {
1182                return scopePath.splice(index, 0, value);
1183              } else {
1184                return scopePath.splice(index, 0, {
1185                  latitude: value.lat(),
1186                  longitude: value.lng()
1187                });
1188              }
1189            },
1190            remove_at: function(index) {
1191              if (isSetFromScope) {
1192                return;
1193              }
1194              return scopePath.splice(index, 1);
1195            }
1196          };
1197          geojsonArray;
1198          if (scopePath.type === "Polygon") {
1199            geojsonArray = scopePath.coordinates[0];
1200          } else if (scopePath.type === "LineString") {
1201            geojsonArray = scopePath.coordinates;
1202          }
1203          geojsonHandlers = {
1204            set_at: function(index) {
1205              var value;
1206              if (isSetFromScope) {
1207                return;
1208              }
1209              value = mapArray.getAt(index);
1210              if (!value) {
1211                return;
1212              }
1213              if (!value.lng || !value.lat) {
1214                return;
1215              }
1216              geojsonArray[index][1] = value.lat();
1217              return geojsonArray[index][0] = value.lng();
1218            },
1219            insert_at: function(index) {
1220              var value;
1221              if (isSetFromScope) {
1222                return;
1223              }
1224              value = mapArray.getAt(index);
1225              if (!value) {
1226                return;
1227              }
1228              if (!value.lng || !value.lat) {
1229                return;
1230              }
1231              return geojsonArray.splice(index, 0, [value.lng(), value.lat()]);
1232            },
1233            remove_at: function(index) {
1234              if (isSetFromScope) {
1235                return;
1236              }
1237              return geojsonArray.splice(index, 1);
1238            }
1239          };
1240          mapArrayListener = mapEvents(mapArray, angular.isUndefined(scopePath.type) ? legacyHandlers : geojsonHandlers);
1241        }
1242        legacyWatcher = function(newPath) {
1243          var i, l, newLength, newValue, oldArray, oldLength, oldValue;
1244          isSetFromScope = true;
1245          oldArray = mapArray;
1246          if (newPath) {
1247            i = 0;
1248            oldLength = oldArray.getLength();
1249            newLength = newPath.length;
1250            l = Math.min(oldLength, newLength);
1251            newValue = void 0;
1252            while (i < l) {
1253              oldValue = oldArray.getAt(i);
1254              newValue = newPath[i];
1255              if (typeof newValue.equals === "function") {
1256                if (!newValue.equals(oldValue)) {
1257                  oldArray.setAt(i, newValue);
1258                }
1259              } else {
1260                if ((oldValue.lat() !== newValue.latitude) || (oldValue.lng() !== newValue.longitude)) {
1261                  oldArray.setAt(i, new google.maps.LatLng(newValue.latitude, newValue.longitude));
1262                }
1263              }
1264              i++;
1265            }
1266            while (i < newLength) {
1267              newValue = newPath[i];
1268              if (typeof newValue.lat === "function" && typeof newValue.lng === "function") {
1269                oldArray.push(newValue);
1270              } else {
1271                oldArray.push(new google.maps.LatLng(newValue.latitude, newValue.longitude));
1272              }
1273              i++;
1274            }
1275            while (i < oldLength) {
1276              oldArray.pop();
1277              i++;
1278            }
1279          }
1280          return isSetFromScope = false;
1281        };
1282        geojsonWatcher = function(newPath) {
1283          var array, i, l, newLength, newValue, oldArray, oldLength, oldValue;
1284          isSetFromScope = true;
1285          oldArray = mapArray;
1286          if (newPath) {
1287            array;
1288            if (scopePath.type === "Polygon") {
1289              array = newPath.coordinates[0];
1290            } else if (scopePath.type === "LineString") {
1291              array = newPath.coordinates;
1292            }
1293            i = 0;
1294            oldLength = oldArray.getLength();
1295            newLength = array.length;
1296            l = Math.min(oldLength, newLength);
1297            newValue = void 0;
1298            while (i < l) {
1299              oldValue = oldArray.getAt(i);
1300              newValue = array[i];
1301              if ((oldValue.lat() !== newValue[1]) || (oldValue.lng() !== newValue[0])) {
1302                oldArray.setAt(i, new google.maps.LatLng(newValue[1], newValue[0]));
1303              }
1304              i++;
1305            }
1306            while (i < newLength) {
1307              newValue = array[i];
1308              oldArray.push(new google.maps.LatLng(newValue[1], newValue[0]));
1309              i++;
1310            }
1311            while (i < oldLength) {
1312              oldArray.pop();
1313              i++;
1314            }
1315          }
1316          return isSetFromScope = false;
1317        };
1318        watchListener;
1319        if (!scope["static"]) {
1320          if (angular.isUndefined(scopePath.type)) {
1321            watchListener = scope.$watchCollection(pathEval, legacyWatcher);
1322          } else {
1323            watchListener = scope.$watch(pathEval, geojsonWatcher, true);
1324          }
1325        }
1326        return function() {
1327          if (mapArrayListener) {
1328            mapArrayListener();
1329            mapArrayListener = null;
1330          }
1331          if (watchListener) {
1332            watchListener();
1333            return watchListener = null;
1334          }
1335        };
1336      };
1337    }
1338  ]);
1339
1340}).call(this);
1341
1342(function() {
1343  angular.module("google-maps").factory("add-events", [
1344    "$timeout", function($timeout) {
1345      var addEvent, addEvents;
1346      addEvent = function(target, eventName, handler) {
1347        return google.maps.event.addListener(target, eventName, function() {
1348          handler.apply(this, arguments);
1349          return $timeout((function() {}), true);
1350        });
1351      };
1352      addEvents = function(target, eventName, handler) {
1353        var remove;
1354        if (handler) {
1355          return addEvent(target, eventName, handler);
1356        }
1357        remove = [];
1358        angular.forEach(eventName, function(_handler, key) {
1359          return remove.push(addEvent(target, key, _handler));
1360        });
1361        return function() {
1362          angular.forEach(remove, function(listener) {
1363            return google.maps.event.removeListener(listener);
1364          });
1365          return remove = null;
1366        };
1367      };
1368      return addEvents;
1369    }
1370  ]);
1371
1372}).call(this);
1373
1374(function() {
1375  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
1376    __hasProp = {}.hasOwnProperty,
1377    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
1378
1379  angular.module("google-maps.directives.api.models.child").factory("MarkerLabelChildModel", [
1380    "BaseObject", "GmapUtil", function(BaseObject, GmapUtil) {
1381      var MarkerLabelChildModel;
1382      MarkerLabelChildModel = (function(_super) {
1383        __extends(MarkerLabelChildModel, _super);
1384
1385        MarkerLabelChildModel.include(GmapUtil);
1386
1387        function MarkerLabelChildModel(gMarker, opt_options) {
1388          this.destroy = __bind(this.destroy, this);
1389          this.draw = __bind(this.draw, this);
1390          this.setPosition = __bind(this.setPosition, this);
1391          this.setZIndex = __bind(this.setZIndex, this);
1392          this.setVisible = __bind(this.setVisible, this);
1393          this.setAnchor = __bind(this.setAnchor, this);
1394          this.setMandatoryStyles = __bind(this.setMandatoryStyles, this);
1395          this.setStyles = __bind(this.setStyles, this);
1396          this.setContent = __bind(this.setContent, this);
1397          this.setTitle = __bind(this.setTitle, this);
1398          this.getSharedCross = __bind(this.getSharedCross, this);
1399          var self, _ref, _ref1;
1400          MarkerLabelChildModel.__super__.constructor.call(this);
1401          self = this;
1402          this.marker = gMarker;
1403          this.marker.set("labelContent", opt_options.labelContent);
1404          this.marker.set("labelAnchor", this.getLabelPositionPoint(opt_options.labelAnchor));
1405          this.marker.set("labelClass", opt_options.labelClass || 'labels');
1406          this.marker.set("labelStyle", opt_options.labelStyle || {
1407            opacity: 100
1408          });
1409          this.marker.set("labelInBackground", opt_options.labelInBackground || false);
1410          if (!opt_options.labelVisible) {
1411            this.marker.set("labelVisible", true);
1412          }
1413          if (!opt_options.raiseOnDrag) {
1414            this.marker.set("raiseOnDrag", true);
1415          }
1416          if (!opt_options.clickable) {
1417            this.marker.set("clickable", true);
1418          }
1419          if (!opt_options.draggable) {
1420            this.marker.set("draggable", false);
1421          }
1422          if (!opt_options.optimized) {
1423            this.marker.set("optimized", false);
1424          }
1425          opt_options.crossImage = (_ref = opt_options.crossImage) != null ? _ref : document.location.protocol + "//maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png";
1426          opt_options.handCursor = (_ref1 = opt_options.handCursor) != null ? _ref1 : document.location.protocol + "//maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur";
1427          this.markerLabel = new MarkerLabel_(this.marker, opt_options.crossImage, opt_options.handCursor);
1428          this.marker.set("setMap", function(theMap) {
1429            google.maps.Marker.prototype.setMap.apply(this, arguments);
1430            return self.markerLabel.setMap(theMap);
1431          });
1432          this.marker.setMap(this.marker.getMap());
1433        }
1434
1435        MarkerLabelChildModel.prototype.getSharedCross = function(crossUrl) {
1436          return this.markerLabel.getSharedCross(crossUrl);
1437        };
1438
1439        MarkerLabelChildModel.prototype.setTitle = function() {
1440          return this.markerLabel.setTitle();
1441        };
1442
1443        MarkerLabelChildModel.prototype.setContent = function() {
1444          return this.markerLabel.setContent();
1445        };
1446
1447        MarkerLabelChildModel.prototype.setStyles = function() {
1448          return this.markerLabel.setStyles();
1449        };
1450
1451        MarkerLabelChildModel.prototype.setMandatoryStyles = function() {
1452          return this.markerLabel.setMandatoryStyles();
1453        };
1454
1455        MarkerLabelChildModel.prototype.setAnchor = function() {
1456          return this.markerLabel.setAnchor();
1457        };
1458
1459        MarkerLabelChildModel.prototype.setVisible = function() {
1460          return this.markerLabel.setVisible();
1461        };
1462
1463        MarkerLabelChildModel.prototype.setZIndex = function() {
1464          return this.markerLabel.setZIndex();
1465        };
1466
1467        MarkerLabelChildModel.prototype.setPosition = function() {
1468          return this.markerLabel.setPosition();
1469        };
1470
1471        MarkerLabelChildModel.prototype.draw = function() {
1472          return this.markerLabel.draw();
1473        };
1474
1475        MarkerLabelChildModel.prototype.destroy = function() {
1476          if ((this.markerLabel.labelDiv_.parentNode != null) && (this.markerLabel.eventDiv_.parentNode != null)) {
1477            return this.markerLabel.onRemove();
1478          }
1479        };
1480
1481        return MarkerLabelChildModel;
1482
1483      })(BaseObject);
1484      return MarkerLabelChildModel;
1485    }
1486  ]);
1487
1488}).call(this);
1489
1490(f

Large files files are truncated, but you can click here to view the full file