7 Replies Latest reply: Nov 29, 2012 6:01 AM by Sampath Kumar Branched to a new discussion. RSS

    Issue in extension object expression

    venkatesh kandasamy

      Hi All,


      I created a simple maps extension using Nokia maps. It has 2 dimension (lat and lon) and 2 expression (popupinfo and temp).


      The temp expression is always a constant numeric value. (=1)

      The popupinformation is for displaying popup whenever the user clicks the pin.




      1) if i pass a numeric value in the two expressions, pins are displaying in the map. (this.Data contains some data). but if i pass a string value in any of the two expression, pins are not displaying( this.Data has no records). But if i remove the properties.qvpp file and if i use the default properties page, it is working.


      2) whenever i create any extension object it is refreshing 2 times when initiated. why?



      3) is there any way to access the qlikview variables. for example, i want to assign the zoom level of the map to the qlikview variable.

        • Re: Issue in extension object expression

          I have no answer for your first question.


          The 2-times refresh at initialization is made since the introduction of extension objects into qlikview and has not been corrected, which is awkward since there is never any change between the two refreshes.


          The only way to access a qlikview variable is to use it in a Text or RefValue property of the extension. The API provides a GetAllVariables function (in the Qv.Document object), but it does obviously not work because even the example from the documentation never returns any evaluation of the variable, you can only retrieve name and expression.

          • Re: Issue in extension object expression
            venkatesh kandasamy

            Hi George,


            Thanks for the reply.


            @Qliktech (Eric, Dan, Alex, Brian.....)


            Anything regarding my first query.

              • Re: Issue in extension object expression
                Alexander Karlsson

                I'm guessing you are running SR1? If so it's a known bug.

                The dynproperties file will generate the wrong value for you if you have more then one expression.



                1. Add this line to definition.xml: <PropertiesPage Version="11" File="Properties.qvpp" />

                2. Rename DynProperties.qvpp to Properties.qvpp

                3. Open the file and change

                <div class='prop-grid_span-7 prop-grid_last' style='width:94%;' avq='prop_editexpression:.Chart.Expression.0.1.Definition'></div>




                <div class='prop-grid_span-7 prop-grid_last' style='width:94%;' avq='prop_editexpression:.Chart.Expression.1.0.Definition'></div>


                And you should be up and running again

              • Re: Issue in extension object expression
                venkatesh kandasamy

                Hi Alex and Brian,


                Thanks for the info. Between i noticed one more issue. (this issue is only with this extenstion)


                Whenever i open the document(first time), this extenstion object shows blank. After i refresh the page (F5), the maps are displaying and fine. Again i close the document and reopen it, same issue.  Do you guys know why this is happening?

                  • Re: Issue in extension object expression
                    Alexander Karlsson

                    Ok, I'm probably going crazy...
                    The code below will render the map fine but if I comment out the alert statement the map fails to load...

                    Even stranger is that I can't use jQuery selectors either.


                    Also tried with loading the map package seperatly and using callback functions on sucessful load through nokia.Features.load but no luck.



                    Qva.LoadScript('http://api.maps.nokia.com/2.2.3/jsl.js', function () {
                              Qva.AddExtension('NokiaMaps', function() {
                              var _this = this;
                              var divName = _this.Layout.ObjectId.replace("\\", "_");
                              if (_this.Element.children.length == 0) {
                                        var ui = document.createElement("div");
                                        ui.setAttribute("id", divName);
                                        $("#" + divName).css("height", _this.GetHeight() + "px").css("width", _this.GetWidth() + "px");
                              } else {
                                        $("#" + divName).css("height", _this.GetHeight() + "px").css("width", _this.GetWidth() + "px");
                                        $("#" + divName).empty();
                              nokia.Settings.set("appId", "_peU-uCkp-j8ovkzFGNU");
                              nokia.Settings.set("authenticationToken", "gBoUkAMoxoqIWfxWA5DuMQ");
                              var map = new nokia.maps.map.Display(document.getElementById(divName),{center: [52.51, 13.4],zoomLevel: 10});