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

Setting text anchor position with opt_anchor doesn't work #17

Closed
GoogleCodeExporter opened this issue Aug 3, 2015 · 3 comments
Closed

Comments

@GoogleCodeExporter
Copy link

When trying to set the text position within the cluster markers, passing in 
positions using the opt_anchor property (see code below) does nothing; instead 
the dafult central position is always used.

var clusterStyles = [
{
    url: '/img/cluster1.png',
    width: 41,
    height: 60,
    opt_anchor: [2, 2]
},
{
    url: '/img/cluster2.png',
    width: 41,
    height: 60,
    opt_anchor: [2, 2]
},
{
    url: '/img/cluster3.png',
    width: 41,
    height: 60,
    opt_anchor: [2, 2]
}];

var clusterOptions = {
    gridSize: 40,
    maxZoom: 15,
    zoomOnClick: true,
    styles: clusterStyles
};

var clusterer = new MarkerClusterer(map, markers, clusterOptions);

This is because of a missing trailing underscore where the property is 
assigned, in markerclusterer.js at line 939:

this.anchor = style.opt_anchor;

Should be:

this.anchor_ = style.opt_anchor;



Version: 1.0

Browser / Operating System: All

Original issue reported on code.google.com by markashl...@gmail.com on 14 Jun 2010 at 10:33

@GoogleCodeExporter
Copy link
Author

Issue 33 has been merged into this issue.

Original comment by lu...@google.com on 5 Oct 2010 at 11:53

@GoogleCodeExporter
Copy link
Author

Original comment by lu...@google.com on 5 Oct 2010 at 11:53

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Issue 34 has been merged into this issue.

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

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