dymaptic / GeoBlazor

Core Components for the Dymaptic GeoBlazor Library
MIT License
108 stars 19 forks source link

Add Many Graphics is doesn't work with TextSymbol with MapFont since Version 3.01 #320

Closed dirk193 closed 4 months ago

dirk193 commented 5 months ago

Add in ManyGraphics.razor following Code:

private Symbol GenerateText() { return new TextSymbol( "Hello", color: new MapColor("red"), backgroundColor: new MapColor("transparent") , font: new MapFont(12, "Arial", "normal", "bold") ); } In GenerateGraphic add:

case "Text": return new Graphic(GeneratePoint(), GenerateText(), GeneratePopupTemplate(), GenerateAttributes()); Replace this:

` <select disabled="@_generating" @bind="_geometryType" @bind:after="SetGraphics">

    <option value="Polyline">Polyline</option>
    <option value="Polygon">Polygon</option>
    <option value="Text">Text</option>
</select>

`

Run it

TimPurdum commented 5 months ago

@dirk193 thanks for this, it is a legit bug, will fix shortly!

dirk193 commented 5 months ago

Thank you