SHARE
TWEET

JavaScript file of website

a guest Aug 6th, 2015 5,657 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. define("backbone/requirejs/async", [], function() {
  2.     function t(t) {
  3.         var e, r;
  4.         e = document.createElement("script"), e.type = "text/javascript", e.async = !0, e.src = t, r = document.getElementsByTagName("script")[0], r.parentNode.insertBefore(e, r)
  5.     }
  6.  
  7.     function e(t, e) {
  8.         var r = /!(.+)/,
  9.             i = t.replace(r, ""),
  10.             s = r.test(t) ? t.replace(/.+!/, "") : o;
  11.         return i += i.indexOf("?") < 0 ? "?" : "&", i + s + "=" + e
  12.     }
  13.  
  14.     function r() {
  15.         return i += 1, "__async_req_" + i + "__"
  16.     }
  17.     var o = "callback",
  18.         i = 0;
  19.     return {
  20.         load: function(o, i, s, a) {
  21.             if (a.isBuild) s(null);
  22.             else {
  23.                 var n = r();
  24.                 window[n] = s, t(e(o, n))
  25.             }
  26.         }
  27.     }
  28. }), define("backbone/helpers/maps", ["backbone/assets", "backbone/requirejs/async!https://maps.googleapis.com/maps/api/js?v=3.20&sensor=false&libraries=places,geometry&client=gme-loconsolutionsprivate"], function(t) {
  29.     var e, r, o;
  30.     return e = google.maps, o = [], r = {
  31.         mapTypeId: e.MapTypeId.ROADMAP,
  32.         minZoom: 0,
  33.         zoom: 11,
  34.         minZoom: t.Properties.map_zoom_minimum,
  35.         maxZoom: t.Properties.map_zoom_maximum,
  36.         streetViewControl: !1,
  37.         panControl: !1,
  38.         scaleControl: !1,
  39.         mapTypeControl: !1,
  40.         scaleControlOptions: {
  41.             position: e.ControlPosition.TOP_RIGHT
  42.         },
  43.         disableDefaultUI: !0,
  44.         mapTypeControlOptions: {
  45.             mapTypeIds: ["coordinate", e.MapTypeId.ROADMAP, e.MapTypeId.HYBRID],
  46.             style: e.MapTypeControlStyle.DROPDOWN_MENU,
  47.             position: e.ControlPosition.TOP_RIGHT
  48.         },
  49.         styles: o
  50.     }, t.create_map = function(i, s, a) {
  51.         var n, p;
  52.         return null == i && (i = !1), null == a && (a = !1), a || $("#map-div").length ? n = a ? a[0] : $("#map-div")[0] : (t.map = null, p = '<div class="map-view unselectable"><div id="map-div"></div></div>', $("#main-content").append(p), n = $("#map-div")[0]), !t.map || i ? (e.visualRefresh = !0, s && (r.center = s), r.center = new e.LatLng(19.114274, 72.88351999999998), r.styles = o, t.map = new e.Map(n, r), t.map.setMapTypeId(e.MapTypeId.ROADMAP)) : e.event.trigger(t.map, "resize"), t.event.on("changed:selected_service", function(r) {
  53.             return t.map && null != r && (t.Util.is_service("rent") || t.Util.is_service("buy") || t.Util.is_service("pg") || t.Util.is_service("serviced-apartments")) ? (t.map.setMapTypeId(e.MapTypeId.ROADMAP), t.map.setOptions({
  54.                 styles: o
  55.             }), t.map.setOptions({
  56.                 maxZoom: t.Properties.map_zoom_maximum
  57.             })) : void 0
  58.         })
  59.     }, t.create_dedicated_map = function(i, s, a, n, p) {
  60.         var h;
  61.         return null == s && (s = null), null == a && (a = !1), null == n && (n = !1), null == p && (p = !1), i ? (h = i && a ? i[0] : i.find("#map-div")[0], e.visualRefresh = !0, r.styles = o, s && (r.center = s), n && (r.zoomControl = !0), p && (r.scrollwheel = !1), t.dedicated_map = new e.Map(h, r), t.dedicated_map.setMapTypeId(e.MapTypeId.ROADMAP), e.event.trigger(t.dedicated_map, "resize")) : void 0
  62.     }, t.create_maps_from_array = function(r) {
  63.         var o, i, s;
  64.         for (o = 0, i = r.length; i > o; o++) s = r[o], e.visualRefresh = !0, t[s.name] = new e.Map(s.el.find("#map-div")[0], {
  65.             center: s.center,
  66.             zoom: s.zoom,
  67.             styles: s.styles,
  68.             disableDefaultUI: !0
  69.         })
  70.     }, e.Map.prototype.add_projection_helper_layer = function() {
  71.         var r;
  72.         return r = function(t) {
  73.             return this.setMap(t)
  74.         }, r.prototype = new e.OverlayView, r.prototype.draw = function() {}, r.prototype.onAdd = function() {}, r.prototype.onRemove = function() {}, this.overlay = new r(this), e.event.addListenerOnce(this, "idle", function(e) {
  75.             return function() {
  76.                 return t.projection = e.overlay.getProjection()
  77.             }
  78.         }(this))
  79.     }, e.Map.prototype.fromCoordinatesToPixel = function(t) {
  80.         var r, o, i, s, a, n, p, h, g, l;
  81.         return o = t.lat(), i = t.lng(), a = new e.Point(128, 128), l = this.getZoom(), s = 1 << l, r = Math.sin(o * (Math.PI / 180)), -.9999 > r && (r = -.9999), r > .9999 && (r = .9999), n = a.x + i * (256 / 360), p = a.y + .5 * Math.log((1 + r) / (1 - r)) * (-256 / (2 * Math.PI)), h = n * s, g = p * s, [parseInt(h), parseInt(g)]
  82.     }, e.Map.prototype.set_map_bounds = function(t) {
  83.         var e, r;
  84.         return this.fitBounds(t), r = this.getZoom(), e = this.get_point_with_offset(t.getCenter(), r), this.panTo(e)
  85.     }, e.Map.prototype.get_point_with_offset = function(t, r, o, i) {
  86.         var s, a, n, p, h, g, l, d;
  87.         return l = 0, g = $(".rent-service .info-window, .buy-service .info-window, .pg-service .info-window"), g.length && (l = g.width()), o = o ? o : l / 2, i = i ? i : 0, d = Math.pow(2, r), h = this.getProjection(), void 0 !== h ? (s = h.fromLatLngToPoint(t), p = new e.Point(o / d || 0, i / d || 0), a = new e.Point(s.x + p.x, s.y + p.y), n = this.getProjection().fromPointToLatLng(a)) : t
  88.     }, e.Map.prototype.set_map_center = function(t, r, o) {
  89.         var i, s, a, n;
  90.         return null == r && (r = !1), n = this.getZoom(), s = this.getBounds(), !s || r ? (a = this.get_point_with_offset(t, n), this.panTo(a)) : (i = new e.LatLngBounds, i.extend(this.get_point_with_offset(s.getSouthWest(), n, o.left, o.bottom)), i.extend(this.get_point_with_offset(s.getNorthEast(), n, o.right, o.top)), i.contains(t) ? void 0 : (a = this.get_point_with_offset(t, n), this.panTo(a)))
  91.     }, e.Map.prototype.get_highlight_polygon = function(t, r, o, i, s, a, n) {
  92.         var p;
  93.         return null == r && (r = !0), null == o && (o = .3), null == i && (i = "#7a26e8"), null == s && (s = "#7323dc"), null == a && (a = 2), null == n && (n = 1), p = new e.Polygon({
  94.             paths: t,
  95.             strokeColor: s,
  96.             strokeOpacity: n,
  97.             strokeWeight: a,
  98.             fillColor: i,
  99.             fillOpacity: o,
  100.             visible: r
  101.         })
  102.     }, e.Map.prototype.get_polygon_bounds = function(t) {
  103.         var r;
  104.         return r = new e.LatLngBounds, t.getPath().forEach(function(t) {
  105.             return r.extend(t)
  106.         }), r
  107.     }, e.Map.prototype.getBoundsZoomLevel = function(t) {
  108.         var e, r, o, i, s, a, n, p, h, g, l;
  109.         return i = function(t) {
  110.             var e, r;
  111.             return r = Math.sin(t * Math.PI / 180), e = Math.log((1 + r) / (1 - r)) / 2, Math.max(Math.min(e, Math.PI), -Math.PI) / 2
  112.         }, l = function(t, e, r) {
  113.             return Math.floor(Math.log(t / e / r) / Math.LN2)
  114.         }, e = {
  115.             height: 256,
  116.             width: 256
  117.         }, r = 21, h = t.getNorthEast(), g = t.getSouthWest(), o = (i(h.lat()) - i(g.lat())) / Math.PI, a = h.lng() - g.lng(), n = (0 > a ? a + 360 : a) / 360, s = l($(this.getDiv()).height(), e.height, o), p = l($(this.getDiv()).width(), e.width, n), Math.min(s, p, r)
  118.     }, e.Map.prototype.getCirclePath = function(t, r, o, i) {
  119.         var s, a, n, p, h, g, l, d, c, m, y, u;
  120.         for (null == i && (i = 32), s = Math.PI / 180, d = 180 / Math.PI, a = 6371, c = r / a * d, m = c / Math.cos(t.lat() * s), h = new Array, 1 === o ? (y = 0, n = i + 1) : (y = i + 1, n = 0), l = y; 1 === o ? n > l : l > n;) u = Math.PI * (l / (i / 2)), g = t.lng() + m * Math.cos(u), p = t.lat() + c * Math.sin(u), h.push(new e.LatLng(p, g)), l += o;
  121.         return h
  122.     }, t.event.trigger("finished:init:maps"), e
  123. }), define("backbone/helpers/richmarker", ["backbone/assets", "backbone/helpers/maps"], function(t, e) {
  124.     function r(e) {
  125.         var r = e || {};
  126.         this.ready_ = !1, this.bulkAdd = r.bulkAdd || !1, this.dragging_ = !1, void 0 == r.visible && (r.visible = !0), void 0 == r.shadow && (r.shadow = "0 0 0 transparent"), void 0 == r.anchor && (r.anchor = p.BOTTOM), void 0 == r.id && (r.id = null), r.states = void 0 == r.state ? [t.MarkerStates.Normal] : [r.state], void 0 == e.axis && (e.axis = null), void 0 == e.animate && (e.animate = !1), this.setValues(e)
  127.     }
  128.     google.maps = e, r.prototype = new google.maps.OverlayView, window.RichMarker = r, r.prototype.getVisible = function() {
  129.         return this.get("visible")
  130.     }, r.prototype.getVisible = r.prototype.getVisible, r.prototype.setVisible = function(t) {
  131.         this.set("visible", t)
  132.     }, r.prototype.setVisible = r.prototype.setVisible, r.prototype.getAxis = function() {
  133.         return this.get("axis")
  134.     }, r.prototype.getAxis = r.prototype.getAxis, r.prototype.setAxis = function(t) {
  135.         this.set("axis", t)
  136.     }, r.prototype.setAxis = r.prototype.setAxis, r.prototype.removeAxis = function() {
  137.         this.set("axis", null)
  138.     }, r.prototype.removeAxis = r.prototype.removeAxis, r.prototype.visible_changed = function() {
  139.         this.ready_ && (this.markerWrapper_.style.display = this.getVisible() ? "" : "none", this.draw())
  140.     }, r.prototype.visible_changed = r.prototype.visible_changed, r.prototype.setFlat = function(t) {
  141.         this.set("flat", !!t)
  142.     }, r.prototype.setFlat = r.prototype.setFlat, r.prototype.getFlat = function() {
  143.         return this.get("flat")
  144.     }, r.prototype.getFlat = r.prototype.getFlat, r.prototype.getWidth = function() {
  145.         return this.get("width")
  146.     }, r.prototype.getWidth = r.prototype.getWidth, r.prototype.getHeight = function() {
  147.         return this.get("height")
  148.     }, r.prototype.getHeight = r.prototype.getHeight, r.prototype.setShadow = function() {}, r.prototype.setShadow = r.prototype.setShadow, r.prototype.getShadow = function() {}, r.prototype.getShadow = r.prototype.getShadow, r.prototype.flat_changed = function() {
  149.         !this.ready_
  150.     }, r.prototype.flat_changed = r.prototype.flat_changed, r.prototype.setZIndex = function(t) {
  151.         this.set("zIndex", t)
  152.     }, r.prototype.setZIndex = r.prototype.setZIndex, r.prototype.getZIndex = function() {
  153.         return this.get("zIndex")
  154.     }, r.prototype.getZIndex = r.prototype.getZIndex, r.prototype.zIndex_changed = function() {
  155.         this.getZIndex() && this.ready_ && (this.markerWrapper_.style.zIndex = this.getZIndex())
  156.     }, r.prototype.zIndex_changed = r.prototype.zIndex_changed, r.prototype.getDraggable = function() {
  157.         return this.get("draggable")
  158.     }, r.prototype.getDraggable = r.prototype.getDraggable, r.prototype.setDraggable = function(t) {
  159.         this.set("draggable", !!t)
  160.     }, r.prototype.setDraggable = r.prototype.setDraggable, r.prototype.draggable_changed = function() {
  161.         this.ready_ && (this.getDraggable() ? this.addDragging_(this.markerWrapper_) : this.removeDragListeners_())
  162.     }, r.prototype.draggable_changed = r.prototype.draggable_changed, r.prototype.getPosition = function() {
  163.         return this.get("position")
  164.     }, r.prototype.getPosition = r.prototype.getPosition, r.prototype.setPosition = function(t) {
  165.         this.set("position", t)
  166.     }, r.prototype.setPosition = r.prototype.setPosition, r.prototype.position_changed = function() {
  167.         this.draw()
  168.     }, r.prototype.position_changed = r.prototype.position_changed, r.prototype.getAnchor = function() {
  169.         return this.get("anchor")
  170.     }, r.prototype.getAnchor = r.prototype.getAnchor, r.prototype.setAnchor = function(t) {
  171.         this.set("anchor", t)
  172.     }, r.prototype.setAnchor = r.prototype.setAnchor, r.prototype.anchor_changed = function() {
  173.         this.draw()
  174.     }, r.prototype.anchor_changed = r.prototype.anchor_changed, r.prototype.htmlToDocumentFragment_ = function(t) {
  175.         var e = document.createElement("DIV");
  176.         if (e.innerHTML = t, 1 == e.childNodes.length) return e.removeChild(e.firstChild);
  177.         for (var r = document.createDocumentFragment(); e.firstChild;) r.appendChild(e.firstChild);
  178.         return r
  179.     }, r.prototype.removeChildren_ = function(t) {
  180.         if (t)
  181.             for (var e; e = t.firstChild;) t.removeChild(e)
  182.     }, r.prototype.setContent = function(t) {
  183.         this.set("content", t)
  184.     }, r.prototype.setContent = r.prototype.setContent, r.prototype.getContent = function() {
  185.         return this.get("content")
  186.     }, r.prototype.getContent = r.prototype.getContent, r.prototype.setStates_ = function() {
  187.         if (this.markerContent_) {
  188.             var t = 0,
  189.                 e = "";
  190.             for (t = 0; t < this.states.length; t++) e += " " + this.states[t].className;
  191.             this.markerContent_.className = e
  192.         }
  193.         lastState = this.states[this.states.length - 1], this.setZIndex(lastState.zIndex), lastState.size && (this.set("width", lastState.size.width), this.set("height", lastState.size.height)), this.setColor_()
  194.     }, r.prototype.addState = function(t) {
  195.         -1 == this.states.indexOf(t) && this.states.push(t), this.states = _.sortBy(this.states, function(t) {
  196.             return t.priority
  197.         }), this.setStates_(), this.draw()
  198.     }, r.prototype.addState = r.prototype.addState, r.prototype.removeState = function(t) {
  199.         -1 != this.states.indexOf(t) && (this.states = _.without(this.states, t)), this.states = _.sortBy(this.states, function(t) {
  200.             return t.priority
  201.         }), this.setStates_(), this.draw()
  202.     }, r.prototype.removeState = r.prototype.removeState, r.prototype.setColor = function(t) {
  203.         this.set("color", t), this.setColor_()
  204.     }, r.prototype.setColor = r.prototype.setColor, r.prototype.setColor_ = function() {
  205.         color = this.get("color"), lastState = this.states[this.states.length - 1], lastState.priority >= 10 && (color = null), this.markerContent_ && (arrow = this.markerContent_.getElementsByClassName("arrow")[0], color ? (this.markerContent_.style.backgroundImage = "none", this.markerContent_.style.backgroundColor = color, this.markerContent_.style.filter = 'e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"))', arrow && (arrow.style.borderTopColor = color)) : (this.markerContent_.style.cssText = "", arrow && (arrow.style.cssText = "")))
  206.     }, r.prototype.getStates = function() {
  207.         return this.get("states")
  208.     }, r.prototype.getStates = r.prototype.getStates, r.prototype.setStates = function(t) {
  209.         return this.set("states", t)
  210.     }, r.prototype.setStates = r.prototype.setStates, r.prototype.hasState = function(t) {
  211.         return -1 != this.get("states").indexOf(t)
  212.     }, r.prototype.hasState = r.prototype.hasState, r.prototype.setAnimate = function(t) {
  213.         t && this.set("animate", t), this.draw()
  214.     }, r.prototype.setAnimate = r.prototype.setAnimate, r.prototype.getAnimate = function() {
  215.         return this.animate
  216.     }, r.prototype.getAnimate = r.prototype.getAnimate, r.prototype.content_changed = function() {
  217.         if (this.markerContent_) {
  218.             this.removeChildren_(this.markerContent_);
  219.             var t = this.getContent();
  220.             if (t) {
  221.                 "string" == typeof t && (t = t.replace(/^\s*([\S\s]*)\b\s*$/, "$1"), t = this.htmlToDocumentFragment_(t)), t.title ? (this.markerContent_.title = t.title, t.title = "") : t.childNodes.length && t.childNodes[0].title && (this.markerContent_.title = t.childNodes[0].title, t.childNodes[0].title = ""), this.markerContent_.appendChild(t);
  222.                 for (var e, r = this, o = this.markerContent_.getElementsByTagName("IMG"), i = 0; e = o[i]; i++) google.maps.event.addDomListener(e, "mousedown", function(t) {
  223.                     r.getDraggable() && (t.preventDefault && t.preventDefault(), t.returnValue = !1)
  224.                 }), google.maps.event.addDomListener(e, "load", function() {
  225.                     r.draw()
  226.                 });
  227.                 google.maps.event.trigger(this, "domready")
  228.             }
  229.             this.ready_ && this.draw()
  230.         }
  231.     }, r.prototype.content_changed = r.prototype.content_changed, r.prototype.setCursor_ = function(t) {
  232.         if (this.ready_) {
  233.             var e = ""; - 1 !== navigator.userAgent.indexOf("Gecko/") ? ("dragging" == t && (e = "-moz-grabbing"), "dragready" == t && (e = "-moz-grab"), "draggable" == t && (e = "pointer")) : (("dragging" == t || "dragready" == t) && (e = "move"), "draggable" == t && (e = "pointer")), this.markerWrapper_.style.cursor != e && (this.markerWrapper_.style.cursor = e)
  234.         }
  235.     };
  236.     var o, i, s, a;
  237.     r.prototype.startDrag = function(t) {
  238.         if (this.getDraggable() && (google.maps.event.trigger(this, "before_dragstart"), !this.dragging_)) {
  239.             this.dragging_ = !0;
  240.             var e = this.getMap();
  241.             this.mapDraggable_ = e.get("draggable"), e.set("draggable", !1), o = t.clientX, i = t.clientY, this.mouseX_ = t.clientX, this.mouseY_ = t.clientY, this.setCursor_("dragready"), this.markerWrapper_.style.MozUserSelect = "none", this.markerWrapper_.style.KhtmlUserSelect = "none", this.markerWrapper_.style.WebkitUserSelect = "none", this.markerWrapper_.unselectable = "on", this.markerWrapper_.onselectstart = function() {
  242.                 return !1
  243.             }, this.addDraggingListeners_(), google.maps.event.trigger(this, "dragstart")
  244.         }
  245.     }, r.prototype.stopDrag = function() {
  246.         this.getDraggable() && this.dragging_ && (this.dragging_ = !1, this.getMap().set("draggable", this.mapDraggable_), s = this.mouseX_, a = this.mouseY_, this.mouseX_ = this.mouseY_ = this.mapDraggable_ = null, this.markerWrapper_.style.MozUserSelect = "", this.markerWrapper_.style.KhtmlUserSelect = "", this.markerWrapper_.style.WebkitUserSelect = "", this.markerWrapper_.unselectable = "off", this.markerWrapper_.onselectstart = function() {}, this.removeDraggingListeners_(), this.setCursor_("draggable"), (Math.abs(s - o) > 2 || Math.abs(a - i) > 2) && google.maps.event.trigger(this, "dragend"), this.draw())
  247.     };
  248.     var n;
  249.     r.prototype.drag = function(t) {
  250.         if (!this.getDraggable() || !this.dragging_) return void this.stopDrag();
  251.         var e = this.getAxis(),
  252.             r = this.mouseX_ - t.clientX,
  253.             o = this.mouseY_ - t.clientY;
  254.         if (this.mouseX_ = t.clientX, this.mouseY_ = t.clientY, "x" == e) var i = parseInt(this.markerWrapper_.style.top, 10),
  255.             s = parseInt(this.markerWrapper_.style.left, 10) - r;
  256.         else if ("y" == e) var i = parseInt(this.markerWrapper_.style.top, 10) - o,
  257.             s = parseInt(this.markerWrapper_.style.left, 10);
  258.         else if ("stop" == e) var i = parseInt(this.markerWrapper_.style.top, 10),
  259.             s = parseInt(this.markerWrapper_.style.left, 10);
  260.         else var i = parseInt(this.markerWrapper_.style.top, 10) - o,
  261.             s = parseInt(this.markerWrapper_.style.left, 10) - r;
  262.         this.markerWrapper_.style.left = s + "px", this.markerWrapper_.style.top = i + "px";
  263.         var a = this.getOffset_(),
  264.             p = new google.maps.Point(s - a.width, i - a.height),
  265.             h = this.getProjection();
  266.         n = h.fromDivPixelToLatLng(p), this.setPosition(h.fromDivPixelToLatLng(p)), this.setCursor_("dragging"), google.maps.event.trigger(this, "drag")
  267.     }, r.prototype.calculateDistance = function(t) {
  268.         {
  269.             var r = (this.getOffset_(), this.getProjection(), this.getPosition());
  270.             e.geometry.spherical.computeDistanceBetween(r, t)
  271.         }
  272.     }, r.prototype.calculateDistance = r.prototype.calculateDistance, r.prototype.removeDragListeners_ = function() {
  273.         this.draggableListener_ && (google.maps.event.removeListener(this.draggableListener_), delete this.draggableListener_), this.setCursor_("")
  274.     }, r.prototype.addDragging_ = function(t) {
  275.         if (t) {
  276.             var e = this;
  277.             this.draggableListener_ = google.maps.event.addDomListener(t, "mousedown", function(t) {
  278.                 e.startDrag(t)
  279.             }), this.setCursor_("draggable")
  280.         }
  281.     }, r.prototype.addDraggingListeners_ = function() {
  282.         var t = this;
  283.         this.markerWrapper_.setCapture ? (this.markerWrapper_.setCapture(!0), this.draggingListeners_ = [google.maps.event.addDomListener(this.markerWrapper_, "mousemove", function(e) {
  284.             t.drag(e)
  285.         }, !0), google.maps.event.addDomListener(this.markerWrapper_, "mouseup", function() {
  286.             t.stopDrag(), t.markerWrapper_.releaseCapture()
  287.         }, !0)]) : this.draggingListeners_ = [google.maps.event.addDomListener(window, "mousemove", function(e) {
  288.             t.drag(e)
  289.         }, !0), google.maps.event.addDomListener(window, "mouseup", function() {
  290.             t.stopDrag()
  291.         }, !0)]
  292.     }, r.prototype.removeDraggingListeners_ = function() {
  293.         if (this.draggingListeners_) {
  294.             for (var t, e = 0; t = this.draggingListeners_[e]; e++) google.maps.event.removeListener(t);
  295.             this.draggingListeners_.length = 0
  296.         }
  297.     }, r.prototype.getOffset_ = function() {
  298.         var t = this.getAnchor();
  299.         if ("object" == typeof t) return t;
  300.         var e = new google.maps.Size(0, 0);
  301.         if (!this.markerContent_) return e;
  302.         var r = this.get("width") || this.markerContent_.offsetWidth,
  303.             o = this.get("height") || this.markerContent_.offsetHeight;
  304.         switch (t) {
  305.             case p.TOP_LEFT:
  306.                 break;
  307.             case p.TOP:
  308.                 e.width = -r / 2;
  309.                 break;
  310.             case p.TOP_RIGHT:
  311.                 e.width = -r;
  312.                 break;
  313.             case p.LEFT:
  314.                 e.height = -o / 2;
  315.                 break;
  316.             case p.MIDDLE:
  317.                 e.width = -r / 2, e.height = -o / 2;
  318.                 break;
  319.             case p.RIGHT:
  320.                 e.width = -r, e.height = -o / 2;
  321.                 break;
  322.             case p.BOTTOM_LEFT:
  323.                 e.height = -o;
  324.                 break;
  325.             case p.BOTTOM:
  326.                 e.width = -r / 2, e.height = -o;
  327.                 break;
  328.             case p.BOTTOM_RIGHT:
  329.                 e.width = -r, e.height = -o
  330.         }
  331.         return e
  332.     }, r.prototype.onAdd = function() {
  333.         var e = !1;
  334.         if (this.markerWrapper_ || (this.markerWrapper_ = document.createElement("DIV"), this.markerWrapper_.style.position = "absolute", e = !0), this.markerWrapper_.style.display = this.getVisible() ? "" : "none", this.animate && (this.markerWrapper_.style.webkitTransition = this.markerWrapper_.style.MozTransition = this.markerWrapper_.style.oTransition = this.markerWrapper_.style.transition = this.animate), !this.markerContent_) {
  335.             this.markerContent_ = document.createElement("DIV"), this.markerWrapper_.appendChild(this.markerContent_);
  336.             var r = this;
  337.             google.maps.event.addDomListener(this.markerContent_, "click", function(t) {
  338.                 google.maps.event.trigger(r, "click", t)
  339.             }), google.maps.event.addDomListener(this.markerContent_, "mouseover", function() {
  340.                 google.maps.event.trigger(r, "mouseover")
  341.             }), google.maps.event.addDomListener(this.markerContent_, "mouseout", function() {
  342.                 google.maps.event.trigger(r, "mouseout")
  343.             }), $(this.markerContent_).data() && ($(this.markerContent_).data().id = this.get("id"))
  344.         }
  345.         this.ready_ = !0, this.content_changed(), this.draggable_changed(), this.setStates_();
  346.         var o = this.getPanes();
  347.         o ? this.bulkAdd && e ? t.map_fragment && (t.map_fragment.appendChild(this.markerWrapper_), t.map_pane = o.overlayMouseTarget) : o.overlayMouseTarget.appendChild(this.markerWrapper_) : (t.map_fragment.appendChild(this.markerWrapper_), t.map_pane = o.overlayMouseTarget), google.maps.event.trigger(this, "ready")
  348.     }, r.prototype.onAdd = r.prototype.onAdd, r.prototype.draw = function() {
  349.         if (this.ready_ && !this.dragging_) {
  350.             var t = this.getProjection();
  351.             if (t) {
  352.                 var e = this.get("position"),
  353.                     r = t.fromLatLngToDivPixel(e),
  354.                     o = this.getOffset_();
  355.                 $.fn.tooltip && $(this.markerContent_).tooltip("destroy").tooltip({
  356.                     container: ".map-view",
  357.                     html: !0
  358.                 }), this.markerWrapper_.style.top = r.y + o.height + "px", this.markerWrapper_.style.left = r.x + o.width + "px"
  359.             }
  360.         }
  361.     }, r.prototype.draw = r.prototype.draw, r.prototype.onRemove = function() {
  362.         this.markerWrapper_ && this.markerWrapper_.parentNode && ($.fn.tooltip && $(this.markerContent_).tooltip("destroy"), this.markerWrapper_.parentNode.removeChild(this.markerWrapper_), this.markerWrapper_.style.display = "none"), this.removeDragListeners_()
  363.     }, r.prototype.onRemove = r.prototype.onRemove;
  364.     var p = {
  365.         TOP_LEFT: 1,
  366.         TOP: 2,
  367.         TOP_RIGHT: 3,
  368.         LEFT: 4,
  369.         MIDDLE: 5,
  370.         RIGHT: 6,
  371.         BOTTOM_LEFT: 7,
  372.         BOTTOM: 8,
  373.         BOTTOM_RIGHT: 9
  374.     };
  375.     return window.RichMarkerPosition = p, r
  376. }), define("backbone/helpers/maps_util", ["backbone/helpers/maps", "backbone/assets", "backbone/helpers/richmarker"], function(t, e, r) {
  377.     return {
  378.         Maps: t,
  379.         RichMarker: r
  380.     }
  381. });
  382. //# sourceMappingURL=https://assets-sources.housingcdn.com/website/javascripts/backbone/helpers/maps_util-00436e4be7f5191baa5ce9c9372be8f2.js.map
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top