Select to view content in your preferred language

Identify Widget 2.3.2.1

1623
21
06-02-2011 07:31 AM
MikeGarza
Deactivated User
This widget is working great! The only problem I am having is when I first click on the widget I am getting an error #2036. I can hit the OK button and it works fine after that but the error keeps popping up when I start the widget. I have researced the error on this forum and they say it means "the load never completed". 

I used fiddler to trouble shoot and it is telling me that the widget is trying to access the InfoPopup Template.swf. (/SAPWProjectDashboard/widgets/InfoTemplates/InfoPopupTemplate.swf). I checked this folder and the file is there. I am just not sure why this error would be popping up. It never had when I used the identify widget with earlier versions.

As an FYI, I took the uncompiled identifywidget.xml reconfigured it with my layers and placed it under my widget folder. The weird part is that it works just fine after I hit the OK button. Anyone have any thoughts?

Thanks in advance for the help.
Mike G.
Tags (2)
0 Kudos
21 Replies
SethMcCoy
Emerging Contributor
Thanks for the quick response.  One other question for you. I am very new to flex and was looking at the uncompiled code for the widget.  Can additional variables be added in in the same manner as the current ones to handle additional links?  for example a variable linkfield2 or is is more difficult than that?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Seth,

   Yep, a bit more to it than that. But others have done it.
0 Kudos
JesseHopkins
Regular Contributor
Robert,

I am using your Identify Widget for version 2.3.2.1 (Yes I know that I am a little behind on the times with Flex, hope to be upgrading soon), and I am troubles showing photos when using GlobalIDs with an attachment table - GlobalIDs are required for offline photo collection and feature editing.  Being that I am still learning Flex, the solution and/or workaround is currently as clear as mud. Here is the querytask part of the code where I have been trying to work on a solution: 

                                        var queryTask:QueryTask = new QueryTask(tableUrl);

     queryTask.proxyURL = proxyUrl;

     var query:Query = new Query();

            query.text = photoKeyVal;
     query.outFields = new Array(pathField, pathField2, dateField, descrField);
                                         //
     query.returnGeometry = false;
     queryTask.execute(query, new AsyncResponder(onResult, onFault));


For query.text = photoKeyVal where photoKeyVal is set to "ObjectID" it works, but when photoKeyVal is set to the GlobalID the query fails.  I know that, with attachments, it's only possible to query off of the ObjectID from the Feature class, and Attachment ID from Attachment table.  Anyways, if you (or anyone else) could help provide a workaround or solution to my problem it would be much appreciated.

Please let me know if more code samples or a better explanation of my problem is required.

Jesse
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jesse,

    I am have no problem querying a GlobalID field in a query. I really never use the query.text. I would be using
query.where = "GlobalID = '{4E42E2F8-B7EC-423E-BBC9-B27A8A6C1F5C}'"
0 Kudos
JesseHopkins
Regular Contributor
Robert,

I'll go ahead and give that a shot.  I've come to realize that when using query.text, the Text attribute on the rest page fills in, but the query does not work unless I remove the currly brackets "{" fromthe GlobalID.  Anyways thanks for the quick response, this should probably work.


Jesse
0 Kudos
JesseHopkins
Regular Contributor
Robert,

I am so close to getting this code to work correctly, but looks like I need just a little push. Essentially, I'm trying to embed queries in order to display images using the identify widget. GlobalID's are still causing a problem so this is my attempted workaround. There is a very good chance that this code is redundant and could be shortened. 

I'm having troubles getting the function:onResult2 to use the results from queryTask1 AND querytask2 to display an output.

The desired output would be a request URL that shows something like:http://server/company/rest/services/appservices/damage_assessment_2014_Offline/MapServer/0/OBJECTID/... where OBJECTID would be an actual objectid, not the word. 
However, I am getting a request URL of:http://server/company/rest/services/appservices/damage_assessment_2014_Offline/MapServer/0//attachme.... I know that the variable path is not being used in the function because pathField is most likely empty.  Any chance you could offer up some suggestions on how to get the results of both queries in function: onResult2?  The section of code is attached as a text file. 

Thank you

Jesse Hopkins
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jesse,

   No where in your code does it explain where "pathField" or "pathField2" come from or show where it is set... Have you tried to debug your code by placing break points in your code or variable watches?
0 Kudos
JesseHopkins
Regular Contributor
Robert,

I apologize, that was just a section of the widget's code.  Attached is the full code. "pathField" and "pathField2" originate between lines 441 and 476.  I've debuged as much as I could and found that problem lies within the onResult2 function (line 1404), and how I cannot pull the query results from the first query (line 1378) - the function just pulls what was queried last. I'm not sure if you will upload this into FlashBuilder or what, but if so, the warnings on lines 227 and line 588 can be ignored.   Thanks so much for your help.

Jesse
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jesse,

   What version of the viewer are you using? I see that you did not take my previous advice about not using the query.text and switching to the query.where. Does your widget even get to the onResult function?
0 Kudos
JesseHopkins
Regular Contributor
Robert,

I am using version 2.3.1..upgrading eventually.  Both queries run fine and get results (the long URL's in the attachment: query1_2.jpg).  I tried taking your advice, but at the time (before I changed a few things around), I wasn't able to get both queries to work properly.  Now that I have changed a few things, I may be able to use query.where for both.  I also attached is a snip showing the URL result after both queries run. I'd send you to the actual rest page but this application is currently internal.

Thanks,

Jesse
0 Kudos