|
<div style="height: 300px; border: 0.5px solid
#E5E5E5">
</div>
<div>
<SfMaps>
<MapsTitleSettings Text="Top 25 Populated Cities in the
World">
<MapsTitleTextStyle Size="16px" FontFamily="Segoe UI"
/>
</MapsTitleSettings>
<MapsZoomSettings Enable="true"
ZoomFactor="2"></MapsZoomSettings>
<MapsLayers>
<MapsLayer UrlTemplate=https://tile.openstreetmap.org/level/tileX/tileY.png
TValue="string">
@* Add marker *@
<MapsMarkerSettings>
<MapsMarker Visible="true" Height="25"
Width="15" DataSource="Cities"
TValue="PopulationCityDetails">
</MapsMarker>
</MapsMarkerSettings>
</MapsLayer>
</MapsLayers>
</SfMaps>
</div>
@code
{
public class PopulationCityDetails
{
public double Latitude { get; set; }
public double Longitude { get; set; }
public string Name { get; set; }
public double Population { get; set; }
public string Country { get; set; }
public string Continent { get; set; }
}
private ObservableCollection<PopulationCityDetails>
Cities = new ObservableCollection<PopulationCityDetails> {
new PopulationCityDetails { Name="Tokyo", Latitude=35.6894875,
Longitude=139.6917064, Population=33200000, Country="Japan",
Continent="Asia" },
..........
........
}
}
|