title: Map.SetView() on Windows Phone 8
body: <p>Is there a specific time in the page's lifecycle that the <a href="http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj663035%28v=vs.105%29.aspx" rel="noreferrer">Map.SetView()</a> function should be called? In our app we use this on various map objects and it seems to work randomly, sometimes perfectly and sometimes with no effect but also no exception. </p>
  
  <p>example code:</p>
  
  <pre><code>RouteMap.SetView(LocationRectangle.CreateBoundingRectangle(DirectionCoordinates));
  </code></pre>
  
  <p>Where RouteMap is the mapping component and DirectionCoordinates contains the start/end coordinates for the map.</p>
  
  <p>I can see that the bounding box is being created properly, but the map's positioning is not always being affected even loading the same data. If I add a break point it does seem to work, so I was assuming it had something to do with the map loading, but adding the <em>SetView()</em> functionality to the <em>Loaded</em> event has the same issue. We currently process the map information in the page Loaded event.</p>
  
  <p><strong>Update</strong></p>
  
  <p>I've been testing more and added events to what I could, I know for a fact that the MapLoaded event is being called before SetView. After SetView is called, it is working sometimes and not others. Neither ViewChanging or ViewChanged events are called. </p>