Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9086387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:28:40+00:00 2026-06-16T21:28:40+00:00

I have a problem with Bing Maps control I use in my WP7 application.

  • 0

I have a problem with Bing Maps control I use in my WP7 application.

When I’m navigated to the page with map control, it starts the GeoCoordinateWatcher. When GeoCoordinateWatcher has some location data for me, it calls a SetView() method to center the map at current location. There is also a button on ApplicationBar that’s also starting the GeoCoordinateWatcher.

Now, the thing is, when I first navigate to this page, all works fine: GeoCoordinateWatcher starts, gives me the location data after some time, calls SetView() and the map centers when I need it too. The same with the button.

But if I press the Back button to get back to the main page and then try to navigate again to the map page, SetView() stops working. In debugging I see that the code surrounding it works as expected and the data passed to SetView() is correct, but nothing happens with the control and events for changing view don’t fire either.

I’m assuming there may be something wrong with map initialization (or disposing on navigating from), but I don’t know where to dig.

Edit:
I’ve tried changing Map.Center directly and it doesn’t work in exactly the same way the SetView() doesn’t: it works fine the first time page is navigated to and doesn’t work on the other times.

Edit 2:
Ok, it gets weirder. In debugging I see that my map’s center actually gets set to a correct value. But an actual control shows absolutely different location and me, moving map around, doesn’t change the value that I see from code.

Edit 3:
I’ve added a button to ApplicationBar that just calls SetView() and it works fine. Apparently, the problem appears when I call SetView() as a result of GeoCoordinateWatcher.PositionChanged event raising. How could I work around that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:28:41+00:00Added an answer on June 16, 2026 at 9:28 pm

    I’ve found the solution.

    In my original code I’ve subscribed to the GeoCoordinateWatcher.Position property change event in the page constructor: App.PropertyChanged += AtmInfoPageOnAppPropertyChanged

    All I had to do was to move that to the OnNavigatedTo event handler and add App.PropertyChanged -= AtmInfoPageOnAppPropertyChanged to the OnNavigatedFrom event handler.

    I think, the problem was that keeping the old page subscribed to the event didn’t allow it to be disposed, and at the same time didn’t allow the new page to subscribe to that same event, thus causing the code to be called for the different page and different map control than the one displayed on the screen.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application using Bing Maps that draws polygons on a map. For
I am building a map application with the silverlight bing maps control. In the
Hello i have some problems with the Bing Map control. If i zoom to
I have created a Silverlight Application project using the Bing Maps Silverlight Control and
I have problems with a .NET 4 application using Bing Maps with custom pushpins.
I have a problem with my WP7 application, it's working fine on the emulator
Currently developing an application for Windows Phone that makes use of the bing maps
I have a problem with the routing in a bing maps with windows phone
I have problem with show or hide form in Window Form Application. I start
I am integrating bing maps into a web page. I am calling the GetDirections()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.