Hey everyone,
I recently found a widget that Robert S. had created to search a layer on date ranges, however I am having issues trying to get the zoom and ping functionality working. I'm not the most adept in the Flex department, however I managed to upgrade the code and make the necessary changes to get it working (pre 4.0 sdk). That being said, this thing is archaic, and there may be a decent amount of code that is just not needed. Anyways,I attached a few images that may help show the basic functionality of the widget; on the second image I circled the buttons that are not functioning correctly. Also attached is the .mxml.
Thanks,
Jesse
No, unfortunately clicking on the record does not zoom either. That's pretty much all I need too. Anyways, attached is the RecordDataB.mxml file.
Does just clicking on the result zoom? Can you attach the com.esri.viewer.components.RecordDataB for me to look at?
Hi Robert,
Ha yeah I forgot to un-comment that out, however, even with that it still doesn't work properly. It seems that nothing on the results tab (top right corner - circled in second image) wants to work.
Jesse,
From the looks of your code the zoomAndHighlight portion has been commented out!
/*private function zoomAndHighlight(infoData:Object):void //does not work { //showHighlight(infoData); setMapExtent(infoData, graphicsLayer.graphicProvider as Array); }*/ private function zoomToFeature(event:AppEvent):void //does not work { // Check to see if the event was fired by results from this widget if (!event.data.widget || event.data.widget.toString() != widgetTitle) return; if (recAC && recAC.length > 0) { var index:Number = recAC.getItemIndex(event.data); if (index != accordion.selectedIndex) { accordion.selectedIndex = index; //set the container scrollbar to show all of this record var header:mx.controls.Button = accordion.getHeaderAt(index); var headerHeight:Number = header.height; resultsViewport.verticalScrollPosition = accordion.y + accordion.selectedChild.y - headerHeight; } } //zoomAndHighlight(event.data); }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.