Talk:Plotting current position on the Map control in Windows Phone 7
Hamishwillee - Subedited
I've subedited this. Remember its important to add references to key articles on MSDN (now done). Also you will rarely need "basic idea" section - just put that as part of the introduction.
I don't really understand this code - can you explain?
gcw.StatusChanged += new EventHandler<GeoPositionStatusChangedEventArgs>(gcw_StatusChanged);
gcw.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(gcw_PositionChanged);
map1.Center = new GeoCoordinate(gcw.Position.Location.Latitude, gcw.Position.Location.Longitude);
Specifically, you seem to be defining an event handler gcw_StatusChanged but this isn't being called anywhere. Also, you Start() the gcw then immediately use its position in the map1.Center. How do you know that the value isn't Null at this point.
What I think is happening is that you're defining event handlers that you don't use. The person presses the menu a few times and eventually the position will be populated with a value, before this nothing happens. If I'm right then a better implementation would be to set the map center in the event handler - then if they press the button they just need to wait until a position is retrieved. Make sense?
07:28, 27 April 2012 (EEST)
Hamishwillee - Needs a big fat disclaimer
This looks like a Bing map which is "deprecated" in WP8. I think I would have kept this as relevant to WP7 only and just had a comment "this will work in WP8 but you should instead use the new XXXX control". Thoughts?
If you want to keep as is then we should have a big disclaimer on this and I would still consider putting the topic to say "in Windows Phone 7" again.
09:33, 10 June 2013 (EEST)
Somnathbanik - Windows Phone 7Let put it only for Windows Phone 7 then.
12:11, 10 June 2013 (EEST)
Hamishwillee - Makes senseThank you. I've also linked to the correct controls above and added a Tip noting what you do in WP8.
04:22, 11 June 2013 (EEST)