Problems with multiple maps RRS feed

  • General discussion

  • Hi,

    I'm in the process of developping an app with a large maps on the background (declared in XAML) whith binded pushpins. It works fine. However, when a pushpin is tapped, a charm is opened on the right with another map (declared in the custom control XAML). Starting with the second map loading, pushpins' locations are erratic at best, and doesn't seem to be correlated with their Location, even when they are redrawn (maplayer is cleared and pushpin, added anew).

    It seems that the second map settings are bleeding on the first one as when the second map mapstyle is set to Birdseye, the first map also switched to birdseye and vice versa.

    Note that both maps use the same key but are given different names in their XAML declaration (bm:Bing.Maps in the first one and zmd:Bing.Maps for the second one) and C# code behind.

    Is there a workaround ?


    Tuesday, April 24, 2012 1:53 PM

All replies

  • Is one map a child of the other? That would cause the pushpins to jump around.
    Friday, April 27, 2012 5:19 PM
  • Hi,

    No they're not, The first one is on the main page, the second one is in a custom control instantiated when the users clicks on a pushpin… I don't suppose the second one is child of the first that way, no ,

    Thanx for your help anyway

    Tuesday, May 8, 2012 8:02 AM
  • If you can provide a repro project I'm happy to look at it.
    Tuesday, May 8, 2012 4:23 PM
  • I have a repro project (which is basically the same without the need for the server which provides data for the app).

    Tell me how to get it to you !

    Thanx a lot


    Thursday, May 10, 2012 12:03 PM
  • You can e-mail it to me: firstname dot lastname @ (avoiding e-mail harvesting bots so you'll need to plug in correct values).
    Thursday, May 10, 2012 3:45 PM
  • Thanks for the repro. This is a bug in our code and I have entered it in our database to make sure it will be fixed.
    Friday, May 11, 2012 10:10 PM
  • Hi again !

    While waiting for this bug to be corrected, I worked on a few other projects...

    I'm back on this one now. However, while the pushpin are OK, the second map (which is Inside a custom control) seems to have its center properties to be read only. Any attempt to do a SetView does nothing.

    Do I need two keys for these two maps maybe ?

    Thanks for your help

    Tuesday, January 8, 2013 10:44 AM
  • One key will work fine for two maps. I'm unable to repro a problem with SetView not working with two maps; if you can share your repro I will investigate.

    Tuesday, January 8, 2013 5:22 PM
  • I've just sent you a repro project.

    Thanx a lot

    Thursday, January 10, 2013 12:14 PM
  • You're beginning an animation with SetView(..., ..., ..., TimeSpan.FromSeconds(2)) and then calling SetZoomLevel(...) afterwards. Since the animation is not complete the call to SetZoomLevel interrupts the currently running animation and uses the current Center for the SetZoomLevel call (0,0).

    Change this code

    map.SetView(new Location(lat, long), 4, 0, TimeSpan.FromSeconds(2));


    map.SetView(new Location(lat, long), 18, heading, TimeSpan.FromSeconds(2));

    Thursday, January 10, 2013 4:37 PM