Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am building annotation features with Python/comtypes/ArcObjects. The annotation works great in ArcMap (10.1), but it is does not draw when published to a map service in ArcGIS Server. Each piece of annotation consists of one or more graphic shapes (GraphicElement), usually rectangles, and one or more graphic text objects (TextElement) on top of those graphics, all grouped together in a GroupElement. The GroupElement is what is stored in the annotation. The image below shows three pieces of annotation, two with graphic rectangle backgrounds and one containing only a TextElement. We thought the problem was with the custom font that contains the arrow characters, but that seems to be fine. The screen shot is from ArcMap. When the annotation you see here is published to a map service, only the plain annotation feature without the colored background draws in the service. The more complex annotation does not, so the problem would appear to be with the presence of both GraphicElement and TextElement objects in the same annotation feature or with the fact that the element stored is a GroupElement. (As far as I know, an annotation feature can only store a single element, hence the grouping of all the components first.)

enter image description here

Might anyone have some insights as to why the complex annotation is not drawing? When I started, many moons ago, to build the scripts to make the annotation this way, there was no intention, at least on my part, to deploy any of this on a map service. In fact, I know little about map services and their particular idiosyncrasies. I was writing strictly for data production in ArcMap to fill a need for building and storage of specialized graphical information in a geodatabase. The annotation solution worked so well that the powers that be have now run with it and are trying to use the annotation in map services and web apps. I am way outside of my comfort zone here, as my scripts have been converted to .NET and deployed in web apps, and I haven't had much to do with any of that. What I know is that the annotation works wonderfully in ArcMap but doesn't in a map service. Any ideas here would be much appreciated.

UPDATE: I don't have access to the map service in question here, and my boss is doing the testing here and there between flights. My information is rather second hand; however, I might have another clue. (What it means, I'm not sure). There are other annotations that do render OK. One type is "graphic-only" built from multiple graphic shapes that are grouped together and stored in the annotation. The other is stop signs. These signs are built from one graphic shape and one text box containing the word "STOP." The difference between the stop sign and the other complex annotation features already discussed (which do not render) is that the text box uses only one font, Arial to be exact. The non-rendering complex annotations access both Arial (for the letters) and our custom font (for the arrows and other symbols). So, the annotations that are not rendering are the ones (1) built from both graphics and text boxes and (2) where the text boxes access multiple fonts. Both these conditions are necessary apparently to cause non-rendering. The plain annotation in the screenshot - which does render correctly - accesses both fonts but does not have a graphic. (Unfortunately, most of our annotation meets the above two non-rendering criteria.)

Also, I have seen one maybe solution that involves moving the annotation layer to its own service using ArcGISDynamicMapServiceLayer. Does this make any sense to anyone?

UPDATE 2: After much testing and some expert help from ESRI through the forums, a cause for the map service misbehavior was found. It appears that an ESRI optimized map service cannot handle nested groups, i.e. groups within groups. The ESRI programmer who helped me is of the opinion that this shortcoming is a bug and is going to try to register it as such. I will next try to build our annotation without grouping any graphics until finally grouping all of them together after all parts are constructed. That way there is only the one overall GroupElement for the whole sign that is required for storage in the annotation. I'll update again with my results.

share|improve this question
1  
Are the fonts used by the annotation installed on the server? –  Kirk Kuykendall Mar 21 '13 at 14:31
    
Yes, the fonts are installed on the server. The map service seems to be seeing them OK, too, because the plain annotation feature in the above screenshot does draw in the service. It's the complex ones that don't. –  celticflute Mar 21 '13 at 15:40
    
Just a thought, might it have something to do with the fact that, in the complex anno features, the TextElements are inside a GroupElement and in effect "hidden" from the map service? ArcMap doesn't have a problem with this arrangement, but maybe the map service does. –  celticflute Mar 21 '13 at 16:24
    
See my update to my original post above. Clue? (Who knows.) –  celticflute Mar 21 '13 at 19:21
2  
I'd say move edit 3 to an answer, perhaps adding a NIM code if they gave you one, and check it as the accepted answer. –  Kirk Kuykendall Apr 1 '13 at 18:15

1 Answer 1

up vote 3 down vote accepted

[Originally posted as Update 3] The programmer at ESRI found the fix for the bug, and the fix is now in the pending 10.2 release (whenever that might be). So, ESRI optimized map services will be able to handle nested groups in annotation ... as of 10.2.

I hate to answer my own question, but I hope at least that the information will be useful to others.

share|improve this answer
    
Sorry, I didn't receive any NIM code for the bug, but I will try to track one down. –  celticflute Apr 2 '13 at 3:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.