Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarkerClusterer not functioning #8

Closed
GoogleCodeExporter opened this issue Sep 29, 2015 · 7 comments
Closed

MarkerClusterer not functioning #8

GoogleCodeExporter opened this issue Sep 29, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

Demo link or sample code:
http://google-maps-utility-library-
v3.googlecode.com/svn/tags/markerclusterer/1.0/examples/advanced_example.html

What steps will reproduce the problem?
1. open the (official) demo link as provided above
2. javascript errors occur, on line 838 of markerclusterer.js

Expected result:
Clusters like in http://gmaps-samples-
v3.googlecode.com/svn/trunk/screenshots/markerclusterer.png

Actual result:
No clusters are shown at all.

Version: 1.0

Browser / Operating System:
IE8,FF3,Chrome4 / Windows XP,7

Additional comments:
In every browser tried, errors like "Uncaught
TypeError: Cannot call method 'fromLatLngToDivPixel' of undefined" are 
occuring, at line 
838 of markerclusterer.js. I hope somebody knows how to fix this.

Gerben

Original issue reported on code.google.com by gerben.meyer on 12 May 2010 at 11:44

@GoogleCodeExporter
Copy link
Author

You can resolve this by changing the line
var pos = this.projection.fromLatLngToDivPixel(latlng);
to
var pos = this.getProjection().fromLatLngToDivPixel(latlng);
in ClusterIcon.prototype.getPosFromLatLng_

... this may be due to a change in the OverlayView part of the API or 
something...

Original comment by fri...@gmail.com on 12 May 2010 at 2:33

@GoogleCodeExporter
Copy link
Author

Just to second the suggestion by friism - in the
ClusterIcon.prototype.getPosFromLatLng() function of markerclusterer.js, change 
the
"...this.projection..." line to be "...this.getProjection()...".

Apparently the projection variable was never meant to be exposed, and was taken 
away
in the release on 11th May, according to this thread:

http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/072fbd
406d9f4629

Original comment by adam.car...@gmail.com on 13 May 2010 at 8:42

@GoogleCodeExporter
Copy link
Author

sorry, typo above. The function is ClusterIcon.prototype.getPosFromLatLng_ , as
friism said.

Original comment by adam.car...@gmail.com on 13 May 2010 at 8:54

@GoogleCodeExporter
Copy link
Author

I am still getting issues in Firefox on the examples page: 
http://google-maps-utility-library-v3.googlecode.com/svn-history/r88/trunk/marke
rclusterer/examples/advanced_example.html?

firebug:
this.projection is undefined
var pos = this.projection.fromLatLngToDivPixel(latlng); 
markerclusterer.js (line 830)

I have not tried the fix mentioned in the comments yet.  If this is such an 
easy fix, why can't a committer fix it?

Original comment by theplaz....@gmail.com on 23 Jul 2010 at 9:06

@GoogleCodeExporter
Copy link
Author

I tried the fix.  Now the map is not loading - it loads the gray background, 
but nothing more, and then hangs.  I get a JS timeout in the main map API in 
Firefox, without any errors.  I've tried commenting a lot of stuff out, 
including data and markercluster so IDK - might be an unrelated bug.

I'm still having issues on the example page as well:
too much recursion
function md(a){return function(b){if(!... ("+(c[jc](" | ")+")")))));return k}}
main.js (line 16)

I am thinking I should just stick with v2....

Original comment by theplaz....@gmail.com on 23 Jul 2010 at 10:31

@GoogleCodeExporter
Copy link
Author

Ok, so the map not loading was me passing in undefined/null when setting the 
center.  (Sorry for spamming, but I did not want anyone investigating it) 

I have markercluster working in v3 now.  It does not feel faster/better - but I 
am going to set v2 up in parallel and do some benchmarks.

Original comment by theplaz....@gmail.com on 23 Jul 2010 at 12:48

@GoogleCodeExporter
Copy link
Author

This was fixed a while ago, I just forgot to check the issue tracker :)

Original comment by lu...@google.com on 31 Aug 2010 at 1:39

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant