Opened 16 years ago
Closed 12 years ago
#655 closed enhancement (fixed)
API needs MgLayerGroup SetExpandInLegend Method
Reported by: | amorsell | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | Web API | Version: | |
Severity: | minor | Keywords: | |
Cc: | chrisclaydon, trevorwekel, brucedechant | External ID: |
Description
The API has an MgLayerGroup GetExpandInLegend method, but there is no SetExpandInLegend method. When programmaticly creating a new layer group, having it expanded when the legend refreshes is often desirable and there is currently no way to do this. A good example can be seen in the Modifying Maps and Layers section of the developers samples. When adding any new layer to the map, the resultant Analysis group is collapsed each time and then has to be manually expanded by the end-user.
Attachments (3)
Change History (12)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
Cc: | added |
---|
comment:3 by , 15 years ago
Version: | 2.0.1 |
---|
by , 14 years ago
Attachment: | MgLayerGroup_SetExpandInLegend.patch added |
---|
by , 14 years ago
Attachment: | MgLayerGroup_SetExpandInLegend.2.patch added |
---|
comment:4 by , 14 years ago
I've attached a patch which simply moves the SetExpandInLegend() method from the INTERNAL_API section to the PUBLISHED_API section, thus exposing it to SWIG.
The 2nd patch is just a "cleaner" version of the first one.
comment:5 by , 14 years ago
Hi Jackie, to help whoever looks at this...what kind of testing did you do so far to check whether this works or not?
comment:6 by , 14 years ago
Hi Tom,
I wrote a simple PHP invoke URL command that uses the (made public) SetExpandInLegend() API. It is attached here (along with a mgp containing the weblayout with this command)
When you run the command it will add a new layer group to the legend which is initally expanded. If you comment out the SetExpandInLegend() call and run the command again (on a fresh map), the new layer group is added to the legend but is not initially expanded (the old behaviour)
comment:7 by , 14 years ago
The effect of this API change on other PlatformBase implementations like AutoCAD Map is unknown for obvious reasons (I am not an Autodesk developer) :D
comment:8 by , 14 years ago
MgLayerGroup has not changed since 2006. The SetExpandInLegend() may have been excluded from PUBLISHED_API for a compatibility reason with the DWF viewer. From what I recall (really ancient history and Walt might remember more) only certain state changes could be propagated through eMap DWF. This may have been one of them.
As far as I know, we do not support eMap DWF anymore so this change is probably safe assuming it does not do something bad to AutoCAD Map.
Removing version from enhancement request. If this enhancement request has been addressed or is no longer required, please close ticket.