Select to view content in your preferred language

Mouse over problem with editor?

624
0
03-13-2014 06:20 AM
HectorChapa
Frequent Contributor
I am trying to use mouse over information but when I add an editor and tell the editor map = {mainMap} the mouse over doesn't work how to fix the issue. Does any have solution to my problem.


 protected function fLayer_graphicAddHandler2(event:GraphicEvent):void
   {
    event.graphic.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverHandler2);
    event.graphic.addEventListener(MouseEvent.MOUSE_OUT, onMouseOutHandler);
   }
   
   private function onMouseOverHandler2(event:MouseEvent):void
   {
       myEditor.map = null;
    var gr2:Graphic = Graphic(event.target);
    gr2.symbol = mouseOverSymbol;
    mainMap.infoWindow.label = gr2.attributes.FirstName + " " + gr2.attributes.LastName;
    mainMap.infoWindow.closeButtonVisible = false;
    myTextArea.textFlow = TextFlowUtil.importFromString("<span fontWeight='bold'>STATE ID: </span>" + gr2.attributes.StateID.toString() + "<br/>"
     + "<span fontWeight='bold'>ADDRESS: </span>" + gr2.attributes.Match_addr + "<br/>"
     + "<span fontWeight='bold'>PHONE: </span>" + gr2.attributes.PhoneNumbe + "<br/>"
     + "<span fontWeight='bold'>COUNTY: </span>" + gr2.attributes.County);
    mainMap.infoWindow.show(mainMap.toMapFromStage(event.stageX, event.stageY));
   }
   
   private function onMouseOutHandler(event:MouseEvent):void
   {
    var gr3:Graphic = Graphic(event.target);
    gr3.symbol = defaultsym;
    mainMap.infoWindow.hide();
   }
 <esri:Map  id="mainMap"  x="0" y="10" height="100%" width="100%"  logoVisible="false" >
  
  <esri:extent>
   <esri:Extent xmax="-1.08446320657E7" ymax="3100223.793400001"
       xmin="-1.09742216352E7" ymin="3006114.7661000006">
    <esri:SpatialReference wkid="102100" >
    </esri:SpatialReference>
    
   </esri:Extent>
  </esri:extent>
  <esri:infoWindowContent>
   <s:TextArea id="myTextArea"
      width="250" height="75"/>
  </esri:infoWindowContent>
  <esri:ArcGISTiledMapServiceLayer url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />
  <esri:FeatureLayer id="points"  />
  <esri:FeatureLayer id="fLayer"
        mode="snapshot"
        graphicAdd="fLayer_graphicAddHandler2(event)"
        outFields="*"
        symbol="{defaultsym}"
        url="http://67.78.127.3:6080/arcgis/rest/services/STEARWEBMAPTEST/FeatureServer/0"/>
  <esri:GraphicsLayer id="myGraphicsLayer" />
 </esri:Map>
 
 <esri:Editor id="myEditor" geometryService="{new GeometryService('http://67.78.127.3:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer')}" 
     updateGeometryEnabled="false"
     map="{mainMap}"
     />
Tags (2)
0 Kudos
0 Replies