2 Replies Latest reply on Feb 16, 2014 11:17 AM by jjslsteed

    Google lite maps in web viewer

    jjslsteed

      Title

      Google lite maps in web viewer

      Post

           Hi Folks,

           I am trying to get the google lite maps in a web viewer but I am running into trouble. Here is the code for the viewer.

            

           GetMap ( "Map1" ; T01_ACCOUNTS::Zoom ; If ( T01_ACCOUNTS::ShipBill="Shipping" ; T01_ACCOUNTS::Shipping_Street1 ; T01_ACCOUNTS::Billing_Street1 ) ; If ( T01_ACCOUNTS::ShipBill="Shipping" ; T01_ACCOUNTS::Shipping_Street2 ; T01_ACCOUNTS::Billing_Street2 ) ; If ( T01_ACCOUNTS::ShipBill="Shipping" ; T01_ACCOUNTS::Shipping_City ; T01_ACCOUNTS::Billing_City ) ; If ( T01_ACCOUNTS::ShipBill="Shipping" ; T01_ACCOUNTS::Shipping_State_Province ; T01_ACCOUNTS::Billing_State_Province ) ; If ( T01_ACCOUNTS::ShipBill="Shipping" ; T01_ACCOUNTS::Shipping_Postal_Code ; T01_ACCOUNTS::Billing_Postal_Code ) ; If ( T01_ACCOUNTS::ShipBill ; T01_ACCOUNTS::Shipping_Country ; T01_ACCOUNTS::Billing_Country ) )

           I do get a map, but it is static and will not let me switch to satellite view or map view.

            

           Any help would be appreciated.

            

           Thanks.  Jim Steed

        • 1. Re: Google lite maps in web viewer
          schamblee

               The url used in the custom function Getmap will only show static maps.  You will have to modify the custom function base on the following url in the following calculation.  I use the following in a calculation field.  You will have to substitute your fields in place of mine.

               Let (
                [
                address = Substitute (
               caddress& " " &
               ""& " " &
               ccity & " " &
               cstate & " "&
               czip & " " &
                " " ;
                " " ; "+"
                ) ;
                size = GetLayoutObjectAttribute ( "Map1" ; "width" ) & "x" & GetLayoutObjectAttribute ("Map1" ; "height" )
                ] ;
                
                & address &
                "&zoom=" & zoom &
                "&markers="
                & Markers &
                "&size="
                & size &
                "&sensor=false"
                )
          • 2. Re: Google lite maps in web viewer
            jjslsteed

            S Chamblee

                 This seems to work just fine. Thanks for the info.

                 Jim Steed