I have a query to get features and draw them as polygons on graphic layer. The number of graphics can be in a range from 10 up to 2000. Now I need to label these graphics, I can think of two options here:
1. turn the map service on, using definition query and setting visible layers to just show the labels for those graphics. the problem is that the labels are beneath the graphics and that could cause them hard to read.
2. using GeometryService's labelPoints to return the label position for each graphic and then draw text using one of graphic's attribute at that position. I am not sure how the performance will be. Also, if I send all graphics together to the geometry service, are the returned label points in order? Or I have to do some work on client side to find which point belongs to which graphic? Another problem of this approach is it's hard to determine the text size at various scale.
3. I'd love to know if it's possible to do all the work on the client side. Finding the center point of the graphic and then just draw the text.
Has anybody done similar work before and want to share the experience? All suggestion are highly appreciated.
thanks
xiaoming
Prince William County, VA