BlackBerry maps location document with multiple points -
when implement blackberry maps in application using code rim in how - invoke blackberry maps, map works fine ontario points, when use latitude 13.083333 , longitude: 80.283333, not work.
what dot? on skipping dot, shows incorrect position.
string document = "<lbs> <location lon='-8030000' lat='4326000' label='kitchener, on' description='kitchener, ontario, canada' /> <location lon='-7569792' lat='4542349' label='ottawa, on' description='ottawa, ontario, canada' />
";
the right way multiply lat & long 100,000 , cast integer value, this:
// lat & long times 100,000, converted integer int lon = (int) (80.283333 * 100000); int lat = (int) (13.083333 * 100000); string label = "label of point on map"; string desc = "description of point when clicked"; // create location element stringbuffer sb = new stringbuffer(); sb.append("<location"); sb.append(" lon='").append(string.valueof(lon)).append("'"); sb.append(" lat='").append(string.valueof(lat)).append("'"); sb.append(" label='").append(label).append("'"); sb.append(" description='").append(desc).append("'"); sb.append(" />");
Comments
Post a Comment