[mapguide-users] Accessing Fusion commands from parent window

Wilson Herrera wherrera at pccadpanama.com
Thu Nov 25 13:55:36 EST 2010


Good day, everyone.

i am designing a map and i need to reach the javascript functionalities in
fusion (zoom rectangle, open legend window), from the parent window (that
is,  mapguide resides inside an iframe), but i havent been succesful in this
implementation.

to ilustrate my point, let me show you a piece of the interface.

http://yfrog.com/3vschemayhj

the area with the number 1, is a div inside the main window
the area with the number 2, is an iframe, cointaining a fusion mapguide app.

the iframe is defined as follows

<iframe id="map" name="map" src="
index.html?ApplicationDefinition=Library%3a%2f%2fmer%2fmer.ApplicationDefinition" 
width="100%" frameborder="0" marginheight="0" marginwidth="0">

i try to call the functions inside in this way (and many others i forgot
without sucess)

1- var Fusion = window.top.Fusion;   //also tried
window.frames['map'].Fusion
2- var map = Fusion.getWidgetById('map');

and then use

3- map.showLegend();

but i got errors in the first line and i think i am doing this in the wrong
way, but my mind has been clouded and cant see what i am missing.

im getting somewhat frustrated here and i welcome any help.

thank you all,

Wilson H.

ps: this is the window layout, the same you can see in the first link.
http://osgeo-org.1803224.n2.nabble.com/file/n5775258/schema.jpg schema.jpg 


-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Accessing-Fusion-commands-from-parent-window-tp5775258p5775258.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list