ArgumentNullException (center) in Map.zoomAbout() clicking on map with no tile layers
We are using the Silverlight API v2.1 with Silverlight 4
If we have a map which currently only contains (empty) graphics layers (no tile layers) and the user clicks on the blank map, you get an ArgumentNullException for the "center" parameter of the Map.zoomAbout() method.
While we have the map defined in xaml, we've removed the ArcGISTiledMapServiceLayer from xaml because we have to wait a while to determine what URL we want to connect the layer to (and it seems you cannot leave the layer's Url property blank or null when specified in xaml.) Once we know the URL, we create the layer in code behind and add it to the map's layers collection. This part works fine; the problem is simply the ArgumentNullException. It seems to be occurring in some MouseLeftButtonUp handler that is internal to the map (that is the method that appears to be calling map.zoomAbout()); we tried adding our own empty left button handler but that didn't fix the problem.
We'd rather not create the map in code behind, as we have a bunch of stuff within the map element. Is there a way to avoid this exception?
Thanks!