how to change the shape of the default pin to the user created shape pin?
2 Answers, 1 is accepted
0
Dimitar
Telerik team
answered on 27 Mar 2017, 11:06 AM
Hello Joel,
Thank you for writing.
By default, the MapPin has a fixed shape and is manually drawn on the map surface. In this case, you can create a custom MapVisualElement and draw an image for example:
class MapMarker : MapVisualElement
{
private Image image;
private PointL pixelLocation;
private RectangleL drawRect;
public Image Image
{
get
{
return image;
}
set
{
this.image = value;
}
}
public override bool IsInViewport
{
get { return true; }
}
public override void Paint(IGraphics graphics, IMapViewport viewport)