Opened 15 years ago

Closed 10 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:


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)

MgLayerGroup_SetExpandInLegend.patch (1.7 KB ) - added by jng 13 years ago.
MgLayerGroup_SetExpandInLegend.2.patch (1.7 KB ) - added by jng 13 years ago. (5.2 KB ) - added by jng 13 years ago.
Simple PHP invoke URL test command

Download all attachments as: .zip

Change History (12)

comment:1 by tomfukushima, 15 years ago

Cc: chrisclaydon trevorwekel added

comment:2 by tomfukushima, 15 years ago

Cc: brucedechant added

comment:3 by jbirch, 13 years ago

Version: 2.0.1

Removing version from enhancement request. If this enhancement request has been addressed or is no longer required, please close ticket.

comment:4 by jng, 13 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 tomfukushima, 13 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?

by jng, 13 years ago

Attachment: added

Simple PHP invoke URL test command

comment:6 by jng, 13 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 jng, 13 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 trevorwekel, 13 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.

comment:9 by jng, 10 years ago

Resolution: fixed
Status: newclosed

Fixed r7137

Note: See TracTickets for help on using tickets.