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

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 148
Registered: ‎04-08-2013
My Device: Blackberry 10
My Carrier: Blackberry

Customise googleMap infobox using java script

I am creating Google map using javaScript.I want to customise the googleMap infoBox.I have tried the following code.Iam not able to create custom info box.

import bb.cascades 1.0
Page {
    Container {
        WebView {
            id: googleView
            html: "
<!DOCTYPE html>
<html>
  <head>
    <meta name='viewport' content='initial-scale=1.0, user-scalable=no'>
    <meta charset='utf-8'>
    <title>Info window with <code>maxWidth</code></title>

    <script src='https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false'></script>
    <script>


function initialize() {
  var chicago = new google.maps.LatLng(41.879535, -87.624333);
  var Australia = new google.maps.LatLng(-25.363882,131.044922);

  var mapOptions = {
    zoom: 4,
    center: chicago,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }


  var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

  var markerChicago = new google.maps.Marker({
      position: chicago,
      map: map,
  });

    var boxText = document.createElement('div');
    boxText.style.cssText = 'background: yellow; width: 300px; height: 70px;       padding: 5px;';
    boxText.innerHTML = content;

    var myOptions = {
         content: boxText
        ,disableAutoPan: false
        ,maxWidth: 0
        ,pixelOffset: new google.maps.Size(-37, -120)
        ,zIndex: null
        ,boxStyle: { 
            background: 'url[image] no-repeat'
            ,opacity: 1
            ,width: '300px'
         }
        ,closeBoxMargin: '5px 5px 5px 5px'
        ,closeBoxURL: 'http://www.google.com/intl/en_us/mapfiles/close.gif'
        ,infoBoxClearance: new google.maps.Size(1, 1)
        ,isHidden: false
        ,pane: 'floatPane'
        ,enableEventPropagation: false
    };

    var ib = new InfoBox(myOptions);
    ib.open(map, markerChicago);


  google.maps.event.addListener(markerChicago, 'click', function() {
    ib.open(map, markerChicago);
  });

}


google.maps.event.addDomListener(window, 'load', initialize);

    </script>
 <style>
 #map-canvas{
 position:absolute;
left:20px;
 top:20px;
 z-index:-1;
 width: 700px;
 height: 1280px;
 }

 </style>
  </head>
  <body>
  
    <div id='map-canvas'></div>

  </body>
</html>		
"
       } //web

    } //container
}//page

 

can any one plz help me out.I have tried a lot Smiley Sad

Developer
Posts: 148
Registered: ‎04-08-2013
My Device: Blackberry 10
My Carrier: Blackberry

Re: Customise googleMap infobox using java script

Any one please help me.Iam stucked here Smiley Sad