0

After (probably) deciding on the jQuery map plugin to use (see What jQuery map plugin allows specifying the color of the pushpins?), I now need png files of colored pushpins.

I found a dandy one here: http://www.fuzzimo.com/free-vector-post-it-notes-push-pins/ :

enter image description here

...but it appears to be, not a collection of various png files I can use (blue.png, red.png, chartreuse.png, etc.) but one humongous .png file with an array of images. So I'm guessing this is meant to be used as a sprite. Being a sprite newby, though, I don't know how to use this image and specify the section of it that I want to use.

Specifically, the jQuery code I'll be using to set the marker's icon is like:

icon: '../img/apartment.png' 

...how can I specify usage of a specific pushpin?

Community
  • 1
  • 1
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
  • I've never heard of pushpin using sprite. I'm waiting for your news. – jacouh Nov 04 '13 at 23:17
  • Neither have I; like I said, I'm a sprite newby; but there is such a file, like a poster of pushpins, so what use would it be otherwise? – B. Clay Shannon-B. Crow Raven Nov 04 '13 at 23:19
  • 1
    from [the documentation](https://developers.google.com/maps/documentation/javascript/markers#complex_icons) and [reference](https://developers.google.com/maps/documentation/javascript/reference#Icon), the google.maps.Icon definition supports sprites. – geocodezip Nov 04 '13 at 23:51
  • Okay, so how am I supposed to know at offset to use with the image above if, say, I want to use the bronze-colored tack fifth from the left in the second row? And do I need to do anything to make the black background transparent? – B. Clay Shannon-B. Crow Raven Nov 05 '13 at 00:22
  • 1
    Google for "CSS sprites" See eg http://css-tricks.com/css-sprites/ http://stackoverflow.com/questions/8050152/why-use-a-sprite-sheet-rather-than-individual-images http://coding.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/ – leonbloy Nov 05 '13 at 03:05

0 Answers0