通常,您需要指定要定义的中心和缩放网址参数
生成的地图的位置和缩放级别。但是,如果你
提供标记,路径或可见参数,你可以改为
Static Maps API确定正确的中心和缩放级别
隐含地,基于对这些要素的位置的评估。
如果提供两个或更多元素,Static Maps API将确定
适当的中心和缩放级别,为
包含的元素。
source
正如你在下面的照片中看到的那样,在我的情况下,我提供了标记和路径并且可见但是无论什么时候有更多的可用空间来进行更多的变焦。
带可见参数
url
没有可见参数
url
的问题:
如何使静态地图链接自动更改缩放/绑定比这更好?
检测到不需要的符号是我的错。现在工作得很好!的解决
但在某些情况下,当步骤的参数线太长时,这样
http://maps.googleapis.com/maps/api/staticmap?size=350x200&markers=size:mid|color:green|label:A|31.5997,34.81200999999999&markers=size:mid|color:red|label:B|31.50691,34.78232000000003&path=color:red|weight:2|31.599700000000002,34.81201|31.599500000000003,34.81197|31.599480000000003,34.811960000000006|31.599180000000004,34.81188|31.59916,34.811870000000006|31.598950000000002,34.81188|31.598720000000004,34.81192|31.5984,34.81199|31.597780000000004,34.81213|31.59737,34.812200000000004|31.597030000000004,34.812250000000006|31.596850000000003,34.81226|31.59645,34.81228|31.596040000000002,34.812250000000006|31.595530000000004,34.81217|31.594900000000003,34.812000000000005|31.59401,34.81172|31.593590000000003,34.81156|31.593180000000004,34.811370000000004|31.592090000000002,34.810880000000004|31.591140000000003,34.81045|31.59063,34.810230000000004|31.590000000000003,34.809960000000004|31.589340000000004,34.809670000000004|31.588910000000002,34.80948|31.588500000000003,34.80932|31.58799,34.80914|31.587540000000004,34.809000000000005|31.58706,34.80886|31.586570000000002,34.80872|31.58603,34.808580000000006|31.585510000000003,34.80847|31.584020000000002,34.808170000000004|31.582850000000004,34.807930000000006|31.5816,34.807680000000005|31.580940000000002,34.807550000000006|31.579900000000002,34.80736|31.5786,34.80709|31.57766,34.80691|31.576020000000003,34.80657|31.574960000000004,34.806360000000005|31.574270000000002,34.80622|31.573680000000003,34.806110000000004|31.573230000000002,34.806020000000004|31.573050000000002,34.80599|31.572810000000004,34.80594|31.571640000000002,34.8057|31.570470000000004,34.80547|31.570100000000004,34.80539|31.569450000000003,34.80525|31.569180000000003,34.80519|31.568270000000002,34.80498|31.5679,34.804880000000004|31.56745,34.804770000000005|31.56642,34.80451|31.56134,34.80308|31.558040000000002,34.80214|31.547030000000003,34.798930000000006|31.544200000000004,34.798120000000004|31.542270000000002,34.797470000000004|31.53995,34.79666|31.53796,34.795820000000006|31.535420000000002,34.794630000000005|31.53393,34.7939|31.532210000000003,34.79296|31.53065,34.79205|31.52821,34.79045|31.528080000000003,34.79036|31.527770000000004,34.79014|31.526820000000004,34.78947|31.525610000000004,34.788610000000006|31.52473,34.78793|31.52174,34.78553|31.520290000000003,34.784490000000005|31.51929,34.783840000000005|31.518020000000003,34.7832|31.516750000000002,34.78269|31.515560000000004,34.78229|31.51554,34.78228|31.514640000000004,34.78208|31.51443,34.78204|31.51338,34.78188|31.513050000000003,34.781850000000006|31.512190000000004,34.78177|31.511350000000004,34.78175|31.51039,34.78183|31.50953,34.78192|31.5086,34.78204|31.50691,34.782320000000006&sensor=false
任何建议?