Skip to content

Instantly share code, notes, and snippets.


jyt/map directions

Created Jul 27, 2009
What would you like to do?
//This is a ubiquity command
//to view a map and diections for places specified by you in India.
names: ["view directions","map directions"],
icon: "chrome://ubiquity/skin/icons/map.png",
description: "This command will open a map which show the directions about how to reach from a given place to a given destination in India",
help: "To view the directions type the name of places whose direction map you want to see",
author: {name: "Jyoti", email: ""},
homepage: "",
arguments: [{role: 'source', nountype: noun_arb_text},
{role: 'goal', nountype: noun_arb_text}
preview: function preview(pblock, args) {
pblock.innerHTML = "view a map depiccting the directions from <b>" + args.source.html + "</b> to <b>"+args.goal.html+"</b>.";
execute: function(args)
displayMessage("You havent specified the source");
else if(args.goal.text=="")
displayMessage("You havent specified the destination");
Utils.openUrlInBrowser(""+args.source.text+" to:"+args.goal.text+"&q=search")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.