I have a dynamic service which I have labeled as 'prop' in my config.xml
drawTool.showDrawTips = false;
Marc, That is the new DrawTool's draw tips and is not controlled by my widget. The only way to change it is to modify the MapManager.mxml and add drawTool.showDrawTips = false;
The reason it shows up on my identify tool is the fact that I am letting the FlexViewer framework handle the mouse interaction with the map .....
I am trying to configure the Identify Widget and have some questions. The problem I am having is when I identify, I guess the way the tool works any and all visible layers show the identify results. It appears these are operational layers and basemap layers. Is there some way similar to the <excludelayer> in the LayerList Widget to prevent some some layers from showing up in the results? Am I doing something wrong?
I am working with Robert's latest Identify widget for Flex Viewer 2.1 and I have modified the code to exclude showing data from layers and fields not defined in the IdentifyWidget.xml configuration file. In the IdentifyWidget.mxml file, down in the function called processIdentifyResults there is a conditional if(IdentFields) which includes an else block. I commented out that entire else block. I believe that IdentFields holds all the fields that come from the configuration file, so blocking out anything not in IdentFields keeps all data not specified in the configuration file from being displayed. You'll need to be using Flash Builder or some other solution to modify and recompile the code, of course.This may not be an elegant solution, and Robert may cringe at it, but it works for me.Marc
//process identify results private function processIdentifyResults(identifyResults:Array):void { if(!identifyArrayCollection) identifyArrayCollection = new ArrayCollection(); for each (var identifyResult:IdentifyResult in identifyResults) { var title:String = identifyResult.layerName; var obj:Object = identifyResult.feature.attributes; var content:String = ""; var fld:String; var value:String; var link:String = ""; var linkicon:String = ""; var identFields:String = ""; var identLinkPre:String = ""; var identLinkField:String = ""; var identLinkSuffix:String = ""; var identLinkIcon:String = ""; var identLinkIconPre:String = ""; var identLinkIconSuffix:String = ""; var identZoom:Number = 0; var identForceScale:Boolean = false; for(var i:int=0; i<configIdentFields.length; i++) { if (identifyResult.layerName == configIdentFields.label) { identLinkField = configIdentFields.linkfield; identFields = configIdentFields.fields; identLinkPre = configIdentFields.linkpre; identLinkSuffix = configIdentFields.linksuffix; identLinkIconPre = configIdentFields.linkiconpre; identLinkIcon = configIdentFields.linkicon; identLinkIconSuffix = configIdentFields.linkiconsuffix; identZoom = configIdentFields.zoomscale; identForceScale = configIdentFields.forcescale; } } if(identFields) { var fldArr:Array = identFields.split(","); for (var f:Number = 0; f < fldArr.length; f++) { try{ value = obj[fldArr].toString(); } catch (error: Error){ value = ""; } if (fldArr.toUpperCase() == identLinkField.toUpperCase()){ //concatenate link = identLinkPre + value + identLinkSuffix; } else if (fldArr.toUpperCase() == identLinkIcon.toUpperCase()){ //concatenate linkicon = identLinkIconPre + value + identLinkIconSuffix; } else { content += fldArr + ": " + value + "\n"; } } } /* else { for (fld in obj) { try{ value = obj[fld].toString(); } catch (error: Error){ value = ""; } if (fld.toUpperCase() == identLinkField.toUpperCase()) { link = value; } else { content += fld + ": " + value + "\n"; } } } */ var idResult:IdResult = new IdResult(); idResult.icon = widgetIcon; idResult.title = identifyResult.layerName; idResult.content = content; if(link!="") idResult.link = link; idResult.point = identifyPoint; idResult.geometry = identifyPoint; idResult.zoomScale = identZoom; idResult.zoom2msg = zoom2Msg; if(linkicon!="") idResult.linkicon = linkicon; idResult.forceScale = identForceScale; identifyArrayCollection.addItem(idResult); } clearMessage(); }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.