GoogleStaticMapで日本語の地図を取得する
困ったこと
で表示されているものと
$ wget "https://maps.googleapis.com/maps/api/staticmap?center=34.71360393,135.32154121&zoom=15&size=275x191&markers=34.71360393,135.32154121&sensor=true&width=275&height=191&key=AIzaSyBAEHi7Z9UA3628IuCRr0USgFSVhjwlttk&language=jp"
で取得されるものが違う。
※http://www.ajaxtower.jp/googlestaticmaps/para/index11.html このへんの設定ができていないわけではない。
解決
リクエストヘッダーにAccept-Language: jp
を付ける。
$ wget --header="Accept-Language: ja" "https://maps.googleapis.com/maps/api/staticmap?center=34.65188449,135.0342171&zoom=15&size=275x191&markers=34.65188449,135.0342171&sensor=true&width=275&height=191&key=AIzaSyBAEHi7Z9UA3628IuCRr0USgFSVhjwlttk&language=jp"
これでOK。
Author And Source
この問題について(GoogleStaticMapで日本語の地図を取得する), 我々は、より多くの情報をここで見つけました https://qiita.com/yamadagenki/items/dd70780198979d34c8f0著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .