4 Replies Latest reply on Dec 16, 2013 6:19 AM by WF7A

    Resize Web Page or Google Map in Web Viewer

    DavidMarsh

      Title

      Resize Web Page or Google Map in Web Viewer

      Post

      Is it possible to fit either a web page or Google Map to the Web Viewer size?

      I'm displaying both for the current record but they're way bigger than the viewer. Found an article on doing this for images at cimbura.com but don't yet know enough to adapt it.

      Thanks

        • 1. Re: Resize Web Page or Google Map in Web Viewer
          philmodjunk

          Here's a URL we use for Google Map:

          "data:text/html,
          <style type='text/css'>
          html,body {
          overflow:hidden;
          }
          </style>
          <html>
              <head>
                  <title>NavText</title>
              </head>
              <body bgcolor='#FFFFFF' TopMargin='0' style='border:0'>
                  <iframe width='" & GetLayoutObjectAttribute ( "MapViewer" ; "width" ) - 40 &
                      "' height='" & GetLayoutObjectAttribute ( "MapViewer" ; "height" ) - 30 &
                      "' frameborder='0' scrolling='no' marginheight='0' marginwidth='0'
                      src='http://local.google.com/maps?q=" & CustInfo::Street & "," & CustInfo::City & "," & CustInfo::State & "," & CustInfo::Zipplus4  & "&amp;output=embed&iwloc=0&z=14'>
                  </iframe>
              </body>
          </html>"

          It's a modified form from a post provided by Raybaudi.

          Of note are the parameters, Ouput=embed and z = 14. z is the zoom level so you can modify the zoom by specifying different values for z. (And the user can still change the zoom from this initial setting.)

          • 2. Re: Resize Web Page or Google Map in Web Viewer
            DavidMarsh

            Thanks PhilModJunk, will have a looka t this as soon as I can.

            Appreciate your help.

            • 3. Re: Resize Web Page or Google Map in Web Viewer
              billcooper

              Hi PhilModJunk


              Great answer-thanks.

              To use this just change 'MapViewer' to whatever your Web Viewer is called - note that as default Web Viewers are not named - you need to use the Inspector to create a name.

               

              I wanted to use this for rural South Australia, so I edited the maps line to;

               src='http://local.google.com/maps?q=" & Asset::Geo  & "&amp;output=embed&iwloc=0&z=18

              where Geo:Asset is a Google co-ordinate, eg -35.2956666667,139.0346666667

              • 4. Re: Resize Web Page or Google Map in Web Viewer
                WF7A

                     Good answer for Google maps, but what about the first part of Dave's question? In my solution, web pages are truncated on the right side of the viewer and I can't, by design, lengthen the width of the field so I need to reduce the size of the web page to fit within the Web Viewer's borders. How can that be accomplished?