[fusion-users] Changing Session-based maps in Fusion

Bill Ten Broeck btenbroeck at gmail.com
Fri Sep 4 05:36:46 EDT 2009


Paul, thanks for the suggestion. We couldn't really use one map, because 
the coord system for the site map was a real one, whereas within the 
site, we had an arbitrary surveyor based grid. We have decided to use 
what we have, and simply hide that initial layer until the second load. 
Seems to be fast enough that no one will notice.

Thanks much for your help though.

Best regards,

Bill


Paul Deschamps wrote:
> Perhaps a different approach would be better?
>
> 1. use one map for the entire process with (min max scales to turn on 
> layers as you drill down).
> 2. use the onSelect event to call some php_mapscript and modify the 
> session map file adding a filter or expression to expose / hide 
> certain features the map and or layers. Ideally if your data has some 
> feature parent / feature children relationship this would be simple.
>
> Your going to need to keep everything in the same coordinate system if 
> you intend to not to re-init the OL Framework. You can hack the OL 
> object on the fly if you wish but it's probiably easier to find 
> another way of doing this.
>
> Cheers
>
> Paul D.
>
>
> On Sat, Aug 29, 2009 at 8:21 AM, Bill Ten Broeck <btenbroeck at gmail.com 
> <mailto:btenbroeck at gmail.com>> wrote:
>
>     The Session opens with a sitemap, which can have any coordinate
>     system. The menuing  system allows the user to switch sitemaps,
>     and that piece works well. The issue is when the user begins
>     drilling down into the site, we create what they want to see
>     programatically.
>
>     We are starting with basically an empty map definition, call it
>     base (has a single layer for extents/coords purposes, but we clear
>     that layer in runtime).  We dynamically create layers and inject
>     them into a newly created runtime map.  We overwrite the current
>     session map with the new map.
>
>     The issue is that the maps have different extents and coordinate
>     systems (from the site map), so fusion gets confused - even after
>     reloading the map.  We have worked around the problem by using
>     loadMapGroup() and switching the map definition to the appropiate
>     base, which loads all settings in fusion and then creating the map
>     with all the layers and overwritting the now correct session map.
>
>     What we would like to avoid is having to load the map twice, once
>     to establish the base settings and another once the dynamic map is
>     created.
>
>
>     Paul Spencer wrote:
>
>         Sounds like something could be done but I'm not sure I follow
>         the logic of what needs to be done.  Is it possible for you to
>         elaborate a little more?
>
>         On 2009-08-24, at 6:10 AM, Bill Ten Broeck wrote:
>
>             Hello.
>
>             We have an application that has a navigation tool that
>             allows the user to select a site (each site has its own,
>             pre-defined map), and then drill down into the site. The
>             drilldown-map is basically an empty, arbitrary coordinate
>             system template map, which we erase then add layers to
>             depending on what they have selected. We have this working
>             well, provided we start with, or expose the template map,
>             and then create our session based map. (IE, it has to be
>             the currently visible map). What we need to be able to do
>             is go directly from the static map to the runtime map with
>             no intermediate step of needlessly exposing the template,
>             just to make it the current map.
>
>             It seems like the approach we are looking for is to change
>             the session map in fusion to a session map we have created
>             server side but we aren’t quite sure how to approach this.
>             Is this clear? And if so, would anyone be willing to
>             sketch out an approach?
>
>             Thanks in advance.
>
>             _______________________________________________
>             fusion-users mailing list
>             fusion-users at lists.osgeo.org
>             <mailto: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/
>
>
>     _______________________________________________
>     fusion-users mailing list
>     fusion-users at lists.osgeo.org <mailto:fusion-users at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>
>
>
> -- 
>    Paul Deschamps
>    Applications Specialist
>    DM Solutions Group Inc.
>
>    Office: (613) 565-5056 x28
>    pdeschamps at dmsolutions.ca <mailto:pdeschamps at dmsolutions.ca>
>    http://www.dmsolutions.ca
>    http://research.dmsolutions.ca
>    
>


More information about the fusion-users mailing list