gpt4 book ai didi

google-maps - 在谷歌静态 map 上组合多段线

转载 作者:行者123 更新时间:2023-12-04 22:09:47 26 4
gpt4 key购买 nike

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

折线 1 工作正常:

https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=400x400&path=weight:10%7Cenc:{d`pEnpypUc@_@u@Q

折线 2 工作正常:

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

最佳答案

这对我有用(分隔折线规范):

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

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

关于google-maps - 在谷歌静态 map 上组合多段线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22924790/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com