none
is it possible to display map with Lat/Long from the 4 corners RRS feed

  • Question

  • is it possible to display map with Lat/Long from the 4 corners.

    My requirement is to display Canada map in a div.  The width of div is 80% of the browser window, so it would be different on different user's machine and I cannot set zoom to a specific number.

    Any idea? Is it possible?

    Thanks,

    • Moved by Ricky_Brundritt Saturday, March 10, 2012 12:50 PM (From:Bing Maps: Map Control and Web services Development)
    Monday, January 16, 2012 5:26 PM

Answers

  • Is there any api doc about

    Microsoft.Maps.LocationRect.fromLocations(
    new Microsoft.Maps.Location(47.618594, -122.347618),
    new Microsoft.Maps.Location(47.620700, -122.347584),
    new Microsoft.Maps.Location(47.622052, -122.345869));

    I guess they are

    left bottom point,

    left top point

    right top point

    Am I right?

     


    No - fromLocations() returns a mapview that contains all the specified locations. What you want is LocationRect.fromCorners - which needs just two points. See: http://msdn.microsoft.com/en-us/library/gg427621.aspx

    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Monday, January 16, 2012 7:10 PM
    Moderator

All replies

  • See the final example on http://msdn.microsoft.com/en-us/library/gg427608.aspx ("To set the boundaries of the view instead of centering on a point")
    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Monday, January 16, 2012 5:29 PM
    Moderator
  • Is there any api doc about

    Microsoft.Maps.LocationRect.fromLocations(
    new Microsoft.Maps.Location(47.618594, -122.347618),
    new Microsoft.Maps.Location(47.620700, -122.347584),
    new Microsoft.Maps.Location(47.622052, -122.345869));

    I guess they are

    left bottom point,

    left top point

    right top point

    Am I right?

     

    Monday, January 16, 2012 6:27 PM
  • Monday, January 16, 2012 6:59 PM
  • Is there any api doc about

    Microsoft.Maps.LocationRect.fromLocations(
    new Microsoft.Maps.Location(47.618594, -122.347618),
    new Microsoft.Maps.Location(47.620700, -122.347584),
    new Microsoft.Maps.Location(47.622052, -122.345869));

    I guess they are

    left bottom point,

    left top point

    right top point

    Am I right?

     


    No - fromLocations() returns a mapview that contains all the specified locations. What you want is LocationRect.fromCorners - which needs just two points. See: http://msdn.microsoft.com/en-us/library/gg427621.aspx

    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Monday, January 16, 2012 7:10 PM
    Moderator
  • Many thanks!
    Monday, January 16, 2012 7:24 PM