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

Web and WebWorks Development

Reply
New Contributor
Posts: 7
Registered: ‎08-22-2013
My Device: Z10
My Carrier: Movistar

Re: Webworks BB10 - Invoke Maps w/ directions

[ Edited ]

Hey mserina, there is no information on the maps service for Webworks so we have to work with little pieces from here and there. If you want to show just the center of the coordinates without the navigation following the example above you can use:

blackberry.invoke.invoke({
action :"bb.action.OPEN",
type: "application/vnd.rim.map.action-v1",
data: JSON.stringify({
"center" : { "latitude" : 43.46426, "longitude" : -80.52041, "heading" : 180, "zoom" : 4 }})
});


The problem i have now is that the zoom doesn't work, be it 4 or 16 it will open the map at the same zoom level, to far for me. If anyone nows how to set the options to pass on to maps please let as know.

Contributor
Posts: 44
Registered: ‎11-12-2012
My Device: BB 10 Dev Apha
My Carrier: -

Re: Webworks BB10 - Invoke Maps w/ directions

Hi Geecko!

Thanks a lot for this information, I'm gonna use it and let you know if get additional information

Thanks again

-marco

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Webworks BB10 - Invoke Maps w/ directions

I dont think there is a "zoom". Try specifying an altitude in meters. The target map app converts the altitude to a zoom level.
Contributor
Posts: 44
Registered: ‎11-12-2012
My Device: BB 10 Dev Apha
My Carrier: -

Re: Webworks BB10 - Invoke Maps w/ directions

Hi guys,

I solved the problem by invoking Maps by means of kml MIME type (something like the following):

 

var path = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><kml xmlns=\"http://www.opengis.net/kml/2.2\">"+
"<Placemark><name>Title</name><description>Description</description>"+
"<Point><coordinates>9.2,45.3,0</coordinates></Point></Placemark></kml>";

blackberry.invoke.invoke(
{
action :"bb.action.OPEN",
type: "application/vnd.google-earth.kml+xml",
data&colon; path
});

 

Hope this can help someone else!

 

Thanks again

 

-marco