Custom marker icons get blurry Retina when using V.3.7

2,202 views
Skip to first unread message

andkjaer

unread,
Feb 9, 2012, 9:54:20 AM2/9/12
to Google Maps JavaScript API v3
Hi,
When adding custom marker icons to the map, they get blurry in version
3.7 - when showing on Retina.
It work's in version 3.6

var image = new google.maps.MarkerImage("hat.png", null, null, null,
new google.maps.Size(20,30));
var shadow = new google.maps.MarkerImage("shadow.png", null, null,
null, new google.maps.Size(20,30));

Icons are double size: 40 x 60 px

Thanks...

Marcelo

unread,
Feb 9, 2012, 11:38:57 AM2/9/12
to Google Maps JavaScript API v3
Errrr ..... was there a question?

...and what is "Retina"?

--
Marcelo - http://maps.forum.nu
--

Andrew Leach

unread,
Feb 9, 2012, 12:02:33 PM2/9/12
to google-map...@googlegroups.com
On 9 February 2012 16:38, Marcelo <marce...@hotmail.com> wrote:
>
> ...and what is "Retina"?

Probably http://www.apple.com/iphone/features/retina-display.html

The issue is something to do with the double-resolution on iPhone 4S, I expect.

Marcelo

unread,
Feb 9, 2012, 12:13:17 PM2/9/12
to Google Maps JavaScript API v3
On Feb 9, 9:02 am, Andrew Leach <andrew.leac...@gmail.com> wrote:
>
> Probablyhttp://www.apple.com/iphone/features/retina-display.html
>
> The issue is something to do with the double-resolution on iPhone 4S, I expect.

Ah, I see. :-)
Well, I am loyal to my Nexus One and Android, so I wouldn't know about
Apple stuff.

Enoch Lau (Google Employee)

unread,
Feb 9, 2012, 5:56:21 PM2/9/12
to google-map...@googlegroups.com
Please post a link to a demo, and state which version of the iPhone you have.

Enoch

rob.porter

unread,
Feb 12, 2012, 8:27:57 PM2/12/12
to Google Maps JavaScript API v3
Hi Enoch,

I am seeing this too, although it's actually also helped solve a bug
we were having. My company does a lot of web-based mobile apps for BB/
Android/iOS and I started noticing that the high-resolution markers we
were using started going all fuzzy on the iPhone 4 simulator and on
the phone itself. This probably happens in the Nexus S too since it
has a fairly high resolution, though I was one of the unfortunate few
to get the bad ICS over the air update in December before it was
pulled, and I'm still waiting on an update to make the phone usable
for testing again.

While the fuzziness is a bug, it solved an issue we had that happened
when there was a lot of markers on a map -- say, over 75 or so. If the
device's specs were not top of the line, when scrolling the map the
markers would stutter and randomly appear and disappear for a couple
seconds after the user is done scrolling over a map area. This happens
on a lot of the devices, except the iPhone 4S which seems to be able
to handle it no problem. This issue went away when the markers went
all fuzzy and low-res though.

So, I'm wondering.. when you figure out what caused this bug, can you
include it as a new feature somehow? :) It'd be great for our apps if
we could just have a flag for high-res yes/no that we set based on the
number of markers on a map and the specs of the device.

Anyhow, here's a couple examples.

This one's a live app, has the issue as our live apps don't specify an
API version, so it uses the latest v3:

http://weeverapp.com/app/downtowndundas.myweeverapp.com

and here's a copy of that same app on a development server, instead
flagged for Google Maps API v=3.6

http://cephalopod.weeverapp.com/app/myweeverapp.com/downtowndundas

Click on the "map" tab when its loaded (second one has no loadscreen,
just black and takes a couple seconds)

You'll need to load it on a high-res device to see the difference -
iPhone 4 simulator should work too. What's also odd is if you do a
"bounce" animation to a marker, it goes back to high res until the
animation is ended.

Hope this helps in finding the issue!

Cheers
Rob

--
Robert Gerald Porter
CTO/Co-Founder, Weever Apps Inc
r...@weeverapps.com


On Feb 9, 5:56 pm, "Enoch Lau (Google Employee)" <enoch...@google.com>
wrote:

Enoch Lau (Google Employee)

unread,
Feb 13, 2012, 1:35:11 AM2/13/12
to google-map...@googlegroups.com
Does setting optimized: false help here?

Enoch

rob.porter

unread,
Mar 1, 2012, 9:01:29 PM3/1/12
to Google Maps JavaScript API v3
Hi again Enoch,

That did indeed work to degrade the icons back down to low res in 3.6!
Thanks!

Is there any ETA on fixing the high res icons in 3.7+?

Thanks!
Rob
CTO/Co-Founder, Weever Apps Inc
r...@weeverapps.com

On Feb 13, 1:35 am, "Enoch Lau (Google Employee)"

Enoch Lau (Google Employee)

unread,
Mar 2, 2012, 12:06:10 AM3/2/12
to google-map...@googlegroups.com
Using optimized: false should also work in 3.7+. Does it work for you?

Enoch
Reply all
Reply to author
Forward
0 new messages