How do I add a high-resolution custom marker on a static google map

喜夏-厌秋 提交于 2019-12-22 03:22:06

问题


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?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/8813143/how-do-i-add-a-high-resolution-custom-marker-on-a-static-google-map

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!