Save static browser image to local folder

I am using the Google Static Maps API, to construct a URL with the necessary parameters, which then displays in the browser.

https://developers.google.com/maps/documentation/staticmaps/

How can I automatically save the static map image which is displayed in the browser?

Currently, I have to right-click over image and 'Save image as...', in order to get the image into the required folder. I would like to automate this last step.

Here is a sample URL:

https://maps.googleapis.com/maps/api/staticmap?&size=600x600&maptype=roadmap&scale=1&markers=color:red|label:S|610+Beech+St+W,Whitby&markers=color:blue|label:1|43.8764737,-78.945162&markers=color:blue|label:2|43.8975446,-78.9429329&markers=color:blue|label:3|43.8828564,-78.9294267&markers=color:blue|label:4|43.8828564,-78.9294267&markers=color:blue|label:5|43.903265,-78.956063&markers=color:blue|label:6|43.8780157,-78.9590955&markers=color:blue|label:7|43.886099,-78.952875&key=AIzaSyC5FiaYcLsRwaSxOhcOzqejdN_xzCwVIJ8


This use case might be in contradiction with Google Maps API Terms of Service. Section 10.5 (d) states:

No caching or storage. You will not pre-fetch, cache, index, or store any Content to be used outside the Service, except that you may store limited amounts of Content solely for the purpose of improving the performance of your Maps API Implementation due to network latency (and not for the purpose of preventing Google from accurately tracking usage), and only if such storage:

is temporary (and in no event more than 30 calendar days);

is secure;

does not manipulate or aggregate any part of the Content or Service; and

does not modify attribution in any way.

https://developers.google.com/maps/terms#section_10_5

链接地址: http://www.djcxy.com/p/67546.html

上一篇: 如何在不使用其他libav库的情况下使用libavformat?

下一篇: 保存静态浏览器图像到本地文件夹