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
New Developer
wlcolman
Posts: 27
Registered: ‎12-31-2008
My Device: Not Specified
Accepted Solution

Adding location to BB Maps without specifying zoom level

Eclipse SDK Version: 3.4.1

BlackBerry JDE Plug-in for Eclipse Version:  1.0.0.50

BlackBerry JDE Component Pack Version:  4.5.0.14

 

I'm creating a location document string to display a point on the map. It works fine but if the user changes the zoom level I would like to be able to keep the chosen zoom level when I add the next point. If I omit the "zoom" element in my string the map will default to a zoom level of 0. How can I add a point so that the current zoom level is used and unchanged? I'm invoking maps from my application as follows where "document" is my location string.

 

Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments( MapsArguments.ARG_LOCATION_DOCUMENT, document));
   

BlackBerry Development Advisor
MSohm
Posts: 14,849
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Adding location to BB Maps without specifying zoom level

There is no way to prevent a user from changing the zoom level after invoking BlackBerry Maps.  However, you can control this if you use a MapField, which was introduced in version 4.5.0 of the BlackBerry API set.

 

You can see an example of this in the mapfielddemo, which is included with the BlackBerry JDE.

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
New Developer
wlcolman
Posts: 27
Registered: ‎12-31-2008
My Device: Not Specified

Re: Adding location to BB Maps without specifying zoom level

I don't want to prevent the user from changing the zoom level. I was wondering if there is a way to keep the zoom level that the user selected when the map is updated using the location document. In other words, I want to use a location document that does not specify the zoom level which would effectivley use the current zoom level. When I omit the zoom level in my location document it defaults to a zoom level of 0.
BlackBerry Development Advisor
MSohm
Posts: 14,849
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Adding location to BB Maps without specifying zoom level

This isn't possible when invoking BlackBerry Maps.  You can control this when using a MapField.
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
Developer
Shubhangi
Posts: 97
Registered: ‎07-17-2008
My Device: Not Specified

Re: Adding location to BB Maps without specifying zoom level

Hi,

 

I want to display map using GPS coordinates. How to form the document string used in MapsArguments?I am using OS 4.2.1.

Can I get sample code to display map?

 

Looking forward for help.

 

 

 

Regards,

Shubhangi 

Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Adding location to BB Maps without specifying zoom level

Did you get a chance to go thru this document.

 

http://na.blackberry.com/eng/deliverables/5814/GPS_and_BlackBerry_Maps-4.7.0-US.pdf


Use Search. "Accept Solution" If the problem is resolved.
Developer
Shubhangi
Posts: 97
Registered: ‎07-17-2008
My Device: Not Specified

Re: Adding location to BB Maps without specifying zoom level

Hi,

 

Thanks for quick reply. I will go through it and let you know if any problem comes.

 

 

Regards,

Shubhangi