×

Discussion Board

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

    Callback for loaded page, poi performance and view parameters location

    Hi, i've got a couple of questions.

    1.
    For an app need to modify the data in the interface once a new view is loaded. Among others, I want to create a new interface for selecting map type among others. So when the new view is loaded, I want to add an 'active' class to the loaded map interface select element. Is there a callback function for a loaded page?

    2.
    Added points of interests take a lot of time to process when compared to shapes. When adding +- 300 shapes, the time it takes to process that (locking map interaction while doing so), is around 5-30 ms. When adding +- 300 shapes and 600 pois, the process time is around 1200-6000 ms.
    I've tried using the (expirimental) pois property and the createPoi function, both seemed to perform just about the same. Is there a way to speed up this process?

    3.
    The documentation on the switchTo function names a viewParams array. Where can I read the contents of this array?
    edit: Seems to be nokia.mh5.app.controller.current.page.model.data . Not immediately accessible through the build callback though.

    On a more general note, the mh5 framework seems to be really specialized for just the mapping application. This makes the creation of more generic apps a bit difficult. For example, info bubble's provide the functionality to only have the lines specified. Poi's are quite interactive out of the box while you have to build that functionality for shapes. Still loving working with the mh5 framework, but sometimes I feel like I have to find workarounds to have the functionality I need.
    Also, it would be fun to have a gallery or something of apps people have already made with this framework. I'm curious as to how other people are using this.

    As always,

    Thanks in advance!

    Addition:
    I need data from a clicked image. Neither the 'this' object nor the event data gives me the data-... parameters in a way that is cross browser compatible.
    Edit: Nvm the addition, found a workaround :P
    Last edited by guard1an2; 2013-01-29 at 23:13.

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2012
    Posts
    65

    Re: Callback for loaded page, poi performance and view parameters location

    Hi,

    1. Every page has a function visibleDidChange that is called if the page is shown/hidden ("visible" property of the page is udpated):

    visibleDidChange: function(visible, oldVisible) {
    }

    You can find more details in our documentation. http://developer.here.net/mobile_js. Click "User guide"->"Advanced" on the left hand side menu and scroll down to "MVC (Model-View-Controller) and MH5" section.

    2. Yes we aware of this problem and are going to take a look into it.

    3. There is not defined structure of this parameter. It depends on the page you want to switch to. Basically that's the start parameter for a new page which usually represent its model. E.g. if it's a route page showing a route from A to B then the parameter should contain coordinates and names of A and B.
    Again take a look at the "MVC (Model-View-Controller) and MH5". It should give a basic understanding of the app flow.
    If you mean a special page from the framework let me know which page you mean and can provide more specific data.

    Regarding your general note. MH5 indeed was created for mapping applications. But I don't see why you couldn't use it for building general applications. The app concept is built based on pages which could contain whatever content you want. Of cause MH5 is just at the beginning and doesn't provide so much funcitonality as Sencha or other API.

    BTW the infobubble has "image" property. Just draw your content on HTMLCanvas and assign this one to the image property when you create an infobubble. Look at "User guide"->"Examples" and scroll down to Infobubbles :

    new nokia.mh5.components.InfoBubble (poi, {
    image: testCanvas,
    listeners: {
    click: function (e) {
    alert (e)
    }
    }
    }, function (b) {
    ...
    });

    Br,
    Leo

  3. #3
    Registered User
    Join Date
    Dec 2012
    Posts
    10

    Re: Callback for loaded page, poi performance and view parameters location

    Thanks for your help!
    Last edited by guard1an2; 2013-02-04 at 02:12.

Similar Threads

  1. Low performance with dynamically loaded components
    By pixsta in forum [Archived] Qt Quick
    Replies: 0
    Last Post: 2011-10-17, 06:39
  2. Capture click event on buttons in an html page loaded using browser control
    By curiouswalker in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2010-07-26, 03:12
  3. View switching on DLL callback
    By deepchand86 in forum Symbian
    Replies: 5
    Last Post: 2008-12-27, 05:43
  4. How to obtain loaded page from Browser Control API
    By kasuga in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-01-03, 06:33
  5. Page cannot be loaded
    By Nokia_Archive in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2002-05-15, 16:45

Posting Permissions

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