Routing

http://www.streetdirectory.com/api/

Parameters Description
mode routing  
output return type (js, json, xml)  
weight option / methods for routing
0. shortest distance
1. nearby exp
2. expressway
3. no weight
 
country country (sg, my, id)  
x1 start position - longitude  
y1 start position - latitude  
x2 end position - longitude  
y2 end position - latitude  

Request example :

http://www.streetdirectory.com/api/?mode=routing&weight=3&country=sg&output=xml&x1=367476.35714806244&y1=142469.22526040458&x2=369498.49827052205&y2=142223.3342000205

Response:

Attributes Description
total total route
time estimate time (in minutes)
distance distance (in km)
txt description of the route
act action of the route (left, right, continue)
x position - longitude
y position - latitude

js

set_data([
    {
        "total":11,
        "time":"8.21 minutes",
        "distance":"2.77 km"
    },
    {
        "txt":"<a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_34538\/travel_site_11271\/\" >HDB Rumah Tinggi<\/a>, 36 Jalan Rumah Tinggi(S)150036",
        "x":"367476.3561",
        "y":"142469.2273"
    },
    {
        "txt":"From Carparks travel for 365.01 m and then turn left to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17635\/travel_site_1\/\">Chang Charn Road<\/a> towards North.",
        "act":"left",
        "x":"367754",
        "y":"142509"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17635\/travel_site_1\/\">Chang Charn Road<\/a> travel for 84.72 m and then turn right to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_19590\/travel_site_1\/\">Kung Chong Road<\/a> towards East.",
        "act":"right",
        "x":"367771",
        "y":"142592"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_19590\/travel_site_1\/\">Kung Chong Road<\/a> travel for 187.92 m and then turn left to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_18704\/travel_site_1\/\">Hoy Fatt Road<\/a> towards North.",
        "act":"left",
        "x":"367956",
        "y":"142559"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_18704\/travel_site_1\/\">Hoy Fatt Road<\/a> travel for 124.18 m and then turn right to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17925\/travel_site_1\/\">Leng Kee Road<\/a> towards East.",
        "act":"right",
        "x":"367990",
        "y":"142678"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17925\/travel_site_1\/\">Leng Kee Road<\/a> travel for 301.96 m and then continue to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_11267\/travel_site_12089\/\">Tiong Bahru Road<\/a> towards East.",
        "act":"continue",
        "x":"368278",
        "y":"142595"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_11267\/travel_site_12089\/\">Tiong Bahru Road<\/a> travel for 1.49 km and then turn left to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17440\/travel_site_1\/\">Bukit Ho Swee Link<\/a> towards North.",
        "act":"left",
        "x":"369651",
        "y":"142155"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17440\/travel_site_1\/\">Bukit Ho Swee Link<\/a> travel for 79.06 m and then turn left to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17439\/travel_site_1\/\">Bukit Ho Swee Crescent<\/a> towards West.",
        "act":"left",
        "x":"369648",
        "y":"142234"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17439\/travel_site_1\/\">Bukit Ho Swee Crescent<\/a> travel for 107.28 m and then turn left to Carparks towards South.",
        "act":"left",
        "x":"369543",
        "y":"142256"
    },
    {
        "txt":"From Carparks travel for 15.12 m and then turn right to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_9221\/travel_site_12090\/\">Tiong Bahru Plaza<\/a> towards West.",
        "act":"right",
        "x":"369538",
        "y":"142242"
    },
    {
        "txt":"<a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_9221\/travel_site_12090\/\" >Tiong Bahru Plaza<\/a>, 302 Tiong Bahru Road(S)168732",
        "x":"369498.4973",
        "y":"142223.3359"
    }
]);

json

