예제 #1
0
        protected override void OnResume()
        {
            base.OnResume();

            sensor_manager.RegisterListener(rotate_view, SensorManager.SensorOrientation, SensorDelay.Ui);

            location_overlay.EnableMyLocation();
        }
예제 #2
0
        protected override void OnResume()
        {
            base.OnResume();

            var orientSensor = sensor_manager.GetDefaultSensor(SensorType.Orientation);

            sensor_manager.RegisterListener(rotate_view, orientSensor, SensorDelay.Ui);

            location_overlay.EnableMyLocation();
        }
예제 #3
0
        /// <summary>
        /// Enable location tracking and place any overlays
        /// </summary>
        protected override void OnResume()
        {
            base.OnResume();
            myLocation.EnableMyLocation();
            if (assignment != null)
            {
                var overlayItem = new OverlayItem(new GeoPoint(assignment.Latitude.ToIntE6(), assignment.Longitude.ToIntE6()), assignment.CompanyName,
                                                  string.Format("{0} {1}, {2} {3}", assignment.Address, assignment.City, assignment.State, assignment.Zip));
                MapOverlayItem overlay = new MapOverlayItem(this, Resources.GetDrawable(Resource.Drawable.ActiveAssignmentIcon), overlayItem, mapView, true);
                mapView.Overlays.Add(overlay);
            }

            var dialog = new AlertDialog.Builder(this)
                         .SetTitle("Google Maps")
                         .SetMessage(Resources.GetString(Resource.String.GoogleMapsKeyIssue))
                         .SetPositiveButton("Ok", (sender, e) => { })
                         .Show();
        }
예제 #4
0
        /// <summary>
        /// Enabling my location and setting active assignment
        /// </summary>
        protected override void OnResume()
        {
            base.OnResume();

            UpdateLocations();
            myLocation.EnableMyLocation();
            var tabActivity = (AssignmentTabActivity)Parent;

            AssignmentTabActivity.MapDataWrapper mapDataWrapper = null;
            if (tabActivity != null)
            {
                mapDataWrapper = tabActivity.MapData;
            }

            if (mapDataWrapper != null)
            {
                mapView.Controller.SetZoom(mapDataWrapper.Zoom);
                mapView.Controller.AnimateTo(mapDataWrapper.OverlayPoint);
                mapView.AddView(mapDataWrapper.OverlayBubble);
            }
            else
            {
                myLocation.RunOnFirstFix(() => {
                    mapView.Controller.AnimateTo(myLocation.MyLocation);
                });
                mapView.Controller.SetZoom(5);
            }

            if (assignmentViewModel.ActiveAssignment != null)
            {
                SetAssignment(true);
            }
            else
            {
                SetAssignment(false);
            }

            var dialog = new AlertDialog.Builder(this)
                         .SetTitle("Google Maps")
                         .SetMessage(Resources.GetString(Resource.String.GoogleMapsKeyIssue))
                         .SetPositiveButton("Ok", (sender, e) => { })
                         .Show();
        }
예제 #5
0
 protected override void OnResume()
 {
     base.OnResume();
     myLocationOverlay.EnableMyLocation();
 }