Google maps 在Google静态地图上组合多段线

Google maps 在Google静态地图上组合多段线,google-maps,google-maps-api-3,google-static-maps,Google Maps,Google Maps Api 3,Google Static Maps,我正在尝试使用多条多段线发出静态映射请求。当我有一条多段线时,效果很好,但是当我把它们加在一起时,我没有得到预期的结果。具体来说,我试图突出显示相邻的街区 多段线1工作正常: https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=400x400&path=weight:10%7Cenc:{d`pEnpypUc@_@u@Q https://maps.googleapis.com/maps/api/stat

我正在尝试使用多条多段线发出静态映射请求。当我有一条多段线时,效果很好,但是当我把它们加在一起时,我没有得到预期的结果。具体来说,我试图突出显示相邻的街区

多段线1工作正常:

https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=400x400&path=weight:10%7Cenc:{d`pEnpypUc@_@u@Q
https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=400x400&path=weight:10%7Cenc:c``pEtjypUi@fAu@zA[j@mAzB
多段线2工作正常:

https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=400x400&path=weight:10%7Cenc:{d`pEnpypUc@_@u@Q
https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=400x400&path=weight:10%7Cenc:c``pEtjypUi@fAu@zA[j@mAzB
但综合起来,我得到了:

https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=400x400&path=weight:10%7Cenc:{d`pEnpypUc@_@u@Q%7Cc``pEtjypUi@fAu@zA[j@mAzB
这适用于我(分开多段线规范):


(需要为每条多段线添加“&path=weight:10%7Cenc:YourEncodedPolylineHere”)

要简化:需要为每条多段线添加“&path=weight:10%7Cenc:YourPolylineHere”。谢谢,在答案中添加了这一点。