08-26-2013 12:29 PM
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!
Solved! Go to Solution.
08-28-2013 12:57 PM
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-Web
08-28-2013 03:07 PM
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.