private void SfMap_SizeChanged(object sender, SizeChangedEventArgs e)
{
var markers = (map.Layers[0] as ShapeFileLayer).Markers;
if (markers == null)
(map.Layers[0] as ShapeFileLayer).Markers = viewModel.Models;
} |
this.Models = new ObservableCollection<Model>();
this.Models.Add(new Model() { Name = "USA ", Latitude = "38.8833N", Longitude = "77.0167W" });
this.Models.Add(new Model() { Name = "Brazil ", Latitude = "15.7833S", Longitude = "47.8667W" });
this.Models.Add(new Model() { Name = "India ", Latitude = "21.0000N", Longitude = "78.0000E" });
this.Models.Add(new Model() { Name = "China ", Latitude = "35.0000N", Longitude = "103.0000E" });
this.Models.Add(new Model() { Name = "Indonesia ", Latitude = "6.1750S", Longitude = "106.8283E" }); |
<syncfusion:ShapeFileLayer.SubShapeFileLayers>
<syncfusion:SubShapeFileLayer x:Name="africaLayer"
MarkerTemplate="{StaticResource markerTemplate}"
Uri="MapsWPF.ShapeFiles.Africa.shp">
..
</syncfusion:SubShapeFileLayer>
<syncfusion:SubShapeFileLayer x:Name="australiaLayer"
Markers="{Binding Australia}"
MarkerTemplate="{StaticResource markerTemplate}"
Uri="MapsWPF.ShapeFiles.australia.shp">
..
</syncfusion:SubShapeFileLayer>
</syncfusion:ShapeFileLayer.SubShapeFileLayers> |
private void SfMap_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (australiaLayer.Markers == null)
australiaLayer.Markers = viewModel.Australia;
if (africaLayer.Markers == null)
africaLayer.Markers = viewModel.Africa;
} |
<syncfusion:SubShapeFileLayer.ShapeSettings>
<syncfusion:ShapeSetting ShapeStroke="Transparent" ShapeFill="Transparent">
</syncfusion:ShapeSetting>
</syncfusion:SubShapeFileLayer.ShapeSettings> |