PDA

View Full Version : Use a tooltip to display a anchored popup



enmala
12 Mar 2012, 5:35 AM
Hi,

for a while I'm using the code next to show an anchored popup over a feature in a map aplication, but after the upgrade from ext 4.0.2a to 4.0.7 that don't work anymore.

my actual code is:


popup = new Ext.ToolTip({
anchor: 'bottom',
autoHide: false,
anchorToTarget: true,
target: event.feature.geometry.id,
html: "some text",
closable: false
});
popup.show();

where event.feature.geometry.id is the HTMLElement id where I want to anchor the tooltip.

After the upgrade I receive the next error:
'undefined' is not an object (evaluationg 'Ext.Layer.superclass.setXY.call')

Any idea how to correct my code?

Thanks in advance,

Enrique

mitchellsimoens
12 Mar 2012, 8:00 AM
Just as a trial, try


Ext.get(event.feature.geometry.id)

enmala
12 Mar 2012, 8:10 AM
I try it, but don't work :(

Thanks