• NormanG
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

I created a component which contains the gmap API for driving directions.

 

 

<apex:component >
    <apex:attribute name="LocationA" description="Location A" type="String" required="true" />
    <apex:attribute name="LocationB" description="Location B" type="String" required="true" />

    <div id="map_canvas" style="width: 100%; height: 375px; background-color: #ffffff;">

    <script src=" http://maps.google.com/—file=api&amp;v=2.x&amp;
    key=ABQIAAAATLMNChkxHLNMBMyJTWj6NBRI1GHY-WN6xuGUGnsHkEIkRmE15BQKtJjUz7L1VCIpVF7qmtbghbpPAA"
    type="text/javascript"></script>

    <script type="text/javascript">

    var dirFrom = '{!LocationA}';
    var dirTo = '{!LocationB}';

    function initialize() {
        if (GBrowserIsCompatible()){
          map = new GMap2(document.getElementById("map_canvas"));
          directionsPanel = document.getElementById("my_textual_div");
          map.setCenter(new GLatLng(49.496675,-102.65625), 3);
          directions = new GDirections(map, directionsPanel);
          directions.load("from: dirFrom to:dirTo");
          }
}

        var previousOnload = window.onload;            
        window.onload = function() {        
         if (previousOnload) {            
         previousOnload(); }  
        initialize();    }
    </script>
 </div>
</apex:component>

 The page which references the controller:

 

 

 

<apex:page standardController="Account" showheader="false">
  <c:DrivingDirection 
  LocationA="{!Account.BillingPostalCode}+{!Account.BillingState}+{!Account.BillingCountry}" 
   LocationB="{!$User.PostalCode}+ {!$User.State}+ {!$User.Street}">
  </c:DrivingDirection>
</apex:page>

 

 

I am calling this VF page from a custom button.The content source for the button is URL.

But the page is showing blank with a warning that "the page contains non-secure items".

Appreciate any help on the issue.

 

Thanks & Regards,

Norman

 

 

is there any way to have a date time field time zone independent.... meaning anyone looking at it, regardless of their location, would see the same date/time?

  • April 13, 2010
  • Like
  • 0

I created a component which contains the gmap API for driving directions.

 

 

<apex:component >
    <apex:attribute name="LocationA" description="Location A" type="String" required="true" />
    <apex:attribute name="LocationB" description="Location B" type="String" required="true" />

    <div id="map_canvas" style="width: 100%; height: 375px; background-color: #ffffff;">

    <script src=" http://maps.google.com/—file=api&amp;v=2.x&amp;
    key=ABQIAAAATLMNChkxHLNMBMyJTWj6NBRI1GHY-WN6xuGUGnsHkEIkRmE15BQKtJjUz7L1VCIpVF7qmtbghbpPAA"
    type="text/javascript"></script>

    <script type="text/javascript">

    var dirFrom = '{!LocationA}';
    var dirTo = '{!LocationB}';

    function initialize() {
        if (GBrowserIsCompatible()){
          map = new GMap2(document.getElementById("map_canvas"));
          directionsPanel = document.getElementById("my_textual_div");
          map.setCenter(new GLatLng(49.496675,-102.65625), 3);
          directions = new GDirections(map, directionsPanel);
          directions.load("from: dirFrom to:dirTo");
          }
}

        var previousOnload = window.onload;            
        window.onload = function() {        
         if (previousOnload) {            
         previousOnload(); }  
        initialize();    }
    </script>
 </div>
</apex:component>

 The page which references the controller:

 

 

 

<apex:page standardController="Account" showheader="false">
  <c:DrivingDirection 
  LocationA="{!Account.BillingPostalCode}+{!Account.BillingState}+{!Account.BillingCountry}" 
   LocationB="{!$User.PostalCode}+ {!$User.State}+ {!$User.Street}">
  </c:DrivingDirection>
</apex:page>

 

 

I am calling this VF page from a custom button.The content source for the button is URL.

But the page is showing blank with a warning that "the page contains non-secure items".

Appreciate any help on the issue.

 

Thanks & Regards,

Norman