[bug 886476] Centre text in event markers

This commit is contained in:
Dale Karp 2013-07-12 11:52:56 -04:00
Родитель 9a06685534
Коммит 41767a85d2
2 изменённых файлов: 27 добавлений и 3 удалений

Просмотреть файл

@ -37,8 +37,32 @@ function ($, google, MapMaker, EventForms) {
gridSize: 20,
maxZoom: 15, // Don't cluster after this zoom level
// (clicking on a cluster goes to zoom 16)
imagePath: "/img/map/c",
imageSizes: [43, 43, 43, 43, 43]
calculator: function(markers, numStyles) {
var title = '',
index = 0,
len = markers.length,
count = len.toString();
return {
text: count,
index: (count > 9) ? 2 : 1,
title: title
};
},
styles: [
{ url: '/img/map/c1.png',
anchor: [0, 20],
fontFamily: 'Open Sans',
textSize: 10,
height: 43,
width: 43 },
{ url: '/img/map/c1.png',
anchor: [0, 17],
fontFamily: 'Open Sans',
textSize: 10,
height: 43,
width: 43 }
]
};
var omsOptions = {
keepSpiderfied: true,

Просмотреть файл

@ -279,7 +279,7 @@ ClusterIcon.prototype.useStyle = function (sums) {
this.url_ = style.url;
this.height_ = style.height;
this.width_ = style.width;
this.anchor_ = [0, 19]; // SNG style.anchor;
this.anchor_ = style.anchor || [0, 19]; // SNG style.anchor;
this.anchorIcon_ = style.anchorIcon || [parseInt(this.height_ / 2, 10), parseInt(this.width_ / 2, 10)];
this.textColor_ = style.textColor || "white"; // SNG "black";
this.textSize_ = style.textSize || 15; // SNG 11;