BlackBerry Forums Support Community

BlackBerry Forums Support Community (
-   Developer Forum (
-   -   Hard time developing BBMap based application. Please Help (

kdas 07-15-2011 11:54 AM

Hard time developing BBMap based application. Please Help
Hi all,

I am developing an app which will show the bus locations on the map and dynamically update them also. I have an HTTP thread which fetches the bus coordinates (lat & lang) from a web server. When I fetch the coordinates, I prepare a location document similar to BlackBerryMapsDemo project's multiple location feature. Then I call the BBMap application using the Invoke.InvokeApplication() API and passing the location document string.
I have a timer which ticks off every 15secs. When the timer goes off, I fetch the coordinates, prepare location document string, invoke BBMap application. If the Map application is already running the new coordinates overwrite on the previous ones. Now the Map starts up, shows the locations with "red ball" marker and periodically updates also. So far so good. Below are the problems I am facing.

1. Every time the map refreshes i.e 15secs, it resets the zoom level. For example if the user zooms in/out, between the 15s period, after 15s when the map refreshes, the zoom level is back to with which it started and the user's zoom level is lost. How can I fix this?

2. Is there a way through which I can define my own markers for locations, for example say a red ball for buses going east and blue ball for buses going west or like triangle shaped pointers describing the direction in which the bus is moving.

3. I have all the bus stop's coordinates also and I think I can use it to draw a route on the map depicting the bus's route. The <lbs> has a <getRoute> element through which it can be accomplished I guess but it takes one start and one end location. I cannot just provide the end points of bus's route to clearly depict the bus's route so I have to join 2 stops at a time. Does anyone has any idea how I can depict the route with say, I have 15 bus stops coordinates between the bus's route end points.

Any help is appreciated.


All times are GMT -5. The time now is 11:34 PM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.