Using Pin in blazor #2144
Replies: 2 comments
-
You can port the relevant code from here for the Pin. https://mapsui.com/samples/ All samples are written in Blazor, Maybe you could use a callout as a pin. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you @inforithmics pf = new PointFeature(new PointFeature(SphericalMercator.FromLonLat(theShipIn.Lon, theShipIn.Lat).ToMPoint()))
{
Styles = new[] { new SymbolStyle {
SymbolScale = 0.8,
SymbolOffset = new Offset(theShipIconAnchor),
BitmapId =BitmapRegistry.Instance.Register(Mapsui.Utilities.SvgHelper.LoadSvgPicture(theBoatSvg)) } }
};
boatfeatures.Add(GetTheFeatureField(pf, theShipIn)); and implemented the Callout myself |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Really great that Mapsui for Blazor now works. Mapsui have been fantastic to use in my Maui App!
But i have a question.
Do Pin exists in Mapsui Blazor and if not is there a replacement. ( Pin.cs seams only to support Maui and Forms)
I have a Maui app that uses the Mapsui class Pin to display Pin objects on a map, now i want to implement this in Blazor.
The Pins are updated every ten seconds, the objects for each pin that is created that are used are Type, Label, Position, Rotation, Anchor, Tag, Scale, Svg/Icon.
At each update I change the Position and Svg (I create the svg dynamically via XmlNode.Attributes) in the Pin and call RefreshGraphics() . This is done to follow ships in "realtime" see the attached image.
Can i solve this in Blazor?
If so any idea on how?
Regards
Beta Was this translation helpful? Give feedback.
All reactions