I have one points layer in a cached map service, symbolised with a unique renderer on one field.
e.g. petrol stations, symbolised by the company who owns them.
One of the main components I need to have on this application is a dynamic legend that shows a feature count for the current extent.
e.g. Shell - 34, BP - 21, Texaco - 7, etc
Has anyone seen any code that could get me started on this or can provide some references/pseudocode on how one would go about this?