×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    1

    Question how to add a rich bubble to a Poi?

    From this example(Link) it seems that we can add a rich bubble with Rank, left image, right image to a poi.
    But when I want to do it like that, it doesn't work:
    Code:
        var poitmp = map.createPoi(
                            img, {
                        longitude: item.lon,
                        latitude: item.lat,
                        name: "SSID:" + item.name,
                        more: "where maps are made",
                        ratingValue: 4.5
                    });
                    nokia.mh5.components.InfoBubble(poitmp, {
                        content: ["title","description","rating"],
                        left: img,
                        leftDelimiter: true,
                        right: img,
                        rightDelimiter: true,
                        listeners: {
                            click: function() {
                                alert("main")
                            },
                            leftclick: function() {
                                alert("left")
                            },
                            rightclick: function() {
                                alert("right")
                            }
                        },
                        maxWidth: 340
                    }, function(b) {
                    });
    Is there some wrong I have made or how to add a custom bubble to a poi?

    Thanks!

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

    Re: how to add a rich bubble to a Poi?

    Hello,

    you can specify an infobubble in the map configuration for all pois, like

    Code:
              var map = new nokia.mh5.components.Map({
                    appId: "demo_wwzrmoloHAFVvyW",
                    appCode: "Vgl_08RQWnjJo92Lw1F_uQ",
                    center: {
                        longitude: -58.4,
                        latitude: -34.6
                    },
                    infobubble: {
                        content: ["title","description","rating"],
                        left: nokia.mh5.assetsPath + "img/categories/02_02.icon.mh5.basic.png",
                        listeners: {
                            click: function(e){},
                            leftclick: function(e){},
                        }
                    }
                });
    If your intent is to open the infobubble without any user interaction you can use showInfobubble function like I do in the following example:

    Code:
    var map = new nokia.mh5.components.Map({
                    appId: "demo_wwzrmoloHAFVvyW",
                    appCode: "Vgl_08RQWnjJo92Lw1F_uQ",
                    center: {
                        longitude: -58.4,
                        latitude: -34.6
                    },
                    infobubble: {
                        content: ["title","description","rating"],
                        left: nokia.mh5.assetsPath + "img/categories/02_02.icon.mh5.basic.png",
                        listeners: {
                            click: function(e){},
                            leftclick: function(e){},
                        }
                    },
                    listeners: {
                        ready: function() {
                            var poi = map.createPoi(nokia.mh5.assetsPath + "img/categories/02_02.icon.mh5.basic.png", {
                                latitude: map.center.latitude,
                                longitude: map.center.longitude,
                                name: "My Name",
                                description: "where maps are made",
                                ratingValue: 4.5
                            });
                            map.showInfoBubble(poi);
                        }
                    }
                });
    Best regards,

    Leo

Similar Threads

  1. Need a call bubble example...
    By enigma_007 in forum Symbian
    Replies: 5
    Last Post: 2009-09-15, 10:41
  2. Call Bubble like window.
    By valexey in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-01-13, 18:39
  3. How to create bubble dialog?
    By somowo in forum Symbian
    Replies: 2
    Last Post: 2007-11-23, 06:04
  4. How to create call bubble?
    By lss0986 in forum Symbian
    Replies: 1
    Last Post: 2007-01-19, 09:40
  5. Notification bubble
    By httpworks in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-11-14, 06:36

Posting Permissions

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