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
Highlighted
New Contributor
Posts: 7
Registered: ‎08-22-2013
My Device: Z10
My Carrier: Movistar
Accepted Solution

Openlayers show small map

Hey guys, i have a problem showing an Openlayers map on bbUI or jQuery mobile, the thing is the meta viewport gets set by the frameworks at scale=0.44, which makes the map smaller and the text unreadable. I've tried setting the zoom at 2 and it makes the map bigger, but when i try to zoom by pinching it doesn't work well because it can't detect the right position of where im pinching (i had to set the width and height at half to use the zoom at 2). If i set the page at scale=1.0 the action bar from bbUI grows in size, almost double. Do any of you had a similar problem? Could you solve it? Thanks!

Retired
Posts: 165
Registered: ‎09-24-2012
My Device: Passport
My Carrier: Bell

Re: Openlayers show small map

Hi Geecko,

 

In order for a framework to provide a BlackBerry 10 experience, it needs to be set up for native resolution, rather than reference CSS resolution.

 

This is why BBUI.js sets up the viewport to get all physical pixels from the device.

 

Z10 – 768x1280 (physical) 541x371 (reference)

 

Most map providers (incl. Google Maps) are designed for CSS reference resolution, so its contents will be very hard to see on a smaller screen.

 

One way this would work, is by using a child browser. Create a simple HTML page with the map and load using window.open().

 

You can show a static map in the BBUI page, and when the user taps it, window.open() the map HTML, so it slides in with a fullscreen map with correct zoom because the viewport is not overriden.

 

For more information on CSS reference resolution refer to: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-set-up-the-viewport-for-a...

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

Re: Openlayers show small map

Thank you anzor_b. I asked for assistance in the bbUI forum and they said the scale problem im having will get fixed in the 1.0 release. In the mean time i will look into your temporary solution and try something out.