Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2691 closed defect (fixed)

Link between buttons and Element

Reported by: assefa Owned by: assefa
Priority: normal Milestone: 5.4 release
Component: Output-SWF Version: unspecified
Severity: normal Keywords:
Cc: dmorissette

Description

This was reported on the mapserver list by marieeve16@…:

I am using MapServer to generate Flash (.swf). It generally works well, my shapes are generated and I get my events by ElementSelected, and my attributes in the Element object of the generated swf.

But, there is one thing that I can't get: the ID associated to a button or to one of the shapes. For example, I have an object with the id "15", the name "Montreal" and the value "10". In "Element", I have all those informations, but I don't know what button is associated to id 15... (in my case, with tests I know that "button164" is associated to my id 15, but how can I know that dynamically?)

What I would like to have is, either an "buttonId" attribute in "Element", either an attribute "associatedId" in the button. Is there something like that in MapServer?

If it doesn't exists, is there an other way to have that like between my data in Element and the generated buttons?

Attachments (1)

bug2691.diff (2.6 KB ) - added by assefa 16 years ago.
patch to change the names of the buttons

Download all attachments as: .zip

Change History (6)

comment:1 by assefa, 16 years ago

One possible was of quickly achieving this is would be for the buttons names to reflect the layer and shape they are associated with; so for example a button name would look like button_layerid_shapeid (ex button_2_44 would represent the element 44 on layer 2).

by assefa, 16 years ago

Attachment: bug2691.diff added

patch to change the names of the buttons

comment:2 by assefa, 16 years ago

Status: newassigned

committed in trunk: r7836.

Will wait tests from user before closing.

comment:3 by assefa, 16 years ago

Resolution: fixed
Status: assignedclosed

tested. works. closing.

comment:4 by dmorissette, 16 years ago

Cc: dmorissette added

comment:5 by pianosnake, 16 years ago

Tested with ming 0.2 and it works. The new button names are great for referencing buttons from the ElementSelected function called by each mouse event.

Note: See TracTickets for help on using tickets.