public override void OnViewModelChanged(object sender, PropertyChangedEventArgs e) { base.OnViewModelChanged(sender, e); if (e.PropertyName == PropertiesExtension.GetPropertyName(() => (ViewModel as BaseChallengesViewModel).Challenge)) { if ((ViewModel as BaseChallengesViewModel).Challenge != null && (ViewModel as BaseChallengesViewModel).Challenge.LocationLat != null && (ViewModel as BaseChallengesViewModel).Challenge.LocationLong != null && _map != null) { //ViewModel.RequiredLocation = true; GoogleMapHelper.UpdateMapZoom(_map, ViewModel.Challenge.LocationLat.Value, ViewModel.Challenge.LocationLong.Value, ViewModel.Challenge.RadiusMeters); } //else // ViewModel.RequiredLocation = false; } if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.SubmitButtonAnimated)) { if (ViewModel.SubmitButtonAnimated) { AnimateButton(button, Resource.Drawable.ic_loadingIndicator); } if (!ViewModel.SubmitButtonAnimated) { button.SetImageResource(Resource.Drawable.challenges_postering_btn); button.ClearAnimation(); } } }
public override void OnViewModelChanged(object sender, PropertyChangedEventArgs e) { base.OnViewModelChanged(sender, e); if (e.PropertyName == PropertiesExtension.GetPropertyName(() => (ViewModel as BaseChallengesViewModel).Challenge)) { if ((ViewModel as BaseChallengesViewModel).Challenge != null && (ViewModel as BaseChallengesViewModel).Challenge.LocationLat != null && (ViewModel as BaseChallengesViewModel).Challenge.LocationLong != null && _map != null) { GoogleMapHelper.UpdateMapZoom(_map, ViewModel.Challenge.LocationLat.Value, ViewModel.Challenge.LocationLong.Value, ViewModel.Challenge.RadiusMeters); } } }
public void OnMapReady(GoogleMap googleMap) { try { _map = googleMap; if (ViewModel.Challenge != null && ViewModel.Challenge.LocationLat != null && ViewModel.Challenge.LocationLong != null && _map != null) { GoogleMapHelper.UpdateMapZoom(_map, ViewModel.Challenge.LocationLat.Value, ViewModel.Challenge.LocationLong.Value, ViewModel.Challenge.RadiusMeters); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
//private void OnCommentButtonClick(object sender, EventArgs e) //{ // Delegate.PostComment(AdapterPosition); //} //private void OnLikeButtonClick(object sender, EventArgs e) //{ // Delegate.PostLike(AdapterPosition); //} //private void OnReadCommentButtonClick(object sender, EventArgs e) //{ // OnShowAllCommentsButtonClicked(); // _readAllCommentsButton.Visibility = ViewStates.Gone; //} //private void OnLoadFriendFeedButtonClick(object sender, EventArgs e) //{ // Delegate.LoadProfileDetails(AdapterPosition, (MvxCachedImageView)sender); //} public void OnMapReady(GoogleMap googleMap) { GoogleMapHelper.UpdateMapZoom(googleMap, _latitude, _longitude, 5); CurrentMap = googleMap; }