Bing静态地图图像类型 [英] Bing Static Map Image type

查看:174
本文介绍了Bing静态地图图像类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以知道如何确定Bing地图静态图像的输出?以前它曾经是在png,但现在它是在jpeg。我可以知道如何恢复为png格式?

May I know how to determine the output of Bing map static image? Previously it used to be in png but now it is in jpeg. May I know how to revert back to png format?

示例:使用以下链接显示图像:

Example: Display the image with the link below:

http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/space%20needle,seattle?mapLayer=TrafficFlow&mapVersion=v1&key=BingKey

图像是jpeg。如何使其成为png?谢谢。

The image is in jpeg. How to make it to png? Thanks.

推荐答案

我不认为您可以使用其他格式请求图像。

I don't think you can request the image in a different format.

http:/ /msdn.microsoft.com/en-us/library/ff701724.aspx


此URL返回一个图像的
以下格式:

This URL returns an image in one of the following formats:


  • PNG(image / png)

  • JPEG image / jpeg)

  • GIF(image / gif)

您不能指定输出格式
为地图图像。图像类型是
,基于参数,如
imagerySet。

You cannot specify the output format for the map image. The image type is chosen based on parameters such as imagerySet.

如果您真的想要一个PNG,您可以从服务器端脚本发出请求,然后以编程方式构建一个PNG文件,然后再将其提交给客户端(使用PHP的 imagepng 功能,例如)

If you really want a PNG, you could make the request from a server-side script and then construct a PNG file programmatically before serving that back to the client (using PHP's imagepng function, for example)

这篇关于Bing静态地图图像类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