//var graphicsLayer = ... ; //Must be on the QueuedTask.Run() // get the last location var pt = DeviceLocationService.Instance.GetCurrentSnapshot()?.GetPositionAsMapPoint(); if (pt != null) { //Create a point symbol var ptSymbol = SymbolFactory.Instance.ConstructPointSymbol( CIMColor.CreateRGBColor(125, 125, 0), 10, SimpleMarkerStyle.Triangle); //Add a graphic to the graphics layer graphicsLayer.AddElement(pt, ptSymbol); //unselect it graphicsLayer.ClearSelection(); }
Target Platforms: Windows 11, Windows 10