14

I'm using Google static maps (documention here) to show shops' locations, and I'm using a custom marker instead of the default.

However, this marker image appears low-resolution on high-resolution mobiles like the iPhone 4.

How do I fix it?

gpr
  • 959
  • 1
  • 10
  • 23
  • Possible duplicate of [How can I use high resolution custom markers with the scale parameter in Google's Static Maps API?](http://stackoverflow.com/questions/10336646/how-can-i-use-high-resolution-custom-markers-with-the-scale-parameter-in-google) – alnorth29 Sep 28 '16 at 08:43

2 Answers2

26

Set &markers=scale:2 in conjunction with a @2x marker icon image and the &scale=2 parameter.

I just answered this in a duplicate question here: https://stackoverflow.com/a/17130379/378638

Community
  • 1
  • 1
Hakan B.
  • 2,319
  • 23
  • 29
  • It's working if don't specify size param, but if I specify size param like size:mid, the marker becomes blurry again, thoughts? – Jun Sep 16 '14 at 06:03
1

In order to avoid the low-resolution dithering, you need to use proportionately larger custom marker images. See the example below, which references a 64x64 pushpin:

http://maps.googleapis.com/maps/api/staticmap?size=480x480&markers=icon:http://maps.google.com/mapfiles/kml/pushpin/grn-pushpin.png%7C224+West+20th+Street+NY%7C75+9th+Ave+NY%7C700+E+9th+St+NY&sensor=false

andresf
  • 2,063
  • 1
  • 11
  • 7
  • your demonstration isn't requesting "scale=2" in the url so this isn't accurate. Looks like the same push pin image is used for either and its a bit blurry in the 2x version – bitwit May 31 '12 at 14:30