douluolan9101 2012-05-14 20:53
浏览 52
已采纳

谷歌地图静态自定义图标

http://maps.googleapis.com/maps/api/staticmap?center=35.442797,-80.880361&zoom=12&size=512x512&maptype=roadmap&markers=icon:http://*****.com/images/icon-marker.png|35.442797,-80.880361&sensor=false

For some reason, I am not seeing my custom icon. Anyone have any idea why?

  • 写回答

1条回答 默认 最新

  • dta38159 2012-05-14 21:04
    关注

    Your icon is too large. From the documentation:

    The icon parameter must be specified using a URL (which should be URL-encoded). You may use any valid URL of your choosing, or a URL-shortening service such as http://bit.ly or http://tinyurl.com. Most URL-shortening services have the advantage of automatically encoding URLs. Icons are limited to sizes of 4096 pixels (64x64 for square images), and the Static Maps service allows up to five unique custom icons per request. Note that each of these unique icons may be used multiple times within the static map.

    Your image is 80x52 (4,160 pixels).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法