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

http://maps.googleapis.com/maps/api/directions/xml?origin=svendborgvej%20323,%205260%20odense%20s,%20denmark&destination=albanivej%2027,%205792%20%c3%85rslev&alternatives=true

now have 2 routes in xml , need

  1. pick shortest one
  2. 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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -