2. Write clicked method on Map button.
public void clicked()
{
Objects objectsTable;
str address;
const str mapUrl = 'http://www.bing.com/maps/default.aspx?where1=\%1';
const str comma = ',';
const str newLine = '\n';
//super();
Args args = new Args();
objectsTable = args.record(Objects);
if (objectsTable)
{
/*address = _address.Street + comma +
_address.City + comma +
_address.State + comma +
_address.ZipCode + comma +
_address.CountryRegionId;*/
address = objectsTable.Addressing;
// Replace the newline with comma
address = strReplace(address, newline, comma);
// URL encode
address = System.Web.HttpUtility::UrlEncode(address);
// Add the address to the URL
Browser br = new Browser();
br.navigate((strFmt(mapUrl, address)), true);
}
}
}