On Oct 2, 9:59 pm, Owen Densmore <[EMAIL PROTECTED]> wrote: > I've run into trouble with setImage() within an addListener handler. > It rescales the image to some value other than its natural width/ > height. Yet the same code works fine when called outside the > handler!! > > I made a test out of the 10 marker example: > http://backspaces.net/temp/test.html > (The original is map-markers.html on the examples link on the Google > Maps API site) > > The 10 random markers are initialized to the default marker. Then the > first marker is "selected": i.e. its image is set to > selectedmarker.png, which is a 32x32 image I got > fromhttp://www.mymapsplus.com/Markers > > Works fine. > > But then I call the code to select any marker clicked on via > addListener. These subsequent selections result in the marker being > distorted. Using firebug/firefox, it looks like the marker icon size > is 20x34! > > Any idea what's wrong here?
You have to change the image to one that has the same dimensions as the original. The "default" marker has an iconSize of (20, 34), not (32, 32) -- Larry > > -- Owen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-API?hl=en -~----------~----~----~----~------~----~------~--~---
