×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    13

    Google maps size

    How can i get the google map to fill the webview? im using Qt Creator for symbian. like get the webviews size or is there a option to autosize its contents?

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,091

    Re: Google maps size

    I would simply calculate the webview dimensions(widthxheight) & pass those in the url for fetching google map of desired size.

  3. #3
    Registered User
    Join Date
    Feb 2012
    Posts
    13

    Re: Google maps size

    can u tell me how would I get its widthxHeight? or if there is a example somewhere?

  4. #4
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,091

    Re: Google maps size

    Well you can pass the same width & height which you gave while constructing the webview.For e.g:
    Code:
    WebView {
            id: mapView
            url: some url
            preferredWidth: parent.width   
            preferredHeight: parent.height
            scale: 1
            smooth: false
        }
    take the above width & height in some variable & pass it to the google maps url.

  5. #5
    Registered User
    Join Date
    Feb 2012
    Posts
    13

    Re: Google maps size

    Mine auto sizes the app through design view, is there a way to fined the w&h another way perhaps?

  6. #6
    Registered User
    Join Date
    Nov 2010
    Posts
    40

    Re: Google maps size

    Hi,
    You can pass the values to QML from c++ look the following:
    Obtaining a Desktop Widget
    The QApplication::desktop() function is used to get an instance of QDesktopWidget.
    The widget’s screenGeometry() function provides information about the geometry of the available screens with. The obtained values you can pass to parent rectangle containing the Webview element.
    Rectangle {
    width:/*from c++*/
    height: /*from c++*/
    WebView {
    id: mapView
    url: some url
    preferredWidth: parent.width
    preferredHeight: parent.height
    scale: 1
    smooth: false
    }
    }

Similar Threads

  1. Nokia maps and Google maps
    By MTi in forum Symbian
    Replies: 10
    Last Post: 2011-12-08, 13:23
  2. Google maps
    By toshahjignesh in forum Symbian
    Replies: 6
    Last Post: 2011-11-30, 15:42
  3. Google maps in Qt
    By Maysoon88 in forum Qt
    Replies: 10
    Last Post: 2010-12-29, 12:39
  4. About Google Maps API
    By lysander in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2009-01-23, 13:52
  5. Google maps
    By antonio5982 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2008-09-09, 10:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×