html - how to create map in blackberry using browser field and javascript -
i create html file show google map using javascript tried on chrome , firefox , working, want show map blackberry app put eclipse , create browserfield show content of html file, when open app show blank, map not appear
this code of map in javascript:
<style type="text/css"> html, body, #map-canvas { height: 100%; margin: 0; padding: 0;} </style> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js? aizasybxgima4vdwwcvbjgqlkfdltxhfvv1mgd8"> </script> <script type="text/javascript">
and code how show browser field in blackberry
browserfield browserfield = new browserfield(mybrowserfieldconfig); inputstream content = getclass().getresourceasstream("/map.html"); try { byte[] html = ioutilities.streamtobytes(content); string htmltxt = new string(html); browserfield.displaycontent(new string(htmltxt), "local:///"); } catch (ioexception e) { e.printstacktrace(); }
in previous question asked this, linked answer you. max said it's not possible because of poor javascript support in browserfields.
this post suggests it's because browerfield not support ajax (which inclined believe). final post on link claim have working, albeit inconsistent map marker. it's worth try, other you'll need either use static maps, or launch google maps app.
Comments
Post a Comment