Hi,
I am using map control. It shows the markers properly on the map. However, when I apply the print method in the documentation, it does not show the map and markers correctly as in the attachment. I have attached pictures to the attachment. I have added the code below. Can you examine the cause of the error?
Thanks.
@{
var zoom = new Syncfusion.EJ2.Maps.MapsZoomSettings
{
Enable = true,
ZoomFactor = 10,
MinZoom = 5,
MaxZoom = 20,
DoubleClickZoom = true,
ShouldZoomInitially = true
};
var marker = new List<MapsMarker>
{
new MapsMarker{Visible=true, DataSource= ViewBag.ShippingAddresses, Width = 20, Height = 20, LatitudeValuePath="Latitude",
LongitudeValuePath="Longitude"}
};
var cluster = new MapsMarkerClusterSettings
{
AllowClustering = true,
Height = 30,
Width = 30,
Shape = Syncfusion.EJ2.Maps.MarkerType.Circle,
Fill = "#d100d1",
Opacity = 0.7,
AllowClusterExpand = true,
LabelStyle = new MapsFont
{
Color = "White"
}
};
}
@using Syncfusion.EJ2.Maps;
@using Syncfusion.EJ2;
<button class="btn btn-dark" id="print">Print</button>
<ejs-maps id="maps" height="800" width="100%" zoomSettings="zoom" markerClick="markerClick" load="onMapLoad" allowPrint="true" >
<e-maps-layers>
<e-maps-layer layerType="Bing" bingMapType="CanvasLight" markerSettings="marker" markerClusterSettings="cluster"
key="*bingmap key*"></e-maps-layer>
</e-maps-layers>
</ejs-maps>
<script>
function onMapLoad(args) {
window.maps = args.maps;
}
window.onload = function () {
document.getElementById("print").onclick = () => {
window.maps.print();
};
};
function markerClick(args) {
}
</script>
Hi,
Will it be enough for me to just update my syncfusion .net core version in my web application for this development?
Br,
Hi John,
We have fixed the reported issue “position of markers in Bing Maps while printing is not proper” and it is included in our Essential Studio 2022 Volume 1 Main release v20.1.0.47 that is rolled out and is available for download under the following link.
You can also refer the below link in your application to resolve the reported issue.
https://cdn.syncfusion.com/ej2/20.1.47/dist/ej2.min.js
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.
Regards,
Indumathi R