[fusion-users] Re: I do not recognize "Fusion" in my application: "Fusion is not defined"

Fixi apcr at tragsa.es
Mon May 24 06:20:42 EDT 2010


Mark, 

No I told you I'm using the framework pmapper 3.2.

The file is within the framework xmlhttp.js pmapper.

The main file is within pmapper, called map.phtml.

I added this in map.pthml:

 <script language="javascript" src="../../fusion/lib/fusion.js"></script>
 <script type="text/javascript">
 window.onload = function() 
 {	
    	Fusion.initialize();
 }
 </script>


I created a file ApplicationDefinition.xml:

<?xml version="1.0" encoding="UTF-8"?>
<ApplicationDefinition 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
      xsi:noNamespaceSchemaLocation="ApplicationDefinition-1.0.0.xsd">
  <MapSet xsi:type="MapSetType">
  <MapGroup id="aforos" xsi:type="MapType">
    <Map xsi:type="MapLayerType">
      <Type>MapServer</Type>
      <SingleTile>true</SingleTile>
      <Extension>
       
<MapFile>C:/ms4w/apps/pmapper/pmapper-3.2.0/config/AforosSolidos/AforosSolidos.map</MapFile>
      </Extension>
    </Map>
  </MapGroup>
  </MapSet>
  <WidgetSet xsi:type="WidgetSetType">
    <MapWidget xsi:type="WidgetType">
      <Name>map</Name>
      <Type>Map</Type>
      <MapId>aforos</MapId>
    </MapWidget> 
  </WidgetSet>
  <Extension/>
</ApplicationDefinition>


I try to refresh the map this way:

function refrescaMapa()
{
	var map = Fusion.getMapById('aforos');
		
	var url = PM_XAJAX_LOCATION + 'refrescaMapa.php';
	var params = {
		mapname: map._sMapname,
		session: map.getSessionID()
	};
	var options = {
		onSuccess: OpenLayers.Function.bind(map.reloadMap, map),
		parameters: params	
	};
	Fusion.ajaxRequest(url, options);
}


Failure in this line:
var map = Fusion.getMapById('aforos');

Following the trace, it happens in fusion\lib\ApplicationDefinition.js:

    getMapById : function(id) {
        var map = null;
         for (var i=0; i<this.widgetSets.length; i++) {    //
widgetSets.length == 1
            map = this.widgetSets[i].mapWidget;          //
widgetSets[i].mapWidget == undefined
            if (map.mapId == id) {
                break;
            }
        }
        return map;
    },


It's all I can tell you.

Maybe Pmapper framework does not work with Fusion.

Help please.


-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/I-do-not-recognize-Fusion-in-my-application-Fusion-is-not-defined-tp5050396p5093276.html
Sent from the Fusion Users mailing list archive at Nabble.com.


More information about the fusion-users mailing list