Circle marker to indicate radius around a center point

I'm looking for a solution to display a map with circles to indicate a radius area around a center point. The Markers feature of Maps gets close, but I haven't found a way to specify the radius of the circle based on miles or kilometers. Also, the circle area changes when you zoom in or out on the map.

Is this something that could be achieved with Syncfusion Maps and how?


1 Reply

IR Indumathi Ravi Syncfusion Team June 10, 2024 11:44 AM UTC

Hi Ryan,


In the Syncfusion Maps component, we can render circles of varying sizes using the bubbles feature. Bubbles are utilized to visualize a set of data, representing the radius of each area on the map, to display varying values of the data. You can adjust the size of the bubbles using the “MinRadius” and “MaxRadius” properties within the “MapsBubble” tag in the Maps component. For further information about the bubbles feature in the Maps component, please refer to the documentation below.

https://blazor.syncfusion.com/documentation/maps/bubble


Please find the code snippet for the same below.


Code Snippet:

<SfMaps>

   //..

  //..

    <MapsLayers>

        <MapsLayer ShapeData='new {dataOptions =https://cdn.syncfusion.com/maps/map-data/world-map.json}'

                   DataSource="PopulationDetails" ShapeDataPath="Name" ShapePropertyPath='new string[] {"name"}' TValue="Country">

            <MapsBubbleSettings>

                <MapsBubble Visible="true" ValuePath="Population" MaxRadius="50" MinRadius="10" ColorValuePath="Color" DataSource="PopulationDetails" TValue="Country">

                </MapsBubble>

            </MapsBubbleSettings>

        </MapsLayer>

    </MapsLayers>

</SfMaps>


You can find the sample at the below link.

https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorMaps1451853678


NOTE: When you zoom in or out on the Maps, the size of the bubble changes slightly due to the scaling of the map. The bubble may appear larger at the initial zoom value. When zooming in on the map, the bubbles will become smaller. This change in appearance occurs because the bubble's size is determined based on the map's scale. As the map scale changes with zooming, the bubble adjusts accordingly to maintain its relative size and position on the map. This is the behavior of the bubbles in the Maps component, which can be seen in markers too. 


Please let us know if you need any further assistance.


Loader.
Up arrow icon