Skip to content
This repository has been archived by the owner on Dec 9, 2021. It is now read-only.

Commit

Permalink
fix: clustering map bounds (#265) 27a296c
Browse files Browse the repository at this point in the history
  • Loading branch information
googlemaps-bot committed Oct 11, 2021
1 parent 7c54109 commit 959e1b5
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 105 deletions.
98 changes: 49 additions & 49 deletions classes/default.html

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions dist/index.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -3424,14 +3424,7 @@ var MarkerClusterer = (function () {
// See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:


var mapBounds;

if (this.getMap().getZoom() > 3) {
mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), this.getMap().getBounds().getNorthEast());
} else {
mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));
}

var mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), this.getMap().getBounds().getNorthEast());
var bounds = this.getExtendedBounds(mapBounds);
var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length);

Expand Down
8 changes: 1 addition & 7 deletions dist/index.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.umd.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions interfaces/ClusterIconInfo.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!DOCTYPE html><html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>ClusterIconInfo | @googlemaps/js-markerclustererplus</title><meta name="description" content="Documentation for @googlemaps/js-markerclustererplus"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@googlemaps/js-markerclustererplus</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@googlemaps/js-markerclustererplus</a></li><li><a href="ClusterIconInfo.html">ClusterIconInfo</a></li></ul><h1>Interface ClusterIconInfo</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>description</dt><dd><p>This is an object containing general information about a cluster icon. This is
the object that a <code>calculator</code> function returns.</p>
</dd></dl></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">ClusterIconInfo</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#index" class="tsd-kind-icon">index</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#text" class="tsd-kind-icon">text</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#title" class="tsd-kind-icon">title</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#url" class="tsd-kind-icon">url</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="index" class="tsd-anchor"></a><h3>index</h3><div class="tsd-signature tsd-kind-icon">index<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/googlemaps/js-markerclustererplus/blob/332e150/src/cluster-icon.ts#L137">cluster-icon.ts:137</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</dd></dl></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">ClusterIconInfo</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#index" class="tsd-kind-icon">index</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#text" class="tsd-kind-icon">text</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#title" class="tsd-kind-icon">title</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#url" class="tsd-kind-icon">url</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="index" class="tsd-anchor"></a><h3>index</h3><div class="tsd-signature tsd-kind-icon">index<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/googlemaps/js-markerclustererplus/blob/27a296c/src/cluster-icon.ts#L137">cluster-icon.ts:137</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The index plus 1 of the element in the <code>styles</code></p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="text" class="tsd-anchor"></a><h3>text</h3><div class="tsd-signature tsd-kind-icon">text<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/googlemaps/js-markerclustererplus/blob/332e150/src/cluster-icon.ts#L133">cluster-icon.ts:133</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="text" class="tsd-anchor"></a><h3>text</h3><div class="tsd-signature tsd-kind-icon">text<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/googlemaps/js-markerclustererplus/blob/27a296c/src/cluster-icon.ts#L133">cluster-icon.ts:133</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The text of the label to be shown on the cluster icon.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="title" class="tsd-anchor"></a><h3>title</h3><div class="tsd-signature tsd-kind-icon">title<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/googlemaps/js-markerclustererplus/blob/332e150/src/cluster-icon.ts#L143">cluster-icon.ts:143</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="title" class="tsd-anchor"></a><h3>title</h3><div class="tsd-signature tsd-kind-icon">title<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/googlemaps/js-markerclustererplus/blob/27a296c/src/cluster-icon.ts#L143">cluster-icon.ts:143</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The tooltip to display when the mouse moves over the cluster icon.
If this value is <code>undefined</code> or <code>&quot;&quot;</code>, <code>title</code> is set to the
value of the <code>title</code> property passed to the MarkerClusterer.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="url" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> url</h3><div class="tsd-signature tsd-kind-icon">url<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/googlemaps/js-markerclustererplus/blob/332e150/src/cluster-icon.ts#L147">cluster-icon.ts:147</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a name="url" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> url</h3><div class="tsd-signature tsd-kind-icon">url<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/googlemaps/js-markerclustererplus/blob/27a296c/src/cluster-icon.ts#L147">cluster-icon.ts:147</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>An override for dynamic cluster icon url (if not provided, the component will use the default style icon)</p>
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="ClusterIconInfo.html" class="tsd-kind-icon">Cluster<wbr/>Icon<wbr/>Info</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#index" class="tsd-kind-icon">index</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#text" class="tsd-kind-icon">text</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#title" class="tsd-kind-icon">title</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ClusterIconInfo.html#url" class="tsd-kind-icon">url</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
Loading

0 comments on commit 959e1b5

Please sign in to comment.