[fusion-users] Fusion enhancements

Paul Spencer pspencer at dmsolutions.ca
Thu Sep 11 08:39:22 EDT 2008


Hi Brad,

I don't plan to include a zoom to layer capability at this time,  
although it is certainly possible to do it - all that is needed is a  
way to compute the extent of a given layer.  In the existing Fusion,  
this could be done it a couple of ways:

1) on start up:
   - modify LoadMap.php (compute a new property for each layer with  
the extent and return it with the JSON object)
   - modify the appropriate Layer code in MapGuide and or MapServer to  
store the extent as a property of the layer object
   - modify the Legend or add a new widget to zoom to the extent of  
the current layer using this new property.

2) delayed:
   - modify the Legend or add a new widget to zoom to the extent of  
the current layer that makes an asynchronous
     call to ...
   - ... a new script on the back end that computes the extents and  
returns it to ...
   - ... the widget's callback handler which then zooms the map to the  
appropriate extent

3) on start up, using existing metadata support (in the case of  
MapServer layers):
   - add "layer_extent" "minx,miny,maxx,maxy" metadata to layers to  
indicates the extent of the layer (you can use any key you want, as  
long as it is the same in each step here)
   - modify ApplicationDefinition Map section and add a  
<LayerMetadata>layer_extent</LayerMetadata> section to the Extension  
element
   - - modify the Legend or add a new widget to zoom to the extent of  
the current layer using this new metadata, accessible as  
layer.getMetadata('layer_extent') in javascript.

Method 1) adds further overhead to the start up process, delaying  
initial display of the map further, which is a pain that we are trying  
to avoid.  Computing the extent of layers can be quite expensive and  
potentially error prone.

Method 2) alleviates the start up problem but creates a small delay  
when actually zooming

Method 3) is probably the best but only works for MapServer (since  
there is no way to store arbitrary metadata in MapGuide AFAIK) and  
requires that you pre-compute the extent of each layer.

In the next version of Fusion, we will be significantly streamlining  
the startup process and method 1) won't be an option any more.   
However, layer details will be retrieved asynchronously and extent  
computation could be added at there, allowing the map to initially  
load quickly while still having access to extra information we need to  
build the legend and support some of the other layer-specific  
operations.

Cheers

Paul

On 10-Sep-08, at 5:27 PM, BradM wrote:

>
> Is there any plan to create the ability to zoom to the extent of a  
> map layer
> by selecting it in the legend?  Is there a plan to be able to link  
> metadata
> to the map layers in the legend?  thanks
> -- 
> View this message in context: http://www.nabble.com/Fusion-enhancements-tp19423473p19423473.html
> Sent from the Fusion Users mailing list archive at Nabble.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://www.dmsolutions.ca/



More information about the fusion-users mailing list