Anandapriyan / google-maps-utility-library-v3

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

javascript error in MarkerClusterer Cluster.getBounds #206

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Demo link or sample code:
Discussed in the post on StackOverflow:
http://stackoverflow.com/questions/12925546/error-when-restricting-zoom-levels-u
sing-markerclusterer-in-google-maps-api-v3

Example using the trunk version of MarkerClusterer:
http://www.geocodezip.com/v3_MarkerClusterer_Spiderifier_mapA.html

What steps will reproduce the problem?
1.  Zoom in on a cluster

Expected result:
No javascript errors

Actual result:
(in Chrome)
Uncaught TypeError: Cannot read property '0' of undefined markerclusterer.js:901

Version: trunk

Original issue reported on code.google.com by geocodezip on 17 Oct 2012 at 2:22

GoogleCodeExporter commented 8 years ago
Try using MarkerClustererPlus to see if you observe the same problem.

Original comment by garylitt...@gmail.com on 3 Nov 2012 at 3:53

GoogleCodeExporter commented 8 years ago
Seems to work OK with MarkerClustererPlus:

http://www.geocodezip.com/v3_MarkerClustererPlus_Spiderifier_mapA.html

Original comment by geocodezip on 26 Nov 2012 at 12:22

GoogleCodeExporter commented 8 years ago
http://www.geocodezip.com/v3_MarkerClustererPlus_Spiderifier_mapA.html

It works in Google Chrome, but still getting error.

Cannot read property '0' of undefined
Cluster.getBounds   @   markerclusterer.js:912
ClusterIcon.triggerClusterClick @   markerclusterer.js:1064
(anonymous function)    @   markerclusterer.js:1086

Original comment by zmilosev...@gmail.com on 28 Oct 2015 at 2:53

GoogleCodeExporter commented 8 years ago
Seems to be calling the Cluster.getBounds function twice for a click on a 
cluster, once with the markers in the cluster (returning a good array) and once 
with them undefined (this.getMarkers() returns undefined).  When this happens, 
the error occurs.

Original comment by geocodezip on 29 Oct 2015 at 1:12