咨询谷歌地图Marker最大允许尺寸:含Retina屏幕适配实践疑问
Great question—you’re totally right that Google’s official documentation doesn’t spell out a hard maximum size limit for Markers, which is a bit of an oversight! Let’s break down what you need to know:
First off: Your current implementation is solid
Your approach to using a 44x64 (@2x) asset scaled down to 22x32 for Retina screens is exactly the right way to handle high-DPI displays. The scaledSize, origin, and anchor settings in your code are spot-on—especially anchoring to the bottom center (Point(11, 32)), which ensures the marker aligns correctly with the map coordinate it’s marking.
marker = new google.maps.Marker({ position: new google.maps.LatLng(0, 0), map: map, icon: { url: 'http://path/to/marker.png', scaledSize : new google.maps.Size(22, 32), origin: new google.maps.Point(0,0), anchor: new google.maps.Point(11, 32) } });
What’s the "practical maximum" size?
While Google doesn’t enforce a strict upper limit, there are user experience and performance guidelines to follow:
- Avoid going larger than ~100x100px (scaled size for non-Retina). For Retina, that means a 200x200px original asset scaled down to 100x100px.
- Larger markers cause tangible issues like:
- Blocking critical map content (roads, labels, other markers)
- Slowing down map rendering, especially when multiple large markers are loaded
- Disrupting the visual balance of the map—markers should complement, not overpower, the base map itself
If you need something bigger...
For custom elements that need to exceed the above guideline, consider using Custom Overlays instead of standard Markers. Overlays give you far more flexibility for larger UI elements while maintaining proper integration with the map’s pan/zoom behavior.
内容的提问来源于stack exchange,提问作者Jules Colle

