prasy8 / google-maps-utility-library-v3

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

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
Issue 33 has been merged into this issue.

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

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Issue 34 has been merged into this issue.

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