[mapguide-users] Zoom to selected feature with Fusion MGOS
2.1 Beta
SMAmap Webmaster
webmaster at SMAmap.com
Fri Jul 10 16:27:22 EDT 2009
Thanks Mike, this is exactly what I wanted to do. Many of my users are on
relatively slow connections so I want to do as little re-drawing as
possible.
Andy Baltimore
http://greenmapsanmiguel.org/
http://SMAmap.org/
my Fusion sandbox:
http://smamap.com/mapguide/GreenMap/SanMiguelDeAllende/index.php
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Mike Adair
Sent: Friday, July 10, 2009 2:20 PM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] Zoom to selected feature with Fusion MGOS 2.1
Beta
That's what I was gong to suggest, but you can also set your initial map
extents in the ApplicationDefinition file like so:
<MapGroup id="gmapLL" xsi:type="MapType">
<Map xsi:type="MapLayerType">
<Type>MapServer</Type>
<SingleTile>true</SingleTile>
<Extension>
<MapFile>/ms4w/apps/gmap/htdocs/gmapLonLat.map</MapFile>
<LayerMetadata>wms_metadataurl_href</LayerMetadata>
</Extension>
</Map>
<InitialView>
<MinX>-71.8</MinX>
<MinY>40.5</MinY>
<MaxX>-42</MaxX>
<MaxY>63.5</MaxY>
</InitialView>
</MapGroup>
Mike
GreenMapSanMiguel wrote:
> An update - I am working around this problem by defining the map extents
to
> include all features then zooming to my desired initial extent on
mapLoaded:
>
> function mapLoaded()
> {
> var mapWidget = Fusion.getMapById('Map');
> var extent = mapWidget.getExtentFromPoint(-100.743812,20.914291,5000);
> mapWidget.setExtents(extent);
> }
>
> This feel wrong to me, so please let me know if you have a better way.
>
> Thanks!
>
> Andy
>
--
Michael Adair
Senior Software Architect
DM Solutions Group Inc.
Office: (613) 565-5056 x26
madair at dmsolutions.ca
http://www.dmsolutions.ca
http://research.dmsolutions.ca
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
----------------------------------------------------------------------------
---------
This email has been scanned by the MxScan Email Security System.
----------------------------------------------------------------------------
---------
More information about the mapguide-users
mailing list