[mapguide-users] RE: Bypassing initial view at startup

FGoulet gouletf at dfo-mpo.gc.ca
Tue Mar 27 15:59:35 EDT 2007


Thanks.

Looks rather complicated but I will read to learn more about changing the
web layout for a session.




Scott McFarlane wrote:
> 
> FGoulet,
> 
>  
> 
> You can set the initial view in the Web Layout, and that will override the
> initial view set in the Map Definition. If you want to do this
> dynamically,
> (programmatically) then you need to get the web layout XML, modify the XML
> to add the <InitialView> tag, then store the web layout in the Session
> repository and display that in your browser.
> 
>  
> 
> For example, the XML for a web layout with an InitialView might look like
> this:
> 
>  
> 
> <?xml version="1.0" encoding="utf-8"?>
> 
> <WebLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xsi:noNamespaceSchemaLocation="WebLayout-1.0.0.xsd">
> 
>   <Title>Sheboygan Map</Title>
> 
>   <Map>
> 
>  
> <ResourceId>Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition</Resour
> ceId>
> 
>     <InitialView>
> 
>       <CenterX>-87.72</CenterX>
> 
>       <CenterY>43.77</CenterY>
> 
>       <Scale>2000</Scale>
> 
>     </InitialView>
> 
>     <HyperlinkTarget>TaskPane</HyperlinkTarget>
> 
>   </Map>
> 
>   ...
> 
> </WebLayout>
> 
>  
> 
> - Scott
> 
>  
> 
>  
> 
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of FGoulet
> Sent: Thursday, March 22, 2007 4:07 PM
> To: mapguide-users at lists.osgeo.org
> Subject: [mapguide-users] Bypassing initial view at startup
> 
>  
> 
>  
> 
> Hi,
> 
>  
> 
> When the MapGuide Viewer start, is there a way to zoom to an extent other
> 
> than what is it defined in the map layout initial view?
> 
>  
> 
> I know I can zoom after the map first apprears but I would really like to
> 
> bypass the initial view for a better user experience.
> 
>  
> 
> Thanks
> 
> -- 
> 
> View this message in context:
> http://www.nabble.com/Bypassing-initial-view-at-startup-tf3450031s16610.html
> #a9623015
> 
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> 
>  
> 
> _______________________________________________
> 
> mapguide-users mailing list
> 
> mapguide-users at lists.osgeo.org
> 
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
>  
> 
>  
> 
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Bypassing-initial-view-at-startup-tf3450031s16610.html#a9699933
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list