05-11-2011 12:36 PM
I have the following code,
blackberry.invoke.invoke(blackberry.invoke.APP_MAP
It worked in version 6.0.0.246.
I just upgraded to version 6.0.0.526 and now it throws an error.
Has the API changed again? - it changed from 5 to 6.
Thanks in advance.
Solved! Go to Solution.
05-11-2011 05:32 PM
Hi csibbdev,
Can you post up the JavaScript that you are using to populate the args object?
05-11-2011 09:39 PM
<?xml version="1.0"?> <lbs clear="ALL" id="ATM"> <location x="-8434166" y="3404324" label="Starbucks" description=" "/> <location x="-8432728" y="3402484" label="Dunkin' Donuts" description=" "/> <location x="-8435358" y="3403040" label="Douceur De France" description=" "/> <location x="-8431938" y="3404842" label="Lu Lu's Bakery LLC" description=" "/> <location x="-8430371" y="3403924" label="Starbucks" description=" "/> <location x="-8436174" y="3401991" label="Krispy Kreme Doughnuts" description=" "/> <location x="-8435823" y="3402703" label="Southern Skillet" description=" "/> <location x="-8432004" y="3406581" label="Dunkin' Donuts" description=" "/> <location x="-8436054" y="3402721" label="Aunt Kimmy's Creations" description=" "/> <location x="-8431765" y="3402114" label="Starbucks" description=" "/>
Above is the result of the xmlString used below and here is the javascript in question, note the two formats used for version 5 and version 6....
kmlString += "<\/lbs>"
var XMLLocation = "file:///store/home/user/documents/SEARCHDATA.txt" ;
if (blackberry.io.file.exists(XMLLocation))
{
blackberry.io.file.deleteFile(XMLLocation);
}
var blob_clientdata = blackberry.utils.stringToBlob( kmlString, "US-ASCII" );
blackberry.io.file.saveFile( XMLLocation, blob_clientdata );
var osversion = blackberry.system.softwareVersion;
try {
if (osversion.substr(0, 1) == '5')
{
var parser = new DOMParser();
var doc = parser.parseFromString(kmlString, "text/xml");
var args = new blackberry.invoke.MapsArguments(doc);
blackberry.invoke.invoke(blackberry.invoke.APP_MAP S, args);
}
else
{ try {
var args = new blackberry.invoke.MapsArguments(kmlString);
blackberry.invoke.invoke(blackberry.invoke.APP_MAP S, args);
} catch (Error) {
alert("Version 6 arg err");
}
}
05-19-2011 12:18 PM
Crickets?
05-19-2011 05:06 PM
I sent it over to our testing team today, and they were unable to reproduce the error with either SDK v1.5 or 2.0. They tested on the simulator and on a device with 6.0.0.526 loaded
Is there possibly something that changed with your wireless vendor who may have removed maps or the ability to access it?
05-20-2011 02:29 PM
Bingo - he shoots, he scores!
My major US carrier "left out" BB Maps from the latest software "upgrade", I guess so that they can promote their own service.
Now to figure out a way around this so that my super app framework works with any carrier.