代码之家  ›  专栏  ›  技术社区  ›  geoJshaun

谷歌地图平台服务器拒绝了您的请求。无效的请求。无效的“大小”参数

  •  -1
  • geoJshaun  · 技术社区  · 7 年前

    img src='https://maps.googleapis.com/maps/api/streetview?size=270x150&location=${SitusAddress}&fov=120&pitch=-5
    

    <hr><a href=https://maps.googleapis.com/maps/api/streetview?size=100%x100%&location=${SitusAddress} target='_blank'>
    

    1 回复  |  直到 7 年前
        1
  •  0
  •   geocodezip    7 年前

    您需要动态计算所需图像的大小(以像素为单位),并向API提供基于像素的大小。

    documentation 大小是必需的,以像素为单位:

    • 大小以像素为单位指定图像的输出大小。大小指定为{width}x{height}-例如,Size=600x400返回600像素宽、400像素高的图像。
    推荐文章