Permalink
Browse files

Merge pull request #250 from bjudson/master

Allow no zoom for static map request
  • Loading branch information...
hpneo committed Oct 8, 2013
2 parents 048697f + f22e28e commit 0bb79eb9bc2a207897a5c3912942afb81632af01
Showing with 2 additions and 2 deletions.
  1. +1 −1 examples/static.html
  2. +1 −1 lib/gmaps.static.js
View
@@ -36,7 +36,7 @@ <h1>GMaps.js &mdash; Static map</h1>
$('&lt;img/&gt;').attr('src', url)
.appendTo('#map');</pre>
<p>You must define a <strong>size</strong> and the <strong>latitude</strong> and <strong>longitude</strong> of the map's center.</p>
- <p><span class="label notice">Note: </span> You also can define <strong>zoom</strong> (by default is 15).</p>
+ <p><span class="label notice">Note: </span> You also can define <strong>zoom</strong> (by default is 15, unless zoom is set to false, in which case Google will set zoom based on marker positions).</p>
</div>
</div>
</body>
View
@@ -89,7 +89,7 @@ GMaps.staticMapURL = function(options){
}
parameters.push('size=' + size);
- if (!options.zoom) {
+ if (!options.zoom && options.zoom !== false) {
options.zoom = 15;
}

0 comments on commit 0bb79eb

Please sign in to comment.