vendor/assets/javascripts/map.js in flashoff-0.0.15 vs vendor/assets/javascripts/map.js in flashoff-0.0.16

- old
+ new

@@ -1,5 +1,25 @@ +(function(root, factory) { + if(typeof exports === 'object') { + module.exports = factory(); + } + else if(typeof define === 'function' && define.amd) { + define('GMaps', [], factory); + } + + root.GMaps = factory(); + +}(this, function() { + +/*! + * GMaps.js v0.4.9 + * http://hpneo.github.com/gmaps/ + * + * Copyright 2013, Gustavo Leon + * Released under the MIT License. + */ + if (!(typeof window.google === 'object' && window.google.maps)) { throw 'Google Maps API is required. Please register the following JavaScript library http://maps.google.com/maps/api/js?sensor=true.' } var extend_object = function(obj, new_obj) { @@ -388,11 +408,13 @@ var latLngs = [], markers_length = this.markers.length, i; for (i = 0; i < markers_length; i++) { - latLngs.push(this.markers[i].getPosition()); + if(typeof(this.markers[i].visible) === 'boolean' && this.markers[i].visible) { + latLngs.push(this.markers[i].getPosition()); + } } this.fitLatLngBounds(latLngs); }; @@ -1737,10 +1759,14 @@ polyline = polyline.join('|'); parameters.push('path=' + encodeURI(polyline)); } + /** Retina support **/ + var dpi = window.devicePixelRatio || 1; + parameters.push('scale=' + dpi); + parameters = parameters.join('&'); return static_root + parameters; }; GMaps.prototype.addMapType = function(mapTypeId, options) { @@ -2031,6 +2057,9 @@ return k; } } return -1; } -} +} + +return GMaps; +})); \ No newline at end of file