private void getRouteWithCurrentLocation(Geopoint startLoc, LocationData endLoc)
        {
            BasicGeoposition endLocation = endLoc.getPosition();
            Geopoint endPoint = new Geopoint(endLocation);

            GetRouteAndDirections(startLoc, endPoint, Colors.Red);
        }
        private void AddMapIconAndGeofence(LocationData location)
        {
            //Add an mapicon for the given location
            MapIcon mapIcon = new MapIcon();
            mapIcon.Location = new Geopoint(location.getPosition());
            mapIcon.NormalizedAnchorPoint = new Point(0.5, 1.0);
            mapIcon.Title = location.name;
            InputMap.MapElements.Add(mapIcon);

            //Make the geofence of the given locationdata
            if(location == chosenRouteLocation)
                location.MakeNewGeofence(Int32.Parse(GeofenceRadius.Text));
            else
                location.MakeNewGeofence(location.standardGeofenceRadius);
            GeofenceMonitor.Current.Geofences.Add(location.geofence);
        }
        private void drawGeofence(LocationData location, double radius)
        {
            var strokeColor = Colors.DarkBlue;
            strokeColor.A = 100;
            var fillColor = Colors.Blue;
            fillColor.A = 50;

            List<BasicGeoposition> poslist = new List<BasicGeoposition>();
            poslist.Add(location.getPosition());

            MapPolygon circlePolygon = new MapPolygon
            {
                FillColor = fillColor,
                StrokeColor = strokeColor,
                StrokeThickness = 3,
                StrokeDashed = true,
                ZIndex = 1,
                Path = new Geopath(location.GetCirclePoints(radius))
            };

            InputMap.MapElements.Add(circlePolygon);
        }