Select to view content in your preferred language

Does a featureLayer, based on a featureCollection, support onMouseOver?

728
1
Jump to solution
03-14-2013 10:06 PM
StephenLead
Honored Contributor
I'm creating a featureLayer based on a featureCollection, as described at http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/featurelayer.html#FeatureLayer/FeatureLayer...

This page notes that a featureLayer based on a featureCollection has certain restrictions, compared to a "full" featureLayer.

Does this featureLayer support onMouseOver access to the graphics, as described under GraphicsLayer onMouseOver, which states:
The returned object contains screenPoint, mapPoint, and Graphic.


I'm finding that the evt object does not contain access to the graphic, as shown in this example script, which builds up a featureLayer based on a query which creates a featureCollection.

Put a breakpoint on line 77, hover over the purple polygon and note that evt.graphic does not exist. Any easy workarounds to get access to the graphic at this point? I just need to know its OID.

Thanks,
Steve
0 Kudos
1 Solution

Accepted Solutions
StephenLead
Honored Contributor
User error. Although Firebug doesn't list .graphic as a property of evt, it's there if you type if manually.

View solution in original post

0 Kudos
1 Reply
StephenLead
Honored Contributor
User error. Although Firebug doesn't list .graphic as a property of evt, it's there if you type if manually.
0 Kudos