[mapguide-users] Bypassing initial view at startup

Scott McFarlane scott at geotropix.com
Thu Mar 22 18:18:28 EDT 2007


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

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070322/deb8977c/attachment-0001.html


More information about the mapguide-users mailing list