Pick shortest route with simpleXML -
first post bear me.
i have hacked module oscommerce figures delivery cost pizza delivery.
i used google distance matrix , got working discover picks fastest route , not shortest. , there no option tell pick shortest.
oh well.. poked arround , found use direction api instead
now have 2 routes in xml , need
- pick shortest one
- extract distance it
my code far: http://pastebin.com/t3ky5qzn
i'm not programmer , bit stuck here... me out?
i used online xml viewer more human readable format , can see 2 blocks 1 route in , total distance in each..
its simple as: echo min($result)
from there simple mod module picks shortest route of google might give
Comments
Post a Comment