VDS Technologies

 

Zooming

7/10/2015 5:28:01 AM
Total Posts 19

Zooming

Hi

I am using your Sampleapps to build a desktop app of my own, so far so good.
Using the InfoTool to show Callout text in a clicked object, the map automatically puts a red line round the clicked object but zooms in to it too far, how do I either get it to zoom in not quite so far or zoom out a bit just before the map is refreshed?

Cheers

Dave

7/10/2015 6:21:13 AM
MVP
Total Posts 323

Re: Zooming

If your code sets the Map.Extent property to the extent of the identifed object, you may use the Inflate method to enlarge the extent:

Rectangle extent = rs.RecordExtent;

extent.Inflate(extent.Width, extent.Height)

map.Extent = extent;

map.Refresh();

Or, the ZoomScale method can be used to show identified objects at a desired scale:

map.ZoomScale(extent.Center, 100000);

map.Refresh();

7/10/2015 8:38:00 AM
Total Posts 19

Re: Zooming

Thanks

The second one worked a treat after playing with the number

Dave