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
Contributor
stereoket
Posts: 14
Registered: ‎03-14-2013
My Device: Z10
My Carrier: T-Mobile / 3

Z10 Browser has an issue with Google Maps API driven webpages (markers)

I have an app that uses the Google Maps  v3 API - specifically It requires the heavy use of markers.

 

It seems that there is a serious issue with the rendering of the MarkerIcons on the Z10 browser, problems do not exist on the Playbook or other Platforms (with their resepctive browsers).

 

If you look at the following example pages on a Z10 and then in any other browser/platform, you will see the problem:

 

https://google-developers.appspot.com/maps/documentation/javascript/examples/marker-simple

 

and

 

https://google-developers.appspot.com/maps/documentation/javascript/examples/icon-complex

 

Has anyone seen this/got any feedback, or can point me to any resources to try and resolve this.

 

Thanks,

 

Ket

Please use plain text.
Contributor
stereoket
Posts: 14
Registered: ‎03-14-2013
My Device: Z10
My Carrier: T-Mobile / 3

Re: Z10 Browser has an issue with Google Maps API driven webpages (markers)

Anyone else see this problem? Its not exactly web works related - its the z10 browser engine that seems to be the issue.

Please use plain text.
Administrator
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Z10 Browser has an issue with Google Maps API driven webpages (markers)

My *guess* is the issue is one of two things:

 

1) Google maps API is preventing these markers from appearing, not the browser.  I suspect the API may be deciding not to display markers based on some sort of logic.  The code is very tricky to debug as it has been obfuscated so its not immediately clear to me what the issue is.

 

I just tested the URLs provided below using remote web inspector and did not see any runtime errors.

 

Note : Markers do work.  We have a Maps sample WebWorks application published here that demonstrates using Google Maps APIs

 

https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Maps

http://devblog.blackberry.com/2012/12/blackberry-webworks-maps/

 

 

2) The  viewport being defined in this test page is causing a scaling issue, and the marker is not being rendered in the correct place.  Their viewport is the following:

 

<meta name="viewport" content="initial-scale=1.0, user-scalable=no">

but it needs to follow this convention to scale page content correctly (which is what the above sample app does): 

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-set-up-the-viewport-for-a...

 

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Administrator
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Z10 Browser has an issue with Google Maps API driven webpages (markers)

Looks like my #2 guess is the correct one. Open the test page in the Z10 browser, and use the map zoom controls to zoom out *twice*.  You should see a part of the marker displayed underneath the international date line (east of New Zealand).

 

So the remedy for that test page is Google needs to update it to render content at correct screen resolutions.

 

For BlackBerry developers, if you are using Google Maps API + markers, make sure to set your viewport like this and you'll be fine:

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-set-up-the-viewport-for-a...

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Z10 Browser has an issue with Google Maps API driven webpages (markers)

I had some nightnare issues on the Sim (waiting for Z10) basically to do with whitelists

 

Try these if you ain't got them

 

    <access uri="https://googleapis.com" subdomains="true" />
    <access uri="https://gstatic.com" subdomains="true" />




Click the like button if you find my posts useful!
Please use plain text.