I have the same problem; I think the bug is here:
ClusterIcon.prototype.createCss = function (pos) {
var style = [];
if (!this.cluster_.printable_) {
style.push('background-image:url(' + this.url_ + ');');
>> style.push('background-size:' + this.width_ + 'px ' + this.height_ +
>> 'px;'); //For iPhone retina display
style.push('background-position:' + this.backgroundPosition_ +
';');
}
The code styles the background size equal to the icon size, so if
you're using a sprite the result is the entire sprite image shrunk
down to the icon size. I'm not targeting iPhone and I'm using a local
copy of markerclusterer so I just commented out the line, and the
sprite appears correctly.
- Adam
On Dec 1, 2:59 am, Daniel Halldin <[email protected]> wrote:
> I would if I could, but It's not deployed yet. I guess i'll have to stick to
> separate images for now.
>
> On Dec 1, 2011, at 11:54 AM, Pil wrote:
>
>
>
>
>
>
>
> > As Rossko pointed out: "Demo?"
>
> > If you provide a link to the patient and maybe an extra link to the
> > sprite image the chance to get help is much higher.
>
> > On Dec 1, 10:05 am, Daniel Halldin <[email protected]> wrote:
> >> I've tried backgroundPosition: "-5px -184px" too, no luck there.
>
> >> The documentation says:
> >> "backgroundPosition string The position of the cluster icon image within
> >> the image defined by url. The format is "xpos ypos" (the same format as
> >> for the CSS background-position property). You must set this property
> >> appropriately when the image defined by url represents a sprite containing
> >> multiple images. The default value is "0 0"."
>
> >> On Dec 1, 2011, at 9:58 AM, Pil wrote:
>
> >>> On Nov 30, 12:04 pm, Daniel <[email protected]> wrote:
>
> >>>> backgroundPosition: "-5 -184"
>
> >>> BTW. This seems to be invalid css anyway.
> >>> Try to start here
>
> >>>http://www.w3schools.com/cssref/pr_background-position.asp
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Google Maps JavaScript API v3" group.
> >>> To post to this group, send email to
> >>> [email protected].
> >>> To unsubscribe from this group, send email to
> >>> [email protected].
> >>> For more options, visit this group
> >>> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group
> > athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.