[
    {
        "total":11,
        "time":"8.21 minutes",
        "distance":"2.77 km"
    },
    {
        "txt":"<a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_34538\/travel_site_11271\/\" >HDB Rumah Tinggi<\/a>, 36 Jalan Rumah Tinggi(S)150036",
        "x":"367476.3561",
        "y":"142469.2273"
    },
    {
        "txt":"From Carparks travel for 365.01 m and then turn left to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17635\/travel_site_1\/\">Chang Charn Road<\/a> towards North.",
        "act":"left",
        "x":"367754",
        "y":"142509"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17635\/travel_site_1\/\">Chang Charn Road<\/a> travel for 84.72 m and then turn right to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_19590\/travel_site_1\/\">Kung Chong Road<\/a> towards East.",
        "act":"right",
        "x":"367771",
        "y":"142592"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_19590\/travel_site_1\/\">Kung Chong Road<\/a> travel for 187.92 m and then turn left to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_18704\/travel_site_1\/\">Hoy Fatt Road<\/a> towards North.",
        "act":"left",
        "x":"367956",
        "y":"142559"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_18704\/travel_site_1\/\">Hoy Fatt Road<\/a> travel for 124.18 m and then turn right to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17925\/travel_site_1\/\">Leng Kee Road<\/a> towards East.",
        "act":"right",
        "x":"367990",
        "y":"142678"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17925\/travel_site_1\/\">Leng Kee Road<\/a> travel for 301.96 m and then continue to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_11267\/travel_site_12089\/\">Tiong Bahru Road<\/a> towards East.",
        "act":"continue",
        "x":"368278",
        "y":"142595"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_11267\/travel_site_12089\/\">Tiong Bahru Road<\/a> travel for 1.49 km and then turn left to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17440\/travel_site_1\/\">Bukit Ho Swee Link<\/a> towards North.",
        "act":"left",
        "x":"369651",
        "y":"142155"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17440\/travel_site_1\/\">Bukit Ho Swee Link<\/a> travel for 79.06 m and then turn left to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17439\/travel_site_1\/\">Bukit Ho Swee Crescent<\/a> towards West.",
        "act":"left",
        "x":"369648",
        "y":"142234"
    },
    {
        "txt":"From <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_17439\/travel_site_1\/\">Bukit Ho Swee Crescent<\/a> travel for 107.28 m and then turn left to Carparks towards South.",
        "act":"left",
        "x":"369543",
        "y":"142256"
    },
    {
        "txt":"From Carparks travel for 15.12 m and then turn right to <a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_9221\/travel_site_12090\/\">Tiong Bahru Plaza<\/a> towards West.",
        "act":"right",
        "x":"369538",
        "y":"142242"
    },
    {
        "txt":"<a href=\"http:\/\/www.streetdirectory.com\/asia_travel\/travel\/travel_id_9221\/travel_site_12090\/\" >Tiong Bahru Plaza<\/a>, 302 Tiong Bahru Road(S)168732",
        "x":"369498.4973",
        "y":"142223.3359"
    }
]

xml

<dataset total="11" time="8.21 minutes" distance="2.77 km">
    <data>
        <txt>
            <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_34538/travel_site_11271/" >HDB Rumah Tinggi</a>, 36 Jalan Rumah Tinggi(S)150036
        </txt>
        <x>367476.3561</x>
        <y>142469.2273</y>
    </data>
    <data>
        <txt>
            From Carparks travel for 365.01 m and then turn left to <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_17635/travel_site_1/">Chang Charn Road</a> towards North.
        </txt>
        <act>left</act>
        <x>367754</x>
        <y>142509</y>
    </data>
    <data>
        <txt>
            From <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_17635/travel_site_1/">Chang Charn Road</a> travel for 84.72 m and then turn right to <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_19590/travel_site_1/">Kung Chong Road</a> towards East.
        </txt>
        <act>right</act>
        <x>367771</x>
        <y>142592</y>
    </data>
    <data>
        <txt>
            From <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_19590/travel_site_1/">Kung Chong Road</a> travel for 187.92 m and then turn left to <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_18704/travel_site_1/">Hoy Fatt Road</a> towards North.
        </txt>
        <act>left</act>
        <x>367956</x>
        <y>142559</y>
    </data>
    <data>
        <txt>
            From <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_18704/travel_site_1/">Hoy Fatt Road</a> travel for 124.18 m and then turn right to <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_17925/travel_site_1/">Leng Kee Road</a> towards East.
        </txt>
        <act>right</act>
        <x>367990</x>
        <y>142678</y>
    </data>
    <data>
        <txt>
            From <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_17925/travel_site_1/">Leng Kee Road</a> travel for 301.96 m and then continue to <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_11267/travel_site_12089/">Tiong Bahru Road</a> towards East.
        </txt>
        <act>continue</act>
        <x>368278</x>
        <y>142595</y>
    </data>
    <data>
        <txt>
            From <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_11267/travel_site_12089/">Tiong Bahru Road</a> travel for 1.49 km and then turn left to <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_17440/travel_site_1/">Bukit Ho Swee Link</a> towards North.
        </txt>
        <act>left</act>
        <x>369651</x>
        <y>142155</y>
    </data>
    <data>
        <txt>
            From <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_17440/travel_site_1/">Bukit Ho Swee Link</a> travel for 79.06 m and then turn left to <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_17439/travel_site_1/">Bukit Ho Swee Crescent</a> towards West.
        </txt>
        <act>left</act>
        <x>369648</x>
        <y>142234</y>
    </data>
    <data>
        <txt>
            From <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_17439/travel_site_1/">Bukit Ho Swee Crescent</a> travel for 107.28 m and then turn left to Carparks towards South.
        </txt>
        <act>left</act>
        <x>369543</x>
        <y>142256</y>
    </data>
    <data>
        <txt>
            From Carparks travel for 15.12 m and then turn right to <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_9221/travel_site_12090/">Tiong Bahru Plaza</a> towards West.
        </txt>
        <act>right</act>
        <x>369538</x>
        <y>142242</y>
    </data>
    <data>
        <txt>
        <a href="http://beta.streetdirectory.com/sdalpha/asia_travel/travel/travel_id_9221/travel_site_12090/" >Tiong Bahru Plaza</a>, 302 Tiong Bahru Road(S)168732
        </txt>
        <x>369498.4973</x>
        <y>142223.3359</y>
    </data>
</dataset>