Opened 13 years ago

Closed 13 years ago

#437 closed defect (fixed)

Tooltip support for all maps in MapGroup

Reported by: jng Owned by: madair
Priority: P2 Milestone: 2.2
Component: Widgets Version: 2.2 - RC1
Severity: Major Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

If you modify the Map Definitions in the sample appdef in #428 so that each Map Definition will contain at least one Layer Definition with tooltip information, only the tooltip information from the first map of the MapGroup will be processed.

This is because in Line 1422 of Map.js

getMapTip: function(oMapTips) {
    //TODO send this to the correct aMap object
    this.aMaps[0].getMapTip(oMapTips);
},

It only sends the maptip to the first map of the group, instead of all the maps in the group.

Attached is a patch that will do the following:

  1. Pass the tooltip information to each map of the group.
  2. Guard against passing tooltip information to a map in the group that has no visible layers.
  3. Add an extra guard in the _display() function that disregards any future MAP_MAPTIP_REQ_FINISHED events while the tooltip is still displayed. This is a cheap workaround for the fact that without the guard, the tooltip for the topmost map in the group will be shown, but will be instantly replaced with the tooltip from the map below it.

With this patch, tooltips from both maps in the group can be displayed. If the mouse pointer can produce a tooltip in both maps, only the tooltip for the topmost map will be displayed.

Normal app defs (containing only one MapGuide map in a MapGroup) still function as they were with this patch.

Attachments (1)

fusion_tooltips.patch (2.3 KB ) - added by jng 13 years ago.
Patch to support tooltips in all maps of a mapgroup

Download all attachments as: .zip

Change History (2)

by jng, 13 years ago

Attachment: fusion_tooltips.patch added

Patch to support tooltips in all maps of a mapgroup

comment:1 by madair, 13 years ago

Resolution: fixed
Status: newclosed

fixed at [2355] in 2.2 brnach, thanks for the patch!

Due to changes in the layer structure, the patch is applied slightly differently in trunk, but does loop through all Maps.

Note: See TracTickets for help on using tickets.