×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2013
    Location
    Santa Tecla
    Posts
    5

    Angry Why is not working Nokia Here HTML5?

    I have followed all the example from: Nokia Here HTML5 This is the code from the example that I read:
    Code:
    <html>
            <head>
                    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
                    <!-- You should also add the following meta tags to support Blackberry 7.0+ devices -->
                    <meta name="HandheldFriendly" content="True">
                    <meta name="touch-event-mode" value="native">
                    <meta name="cursor-event-mode" value="native">
                    <!-- To disable address sniffing and prevent native maps from starting, use the following meta tags -->
                    <meta name="format-detection" content="telephone=no"/>
                    <meta name="format-detection" content="address=no"/>
    <!--            <link rel="stylesheet" href="http://api.maps.nokia.com/mobile/1.0.2/lib/mh5.js">-->
                    <link rel="stylesheet" href="http://api.maps.nokia.com/mobile/latest/lib/colors.css">
    <!--            <script src="http://api.maps.nokia.com/mobile/1.0.2/lib/mh5.js"></script>-->
                    <script src="http://api.maps.nokia.com/mobile/latest/lib/mh5.js"></script>
            </head>
            <body class="mh5_hwacc_body">
                    <div id="app_location" style="width:320px; height:480px; position:relative;"></div>
                    <script>
                            nokia.mh5.assetsPath = "http://api.maps.nokia.com/mobile/1.0.2/lib/";
                            nokia.mh5.app.embed({
                                    domNode: "#app_location",
                                    appId: "_peU-uCkp-j8ovkzFGNU",
                                    appCode: "gBoUkAMoxoqIWfxWA5DuMQ"
                            });
                    </script>
            </body>
    </html>
    I don't know why is not working only shows a white screen. And I have another question with Nokia Here HTML5 is able to add markers and clustering as JS option?

  2. #2
    Nokia Developer Moderator
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: Why is not working Nokia Here HTML5?

    You need to make sure that the <script> initialising the mh5 container is called after the <body class="mh5_hwacc_body"> has been initialised. It would also help to include the doctype element as well. If you run your example in Chrome and check the error statements you can see that is attempting to append items into the body of the DOM the when it is still null. The quick start example (appended below) works fine.

    Code:
    <!doctype html>
    <html>
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0,
    	maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" 
    	href="http://api.maps.nokia.com/mobile/1.0.2/lib/mh5.css">
    <link rel="stylesheet" 
    	href="http://api.maps.nokia.com/mobile/1.0.2/lib/colors.css">
    </head>
    <body class="mh5_hwacc_body">
    <script src="http://api.maps.nokia.com/mobile/1.0.2/lib/mh5.js">
    	</script>
    
    <div id="app_location"
    	style="width: 320px; height: 480px; position: relative;">
    </div>
    
    <script>
    	nokia.mh5.assetsPath = 
    		"http://api.maps.nokia.com/mobile/1.0.2/lib/";
    
    	nokia.mh5.app.embed ({
    		domNode: "#app_location",
    		appId: "_peU-uCkp-j8ovkzFGNU",
    		appCode: "gBoUkAMoxoqIWfxWA5DuMQ"
    	});
    </script>
    </body>
    </html>
    Use the addPOI() method described here to add markers to the map.

    Clustering is not a standard feature of MH5 - it is a framework, not an API - works best within the its own use case - i.e. rapid cross-platform mobile development for "search for X, route for X ,add markers for X" and drill down to give an infobubble or new page. Where X is supplied by your data.

  3. #3
    Registered User
    Join Date
    Jun 2013
    Posts
    2

    Re: Why is not working Nokia Here HTML5?

    call following script inside body tag
    <script src="http://api.maps.nokia.com/mobile/latest/lib/mh5.js"></script>

Similar Threads

  1. Use HTML5 and canvas
    By shinobi86 in forum [Archived] Maps API for Javascript
    Replies: 1
    Last Post: 2013-03-25, 13:27
  2. HTML5 apps..
    By mrrekcuf in forum Nokia N9
    Replies: 4
    Last Post: 2011-09-16, 14:25
  3. html5 onclick
    By Meins in forum Qt
    Replies: 1
    Last Post: 2011-07-07, 10:22
  4. Bluetooth connection working in emulator, but not working on Nokia E52
    By voroske.julia in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2011-05-30, 13:01

Posting Permissions

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