[fusion-users] Fusion Conversion: 1.x -> 2.x

Paul Spencer pspencer at dmsolutions.ca
Tue Jun 2 10:19:36 EDT 2009


Hi Tim,

unfortunately the change from 1.x to 2.0 is disruptive due to an API  
change in JxLib and in Fusion itself (for widgets).  I thought I had  
posted something on this before but apparently I didn't.

For widgets, the big changes are:

1. change the initialize method to initializeWidget
2. remove call to Fusion.Widget.prototype.initialize.apply
3. remove calls to Fusion.Tool.xxxxx
4. add new attribute uiClass: Jx.Button for widgets that are  
represented as (this replaces calling  
Fusion.Tool.ButtonBase.prototype.initialize.apply)
5. if the widget is modal on the map, add new attribute isExclusive:  
true
6. remove activateTool if used

A good example of a button-based widget is Zoom.js.  If your widgets  
are not buttons then you can leave uiClass out or choose a different  
uiClass (like Jx.Menu for instance).

For JxLib, the changes were fairly widespread and it is hard to  
summarize them without looking at your template to see what parts you  
used.

One big change would be if you are using any prototype or  
scriptaculous stuff, you'll need to find the mootools equivalent

Another change is from Jx.Action with buttons to event listeners so  
where you would have created a button and an action before, now you  
just create the button and attach an event listener using  
button.addEvent('click', function() {});

If you want to send me your widgets or template code directly, I can  
provide you with more specific advice.

I haven't tried TileCache specifically but it supposed to work -  
actually, WMS layers work and TileCache usually uses a WMS layer so  
yes I think it does work.  If you want to use the TileCache layer to  
access a pre-built cache you will need to update OpenLayers.js to use  
a full build of the library or at least one that includes  
Layer.TileCache.

Cheers

Paul

On 2-Jun-09, at 8:40 AM, Nolte, Tim wrote:

> Does anyone have any tips on make a conversion from Fusion 1.x to  
> 2.x? I
> had a really nice custom layout created under Fusion 1.x that I  
> tried to
> move to 2.x and it's been a real mess. I can see that some of the big
> things are the changes to the JX libraries. Also I have a couple of
> widgets that I developed in 1.x that don't work at all in 2.x now
> either. All of the documentation online seems to be all 1.x driven and
> doesn't work under 2.x.
>
> The reason I am even taking the effort to move to 2.x is because of  
> all
> of the additional exposed OpenLayers layers that are available. Does
> anyone know if TileCache specifically is working now with Fusion 2.x?
> Thanks.
>
> - Tim
>
> ----
> Timothy J Nolte - tnolte at ilpcs.com
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/



More information about the fusion-users mailing list