Zum Hauptinhalt gehen

HTML5 Geocortex Commands

Kommentare

7 Kommentare

  • Permanently deleted user

     

    After some further testing the following syntax works in a button handler that is bound to the html:

    this.app.commandRegistry.command("ZoomToExtent").execute(extent);

    However inside the handler i am calling the esri queryTask function and it would appear that the 'this' is going out of scope when the callback function is reached.  

    Not sure how to fix this?

     

     

    0
  • Permanently deleted user

    If i create a variable to capture this and then nest the callback inside the main handler then it works.

    ie

     

    var _this = this;

     

    queryTask.execute(query, showResults);  

     

               function show(results) {        

                              var extent = results.features[0].geometry.getExtent().expand(1.5);                       

     

                              _this.app.commandRegistry.command("ZoomToExtent").execute(extent);

     

                      

     

                  }

     

     

    There must be a way to register a callback function somewhere?

     

    0
  • Permanently deleted user

    try 

    queryTask.execute(query, this.showResults.bind(this));  

     

    Colin

     

    0
  • Permanently deleted user

    A word of caution: "bind" is not supported in IE8. You might consider using dojo.hitch  instead.

    http://dojotoolkit.org/reference-guide/1.7/dojo/hitch.html

     

    0
  • Permanently deleted user

    .bind works.

    I will look into the dojo hitch method as well.

    Thanks for the tips Colin and Alejandro!

    0
  • Permanently deleted user

    Or better yet Latitude could implement the attributeSearch URL parameter from GVS!!

    0
  • Permanently deleted user

    Hey, can someone confirm that this is correct and that attributeSearch is in fact not suported in HTML5 viewer?  If so, then the online documenation needs to be corrected by Latitude since it  implies that attributeSearch is indeed supported by BOTH by the Silverlight (GVS) and HTML5 (GVH) viewers (see screenshot below):

    http://support.geocortex.com/how-to-perform-an-attribute-search-from-a-url

    /customer/servlet/servlet.FileDownload?file=00P6000000em22iEAA

     

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.