Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

HowTo disable KML Manager of BlackBerry Map App (or single kml documents)

I'm using KML documents to display a tracked path as KML LineString

works well using

MapsArguments mapsArgs = new MapsArguments(MapsArguments.ARG_KML, url);
try {
	Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, mapsArgs);
} catch (IllegalArgumentException e) {
	// log
}

this works well, but if invoking the Map App with a KML url then the KML Manager of Map App was automatically enabled and also the KML document is enabled.

 

so if Invoking next time using a KML document - even with same id - this KML will be added and both data are visible. user has to go to KML menu and manually disable the kml document.

 

in some cases this may be OK, but in my case I want to disable previous kml documents sent by me.

using Location documents there's a clear property, but I didn't found anything for KML documents

 

thx for any help

 

will blog about these topics in detail soon (1st VIDEO is already online) 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: HowTo disable KML Manager of BlackBerry Map App (or single kml documents)

There is no way to clear KML data when invoking BlackBerry Maps.  Instead of invoking BlackBerry Maps, you could display a RichMapField within your own application.  As of BlackBerry Device Software version 6.0 you can display KML in a RichMapField.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Highlighted
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: HowTo disable KML Manager of BlackBerry Map App (or single kml documents)

[ Edited ]

MSohm wrote:

There is no way to clear KML data when invoking BlackBerry Maps.  Instead of invoking BlackBerry Maps, you could display a RichMapField within your own application.  As of BlackBerry Device Software version 6.0 you can display KML in a RichMapField.


Hi Mark,

 

I',m already using KML together with RichMapField - works well

 

But if I got Waypoints from my GPS Tracker then the customer sometimes wants to compare the tracked path with the calculated Route.

Routes can (as I know) only be displayed using a lbs Location Document, which can only be used on top of BB Map App and not RichMapField.

So I have to use the Map App in this case:

 

from my GPS and Location Manager App I do it now this way:

* invoke the Map App with Location Document using first and last selected Waypoint as start and end of the Route

* Invoke the Map App with KML - where from this URL the KML was dynamically generated using the coordinates (sent as HTTP Paramaters) and giving back the tracked path as a line (KML LineString)

 

Now the user sees both side-by-side to control if the truck driver used the right way

 

If the displayed line (tracked path) isn't enough, I can also invoke the Map App with a LandMark[ ] placing all the waypoints on top of the (KML) line

(I used LandMark[ ] insted of Location Document because of all the UTF-8 problems with lbs document (see other thread)

 

curious: this really worked ;-) ....using three Map Invoke commands and the user sees all together Smiley Happy

 

BTW: will start blog series soon about all this funny stuff

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner