[mapguide-users] Re: OnSelectionChanged in AJAX viewer?
SriRam007
binod_tripathy at yahoo.co.in
Tue Apr 13 07:15:43 EDT 2010
Hooking OnSelectionChanged is working
**************Working**************
var mapFrame = null; // A reference to the map frame
var originalMapFrameOnSelectionChanged = null; // storage for the
original onSelectionChanged function
function OnSelectionChanged() // when something is selected on the map
{
//debugger
var count = viewerFrame.GetMapFrame().GetSelectedCount();
alert(count + " features selected");
originalMapFrameOnSelectionChanged();
}
function InitDocument()
{
//debugger
mapFrameRef = frames[0].frames[1];
originalMapFrameOnSelectionChanged =
mapFrameRef.parent.OnSelectionChanged;
mapFrameRef.parent.OnSelectionChanged = OnSelectionChanged;
}
**************Working**************
Like same i want to hook the OnMouseWheel event
And I m trying like this
var mapFrame = null; // A reference to the map frame
var originalMapFrameOnMouseWheel = null; // storage for the original
onSelectionChanged function
function MyOnMouseWheel() // when something is selected on the map
{
debugger
// var count = viewerFrame.GetMapFrame().GetSelectedCount();
// alert(count + " features selected");
originalMapFrameOnMouseWheel();
}
function InitDocument()
{
debugger
mapFrameRef = frames[0].frames[1];
originalMapFrameOnMouseWheel = mapFrameRef.OnMouseWheel;
mapFrameRef.OnMouseWheel = MyOnMouseWheel;
}
But Error is showing
http://n2.nabble.com/file/n4895432/untitled.bmp
Please anyone help
thanks
--
View this message in context: http://n2.nabble.com/OnSelectionChanged-in-AJAX-viewer-tp1815585p4895432.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list