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-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@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 mad...@dmsolutions.ca http://www.dmsolutions.ca http://research.dmsolutions.ca _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users ---------------------------------------------------------------------------- --------- This email has been scanned by the MxScan Email Security System. ---------------------------------------------------------------------------- --------- _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users