mirror of
https://github.com/farcasclaudiu/myfriendsaround.git
synced 2026-06-29 15:01:45 +03:00
map issue fixed
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
using System;
|
||||
using System.Device.Location;
|
||||
using System.Security;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using GalaSoft.MvvmLight.Threading;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Controls.Maps;
|
||||
using Microsoft.Silverlight.Testing;
|
||||
using MyFriendsAround.WP7.ViewModel;
|
||||
using MyFriendsAround.WP7.Views;
|
||||
|
||||
namespace MyFriendsAround.WP7
|
||||
{
|
||||
public partial class MainPage : PhoneApplicationPage
|
||||
{
|
||||
//private Map MyMap;
|
||||
|
||||
// Constructor
|
||||
public MainPage()
|
||||
{
|
||||
@@ -37,6 +43,8 @@ namespace MyFriendsAround.WP7
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MainPage_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
#if TESTING
|
||||
@@ -52,6 +60,16 @@ namespace MyFriendsAround.WP7
|
||||
{
|
||||
bool navigateBackSuccessfull = imobileTPage.NavigateBack(); arg.Cancel = navigateBackSuccessfull;
|
||||
}; (Application.Current.RootVisual as PhoneApplicationFrame).Content = testPage;
|
||||
|
||||
map.SetView(LocationRect.CreateLocationRect());
|
||||
}
|
||||
|
||||
private void map_ViewChangeEnd(object sender, MapEventArgs e)
|
||||
{
|
||||
//to workaround the issue
|
||||
// https://connect.microsoft.com/VisualStudio/feedback/details/643990/wp7-bing-maps-control-throwing-unspecified-error-with-mapitemscontrol
|
||||
//
|
||||
(DataContext as MainViewModel).MapViewChangedCommand.Execute(map.BoundingRectangle);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user