o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1318541826.1406531v: @value{I" class:EFI"BundledAsset; FI"id; F"%df75be43b1ab98c7e1f6e97d5ae5bc7fI"logical_path; FI"medivo/map.js; FI" pathname; FI"`/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/map.coffee; FI"content_type; FI"application/javascript; FI" mtime; FI"2011-10-13T23:34:59+02:00; FI" body; FI" (function() { window.LabListView = (function() { LabListView.prototype.el = null; LabListView.prototype.template = null; function LabListView(lab_list) { this.lab_list = lab_list; this.el = $('ul#lab_list'); this.template = Handlebars.compile($('#lab_item_template').html()); this.render(); } LabListView.prototype.render = function() { var view; view = this; view.el.empty(); return $.each(this.lab_list.labs, function(index, lab) { return view.el.append($(view.template(lab.data))); }); }; return LabListView; })(); window.MapView = (function() { function MapView(collection, center_point) { this.collection = collection; this.center_point = center_point; if (!this.collection) { throw "you need a collection to make a MapView"; } } MapView.prototype.el = $('#map_canvas'); MapView.prototype.center_point = null; MapView.prototype.center_marker = null; MapView.prototype.view = null; MapView.prototype.markerBounds = new google.maps.LatLngBounds(); MapView.prototype.markerBoundsZoomOut = 0.1; MapView.prototype.options = { mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: false }; MapView.prototype.prepareMap = function() { if (!this.view) { return this.view = new google.maps.Map(document.getElementById("map_canvas"), this.options); } }; MapView.prototype.createCenterMarker = function() { var point; if (this.center_point) { point = new google.maps.LatLng(this.center_point.lat, this.center_point.lng); this.center_marker = new google.maps.Marker({ position: point, map: this.view, title: this.center_point.title, icon: "/assets/medivo/arrow.png" }); } if (this.markerBounds && this.center_marker) { return this.markerBounds.extend(this.center_marker.position); } }; MapView.prototype.setMarkers = function(map, markerBounds) { return $.each(this.collection.labs, function(index, model) { return model.setMarker(map, markerBounds); }); }; MapView.prototype.clear = function() { this.collection.clearMarkers(); if (this.center_marker) { this.center_marker.setMap(null); this.center_marker = null; } return this.markerBounds = new google.maps.LatLngBounds(); }; MapView.prototype.render = function() { var extendPoint; this.clear(); this.prepareMap(); this.createCenterMarker(); this.setMarkers(this.view, this.markerBounds); if (this.markerBounds.getNorthEast().equals(this.markerBounds.getSouthWest())) { extendPoint = new google.maps.LatLng(this.markerBounds.getNorthEast().lat() + this.markerBoundsZoomOut, this.markerBounds.getNorthEast().lng() + this.markerBoundsZoomOut); this.markerBounds.extend(extendPoint); } return this.view.fitBounds(this.markerBounds); }; return MapView; })(); }).call(this); ; TI"asset_paths; F[I"`/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/map.coffee; FI"dependency_paths; F[{I" path; FI"`/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/map.coffee; FI" mtime; FIu: Time µå€°‹: @_zoneI" CEST; T: offseti I"hexdigest; F"%8930a2a6b37924462f9d929220b1bafeI" _version; F"%36821fa1f19faa0dcebe2dd0b27ced36