Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor narendar_discover's Avatar
    Join Date
    Oct 2007
    Location
    India
    Posts
    349
    Hi,
    I have created a simple application for showing map, based on provided lat/lon. The app is working properly in Emulator but on device its not working. I am using WebView and Google's Java Script API to load the map. here is the code:

    void MyApp::showMap(QString lat, QString lon)
    {
    // KEY ABQIAAAAwQNYrQEkTMgmCz45a3QXvxSN-sVMkTd7OLtH8gVp16673GU6nRQ1xCIdPzJW67z89BrUaXAxaGG7gg

    ui->mapWebView->setHtml("<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><script src=\"http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAwQNYrQEkTMgmCz45a3QXvxSN-sVMkTd7OLtH8gVp16673GU6nRQ1xCIdPzJW67z89BrUaXAxaGG7gg&sensor=true_or_false\" type=\"text/javascript\"></script><script type=\"text/javascript\">function initialize() {if (GBrowserIsCompatible()) {var map = new GMap2(document.getElementById(\"map_canvas\"));var bounds = new GLatLngBounds; map.setCenter( new GLatLng(" + lat + "," + lon + "),16 ); var markers = new GMarker(new GLatLng(" + lat + "," + lon + ")); bounds.extend(markers.getPoint()); map.addOverlay(markers); map.setCenter(bounds.getCenter()); map.setUIToDefault(); }}</script></head><body onload=\"initialize()\" onunload=\"GUnload()\"><div id=\"map_canvas\" style=\"width: 330px; height: 555px\"></div></body></html>");

    }

    If you call this function showMap(yourLat, yourLon) It will work perfectly on emulator but on device it will show white screen. What may be problem ??

  2. #2
    Nokia Developer Moderator skumar_rao's Avatar
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968
    i think we discussed this somedays ago ...
    can you try putting google.com at this webview and try on device.

  3. #3
    Regular Contributor narendar_discover's Avatar
    Join Date
    Oct 2007
    Location
    India
    Posts
    349
    Right Sunil... let me try...

  4. #4
    Nokia Developer Moderator ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    Nothing to do with Smart Installer fortunately. I will move this thread ... somewhere.

  5. #5
    Regular Contributor narendar_discover's Avatar
    Join Date
    Oct 2007
    Location
    India
    Posts
    349
    Quote Originally Posted by skumar_rao View Post
    i think we discussed this somedays ago ...
    can you try putting google.com at this webview and try on device.
    QWebView is not showing Web Page on device (Nokia E7)

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    QWebView view;
    view.load(QUrl("http://www.nokia.com"));
    view.showMaximized();
    return a.exec();
    }

    in .pro
    1) webkit is added
    2) symbian:TARGET.CAPABILITY += NetworkServices is added

Similar Threads

  1. [moved] Qml is not working in MeeGo sdk 1.1
    By kotesh.06521 in forum [Archived] Qt SDKs and Tools
    Replies: 6
    Last Post: 2011-03-16, 12:48
  2. Replies: 11
    Last Post: 2008-09-29, 07:13
  3. ECOm is not working in device
    By sowrav in forum Symbian C++
    Replies: 2
    Last Post: 2006-06-13, 07:48
  4. Replies: 2
    Last Post: 2006-03-11, 09:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved