prasy8 / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
0 stars 0 forks source link

MarkerClusterer.getExtendedBounds not exposed in compiled js #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version: 3

Browser / Operating System: Any

Additional comments:

In the reference, 
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/d
ocs/reference.html, getExtendedBounds(bounds:google.maps.LatLngBounds) is 
documented as an exposed function.

However, it is not available in http://google-maps-utility-library-
v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js

Thanks for taking a look!

Original issue reported on code.google.com by shak...@google.com on 19 Aug 2010 at 9:04

GoogleCodeExporter commented 9 years ago
It is not intended to be exposed. Why do you need to access that function?

Original comment by lu...@google.com on 6 Oct 2010 at 12:31

GoogleCodeExporter commented 9 years ago
I have an app that displays markers on the map using markerclusterer.  Next to 
the map I have a list of only the visible markers.  When the user pans or zooms 
the map, the list updates dynamically to only show the visible markers.

I do this by listening to pan and zoom events, then updating the list according 
to which markers fit in the map bounds.  However, there is a subtle bug with 
this approach because markerclusterer uses slightly different bounds (to 
account for its grid size, I believe).  

Say I have a cluster with 2 markers.  If I weren't using clusters, one would be 
just inside the map bounds, the other just outside.  Since the extended bounds 
is slightly bigger than the map bounds, I see a cluster with "2" inside on the 
edge of the map.  I want my list in this case to also display 2 items, and to 
do this I have to consider the extended bounds in my code.

Original comment by shak...@google.com on 6 Oct 2010 at 12:50

GoogleCodeExporter commented 9 years ago
Fair enough, I'll add it to the externs section.

Original comment by lu...@google.com on 6 Oct 2010 at 11:45

GoogleCodeExporter commented 9 years ago
Great, thank you!

Original comment by shak...@google.com on 7 Oct 2010 at 12:47