Select to view content in your preferred language

Creating custom feature layer

2179
10
10-14-2010 07:39 AM
StephenDavis
Emerging Contributor
for reasons that I posted here: http://forums.arcgis.com/threads/14319-Clustering-fails-using-FeatureLayer-OnDemand-with-1-000-featu...

I would like to create my own feature layer that supports an on demand mode.  I have created a new class deriving from graphicslayer and put in the methods to query for new features as the map extent changes.

The problem is that I don't know of a good way to find out the map extent has changed other than responding to the extentchanged property on the map and refreshing an extent property on my custom map.  While that works, I don't want to have to tell people who use this new type of layer that they have to manually update the extent on the layer from the extent changed event or bind to the map's extent property.

Is there an exposed property or method on the graphics layer where the map makes it aware of an extent change, or a way I can bind to the map without having to make the developer do anything but put the layer in the layers collection of the map?

Does anyone know how this is done in the existing feature layer?  It seems to just know the extent, unless under the hood of the map there is some code keeping an extent property updated on the feature layer object.

Any help would be greatly appreciated.  Thanks!
Stephen
0 Kudos
10 Replies
dotMorten_esri
Esri Notable Contributor
0 Kudos