# Set the Best View for the InformationLayer

In case you have a set of elements displayed by the **InformationLayer**, you might want to be able to display all of them in the visible area of the map and to set the optimal zoom for them. This can be done by using the **Best View** feature of the **RadMap**. To use it you have to call the **GetBestView()** method of the **InformationLayer** and pass its items to it. This method will return a LocationRect object which represents the best view for the items in the **InformationLayer**. You can use it in order to adjust the **RadMap** center and zoom level. Here is an example:

```C#
private void SetBestView()
{
    LocationRect rect = this.informationLayer.GetBestView(this.informationLayer.Items.Cast<object>());
    rect.MapControl = this.radMap;
    this.radMap.Center = rect.Center;
    this.radMap.ZoomLevel = rect.ZoomLevel;
}
```

```VB.NET
	Private Sub SetBestView()
		Dim rect As LocationRect = Me.informationLayer.GetBestView(Me.informationLayer.Items.Cast(Of Object)())
		rect.MapControl = Me.radMap
		Me.radMap.Center = rect.Center
		Me.radMap.ZoomLevel = rect.ZoomLevel
	End Sub
```

## See Also

* [Information Layer](https://www.telerik.com/products/wpf/documentation/controls/radmap/features/information-layer/information-layer)
* [Navigation](https://www.telerik.com/products/wpf/documentation/controls/radmap/features/navigation)
* [Put a Mark on the clicked Location](https://www.telerik.com/products/wpf/documentation/controls/radmap/how-to/put-a-mark-on-the-clicked-location)
* [Bring a Location into View](https://www.telerik.com/products/wpf/documentation/controls/radmap/how-to/bring-a-location-into-view)
