×

Discussion Board

Results 1 to 6 of 6

Hybrid View

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    12

    MH5 right click context menu

    Hi,
    One question please. I realize that the MH5 is tablet optimized, thus it's got a longpress event, but would it be a problem to add (myself even) a right click event too?
    This might be a feature already, but I've not yet figured out how to use it, so a hint or point to documentation URL describing adding the context menu?
    Thanks in advance

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

    Re: MH5 right click context menu

    Hi,

    as you correctly pointed out our targets are touch devices. That means we don't have right click support. Surely you can easely add this mouse event on your own to the canvas.

    Br,
    Leo

  3. #3
    Registered User
    Join Date
    Aug 2012
    Posts
    12

    Re: MH5 right click context menu

    Hi,
    as I can figure mh5 out, it's not that easy, cause the mapclick and maplongpress listener event arguments have no click button distinguishing data within them...or I'm doing it wrong...so I think one can only turn to the mh5.js source code (but I wouldn't want to do anything to it without prior consent from Nokia). Also since it's minified js, is there developer friendly code, a repo to contribute to.
    Thanks in advance.

    P.S.
    Sava river waterway flowing through Belgrade, Serbia is way to small and not colored right in community maps (which are great 99% btw) and good enought to scale to more zoomed out tiles IMHO...

    P.P.S.
    I've re-read your answer, and just realized you kinda had instructed me to hijack the right click within the page first and then transfer that event's data to the mh5 map canvas...if so, any more tips, any would be welcome

    Quote Originally Posted by ZieL View Post
    Hi,

    as you correctly pointed out our targets are touch devices. That means we don't have right click support. Surely you can easely add this mouse event on your own to the canvas.

    Br,
    Leo
    Last edited by ntek; 2012-12-26 at 20:40.

  4. #4
    Registered User
    Join Date
    Feb 2004
    Posts
    1,980

    Re: MH5 right click context menu

    Please go to

    Nokia Maps API Example Get coordinate on mouse click or finger tap
    http://developer.here.net/apiexplore...-on-click.html

    Nokia Maps API Example Add a context menu
    http://developer.here.net/apiexplore...text-menu.html

    for more information.

  5. #5
    Registered User
    Join Date
    Aug 2012
    Posts
    12

    Re: MH5 right click context menu

    Hi r60...
    Please note that I'm asking about using right click context menu for a MH5 framework, and not Nokia Maps API, but thanks for the try.
    People can use their tablets and mobiles with bluetooth and wireless mice today, so not supporting right click seems like a missed opportunity, especially if adding another piece of data to the event argument wouldn't be much of a performance loss IMHO...I will try to however look at the Maps API code for some stuff too...they've got some really neat stuff done.
    Cheers.

    P.S.
    Might be just me now, and the way I used the MH5 map including it into my page, but I think that the .mh5_TextInput form class in mh5 css file is missing width 100% (due to partial hiding of the searched query string) for devices viewing the map and default search bar with Firefox OS maybe? And, as a side note also, why is .html setting font-size, couldn't that have been set somewhere in the map container please (it's messing up my page so I had to cut it, but the buttons are bigger now, as well as all the text in the map).

    Quote Originally Posted by r60600 View Post
    Please go to

    Nokia Maps API Example Get coordinate on mouse click or finger tap
    http://developer.here.net/apiexplore...-on-click.html

    Nokia Maps API Example Add a context menu
    http://developer.here.net/apiexplore...text-menu.html

    for more information.
    Last edited by ntek; 2012-12-28 at 16:19.

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

    Re: MH5 right click context menu

    Hi,

    Happy new year :-)

    Here is an example:

    var map = new nokia.mh5.components.Map({
    listeners: {
    ready: function() {
    nokia.mh5.event.add(map.root, "contextmenu", function(e) {
    e.preventDefault();
    alert("CONTEXTMENU");
    }, true);
    }
    }
    });


    Regarding your question about the font-size. We use rems through all our framework. It allows us and you to be flexible styling apps. That's why we have to set a default font-size in the body.


    Br,
    Leo

Similar Threads

  1. Context Menu
    By rdnobrega in forum Symbian
    Replies: 4
    Last Post: 2009-11-23, 07:37
  2. joystick righ click and left click and right menu option
    By omoshtagh in forum Mobile Java General
    Replies: 3
    Last Post: 2009-03-18, 08:56
  3. IAP edit in context menu
    By Gixxer2 in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-09-26, 14:15

Posting Permissions

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