[mapguide-users] Two maps in the same layout

Rodolfo Moreno rmoreno at voxiva.com
Thu Jan 29 10:06:06 EST 2009


Thanks Jackie and Paul for the quickly answer.
I was testing the two ways.

Paul with respect to the FUSION viewer, I could place two maps in the same
layout, however I could not handle suitably the event MAP_LOADED. this is my
code:

var Map;
var Map1;
var fusionInitialized = function() {
    $('AppContainer').resize({forceResize: true});
  
    Map = Fusion.getWidgetById('Map');
    Map1 = Fusion.getWidgetById('Map1');
    
    Map.registerForEvent(Fusion.Event.MAP_LOADED, mapLoaded);
    Map1.registerForEvent(Fusion.Event.MAP_LOADED, mapLoaded);

}

function mapLoaded()
{
  // Inside of this function I would like to detect which of the maps(Map or
Map1) has called 
 // to this function. 

}

I would like that mapLoaded function to detect which of the maps(Map or
Map1) called it. 
The other alternative (whether the other is not possible) would be I can
send parameters to the mapLoaded function, like this:

{
   ...
    Map.registerForEvent(Fusion.Event.MAP_LOADED, mapLoaded, parameter1);
}

function mapLoaded(parameter1)
{

}

Thanks in advance,



Paul Spencer wrote:
> 
> yes you can do it using the fusion viewer but you need to edit the  
> ApplicationDefinition.xml file manually (you can't do it using Studio).
> 
> You need to have a MapGroup for each map you want to display and a  
> WidgetSet for each map you want to display.  Then you need two divs in  
> your page, one for each WidgetSet (referenced by the MapWidget in the  
> WidgetSet).  Widgets within each widget set will only work on the  
> associated map.
> 
> Cheers
> 
> Paul
> 
> 
> On 22-Jan-09, at 3:21 PM, Rodolfo Moreno wrote:
> 
>> Ivan good sugestion about the iframes, it's better than frameset.  
>> However I
>> would like to do it using FUSION viewer. Is it possible?
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 


-----
Rodolfo Moreno
CivilEng

-- 
View this message in context: http://n2.nabble.com/Two-maps-in-the-same-layout-tp2189508p2239370.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list