Closed csmoore closed 8 years ago
@jeconley - sorry this is a somewhat complicated one, but we were wondering if you can add this CR as a 1.3 request. This is for the Pro SDK so I'm not sure if there is anything we need to do differently.
@tlauver - can you also look this over (& feel free to edit the original issue if you notice any errors)
@csmoore We will take a look. I will talk to @mbriat and make sure it is feasible.
@jeconley - thanks again - I was hoping this issue/work would be related to and/or able to be combined with the work to get 3D images and rotation working by treating these markers as a single discrete/cached image (like I believe Runtime does)
CR331592 has been added.
Additional information from Charlie Macleoad regarding the best approach for adding this to SDK: We have a capability for symbol preview already on the style item so we definitely want to use that. The trick, if you will, is getting “the” symbol to preview. We already have a static factory class “SymbolFactory” that is capable of generating symbols so we will modify ~that~ to be capable of generating a symbol for a dictionary renderer. The generated symbol would be passed to the Style Item (via SymbolStyleItem) to generate a preview (at the correct resolution – not low res – MarcO thinks that is a bug).
Changing the renderer (eg to add the GeneratePreview method) has ramifications for the other renderers and would look odd just being on the dictionary renderer. The ideal implementation probably has ~all~ renderers being capable of generating a preview but that is beyond this scope and is more an issue for us on the Pro side to figure out for future releases. SymbolFactory is a convenient place to expose this capability without us having to deal with the larger issue of supporting preview on other renderers at 1.3.
@jeconley - many thanks for the update & CR - changing the design/implementation sounds fine. The original method/example was mainly to motivate the user requirement of being able to generate a high-res preview for a composed(with all its parts-frame, icons, etc.) military symbol.
We have a workaround for this (just draw them from the source SVGs ourselves) - but we do feel this will be an important end-user requirement so wanted to get this in the queue.
Fix has been installed and will be available in build 5717 or later. @csmoore when the build is available can you verify that everything is working as expected. I am not able to easily verify this and will need someone to do the testing so I can verify the CR. Thanks.
Sure - I'll give it a test out early this week (hopefully today) - thanks for getting this in & letting us know
This has been added to Pro 1.3 SDK - we have a separate issue (Update Added CR# - CR 340886) raised to be able to export images >64 pixels but we can close this one
Our military symbol SDK users often have the need to create a “Complete Preview Symbol” for military symbols
*
. These are useful for a number of Military Symbol scenarios that don't involve drawing on a map - for example:*
Note: A Military Symbol is a CIMDictionaryRenderer CIMSymbol (a multilayer CIM symbol that has multiple parts instead of just the single style component)In order to accomplish this, we would like to propose adding a method to ArcGIS.Core.CIM.CIMDictionaryRenderer :
To allow a Pro SDK user to export a complete CIMDictionaryRenderer Symbol Preview/Image
This is similar to the current ArcGIS Runtime Client SDK requirement/capability SymbolDictionary.GetSymbolImage - Runtime SDK Documentation for this in WPF, [Java](http://resources.arcgis.com/en/help/runtime-java/apiref/com/esri/core/symbol/advanced/SymbolDictionary.html#getSymbolImage%28java.lang.String, int, int%29)
Here is a complete code sample of using this proposed method:
Here is an example of the difference between complete CIMDictionaryRenderer symbol/preview and just a StyleItem symbol/preview:
We realize that a MapControl capability may be added to the Pro SDK at 10.3, but we still feel that having the ability to export an ImageSource will greatly simplify and enhance the SDK user experience for this scenario. This capability may also be part of the 3D billboard implementation/fix
One Additional Note: during testing we tried StyleItem.GeneratePreview(StyleItem item, int patchHeight, int patchWidth) and we were unable to get higher resolution images with the CIM Style components - this always returned a low res image (shown in the image above).