×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    3

    Question Having problems with the Quick-Start example in Chrome/Firefox, blank page

    Hi,

    I've just started looking into the Map API and pretty much copypasted the Quick Start. I can see that elements have been added to the DOM and I can see in the Network tab that PNGs are being fetched but the page remains shiny white. I am seeing the same in Chrome/Firefox on Ubuntu 11.04, in Chrome/Safari on OSX Lion and on my Android phone with Opera Mini. I am on version 2.2.0 of the API but I saw the same with 2.1.1

    Basically my DOM contains a div with id "mapContainer" and my JS looks like this (I use coffeescript so this is the generated code)
    Code:
    // Generated by CoffeeScript 1.3.1
    (function() {
    
      window.onload = function() {
        var map, mapContainer;
        nokia.Settings.set('appId', 'SK9UCIdxgGjbw9veW3_U');
        nokia.Settings.set('authenticationToken', '1NISHcNC1qTzJZlL8oo5lA');
        mapContainer = document.getElementById('mapContainer');
        return map = new nokia.maps.map.Display(mapContainer, {
          'zoomLevel': 10,
          'center': [52.51, 13.4]
        });
      };
    
    }).call(this);
    The code is running on http://snowhere.herokuapp.com/

    There are no errors in the console. I've tested with 4 different browsers and 3 different operating systems so I am fairly sure I've done something wrong somewhere but I can't for the life of me figure out what or where. The PNGs are right there in the DOM, I am just not seeing them on my screen. Chrome also behaves a bit strange when I move to other tabs after visiting the app, but as I am seeing the same happening in other browsers it doesn't seem like an issue with Chrome.

    Any ideas?

  2. #2
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: Having problems with the Quick-Start example in Chrome/Firefox, blank page

    You are invoking the map correctly, it's just that the height and width of the DIV are not set, so the displayed map is 0 x 0 pixels.

    Try altering your DIV this:

    Code:
    <div id="mapContainer" style="width:100%; height:100%; position: absolute;" ></div>
    or use some CSS for styling.

  3. #3
    Registered User
    Join Date
    May 2012
    Posts
    3

    Re: Having problems with the Quick-Start example in Chrome/Firefox, blank page

    Oh. My. Now I feel stupid. Thanks a lot!
    I was going completely blind looking for what was wrong and then it was something that basic. I hope noone I know stumbles over this thread :)

Similar Threads

  1. Tools for quick start with Qt for Symbian
    By mbnoimi in forum [Archived] Nokia Smart Installer for Symbian
    Replies: 6
    Last Post: 2010-02-22, 16:08
  2. Blank Page in S60 but working in S40
    By ravisashank in forum Mobile Java Tools & SDKs
    Replies: 7
    Last Post: 2008-12-10, 11:40
  3. how to create blank setting page ?
    By jawir212 in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-12-29, 08:48
  4. Running the SDK`s Quick Start under Windows XP
    By Nokia_Archive in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2002-05-27, 16:03

Posting Permissions

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