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.
I want to create a fairly basic application in the Esri Javascript API (or potentially with the Google Maps API, and this).
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?