Hi,
I need to implement the bubble map using latitude and longitude. I couldn't see any example of this in the documentation and working from the Marker and Bubble examples trying to make a hybrid of the two demos to no success.
I found an old post on here from 2019 with a work around as Bubble maps didn't support lat/long:
Is there a builtin feature to create bubble map base on their geoinfo? | Blazor Forums | Syncfusion
So, just wondering if this is now supported or if the workaround is still the only solution?
Thanks
Hi Rob,
The Maps component does not support displaying bubbles based on latitude and longitude values. As indicated in the provided forum, this can be achieved by using markers with marker shapes set to "Circle". The size of the marker can be adjusted according to your requirements using the "Width" and "Height" properties. We do not have plans to implement latitude and longitude support for bubbles, as this functionality is already achievable with markers. Therefore, please use markers in your application to fulfill your requirements with the Maps component.
Please
let us know if you need any further assistance.
Is there a way to set width and height based on a property of the datasource ?
I have the datasource with latitude, longitude and frequency values so I'd like to set the width and height based on frequency value
Hi Walter,
Currently, the Maps component does not support setting the height and width for each marker individually. We have planned to implement properties that will allow you to set the height and width of markers based on data from the data source. We have considered your requirement as an improvement and added it to our feature request list. This implementation is expected to be included in our 2024 Volume 4 release, which is anticipated to be available by December 2024. In the meantime, you can use the feedback link below to keep track of this feature.
Hi Walter,
We have implemented the requirement - “Support to set width and height of the markers from the datasource in the Maps” and the fix is included in our Essential Studio® 2024 Volume 4 release v28.1.33 which is rolled out and is available for download under the following link.
To achieve your scenario, we have introduced two new properties, WidthValuePath and HeightValuePath, in the MapsMarker tag. You need to set the field names for the width and height values in the data source to these properties. This will allow the markers in the provided group to have different sizes. Below is the code snippet demonstrating this implementation.
Code Snippet:
|
@using Syncfusion.Blazor.Maps
<SfMaps> <MapsLayers> <MapsLayer ShapeData='new { dataOptions = "https://cdn.syncfusion.com/maps/map-data/world-map.json" }' TValue="string"> <MapsMarkerSettings> <MapsMarker Visible="true" Shape="MarkerType.Circle" DataSource="MarkerData" WidthValuePath="Width" HeightValuePath="Height" TValue="City"> </MapsMarker> </MapsMarkerSettings> <MapsShapeSettings Fill="lightgray"></MapsShapeSettings> </MapsLayer> </MapsLayers> </SfMaps> @code { public class City { public double Latitude { get; set; } public double Longitude { get; set; } public double Width {get; set; } public double Height {get; set; } }; public List<City> MarkerData = new List<City> { new City { Latitude=49.95121990866204, Longitude=18.468749999999998, Width=30, Height=30 }, new City { Latitude=59.88893689676585, Longitude=-109.3359375 , Width=20, Height=20 }, new City { Latitude=-6.64607562172573, Longitude=-55.54687499999999 , Width=10, Height=10} }; }
|
Meanwhile, we have created a sample that demonstrates the same from the below link.
https://blazorplayground.syncfusion.com/VXBfsrMAARdAjehV
We
thank you for your support and appreciate your patience in waiting for this
release. Please get in touch with us if you would require any further
assistance.