When I add a slew of Pushpins
to a Bing Map, I want the zoom level to automagically update to the "best fit" - the "closest in" view that allows all of the Pushpins to be displayed.
I would imagine that it would be done by computing the zoom level required by discovering the latitude values that are the furthest north and southmost, and the longitude values that are furthest east and west, and then centering on the average value of those.
My idea is passing a List of GeoCoordinates
to a method that would return the appropriate ZoomLevel, and possibly a separate method that would calculate the center point of the map.
These two values could then be used for the map's SetView(location, ZoomLevel)
method.
Has this been done already, or is there a Bing Maps call that will handle this?