QA Automation/Manual: API and Web/UI : Java, Cucumber, Selenium, Junit, TestNG, Java Script, Postman/Newman, Maven, TestLink, Azure Test Plans, Jira, AutoIT
CI/CD: Azure DevOps, Team City, Batch Scripting, Perl Scripting, Chef
Business Intelligence : Jaspersoft, Pentaho, Tableau, Power BI | Reports, Dashboards, Analysis, Data Integration, ETL
Cloud Computing & OS : AWS, Cent OS
Subscribe to:
Post Comments (Atom)
Hi Sadakar,
ReplyDeleteI have created a CVC to generate leafletjs based map in a report. But I did not get the output in JAVA. I am only getting output in HTML format.
I am unable to get the SVG part in the code. Please check the below code. Can you please look into it and let me know where I am going wrong.
Raghav
define('LeafletMap',["leaflet","LeafletMap"], function (Leaflet) {
return function (instanceData) {
var w = instanceData.width,
h = instanceData.height;
//L.Icon.Default.imagePath = 'D:/JasperWorkJava/CVC/l_map/images' //L.Icon.Default.imagePath = '/sites/all/libraries/leaflet/dist/images'
var margin = 20;
var series0 = instanceData.series[0];
//alert(series0);
var map = L.map(instanceData.id).setView([-0.179901, -78.462982], 7);
L.esri.basemapLayer("Streets").addTo(map);
/* var base = L.tileLayer(
'https://mapssl.location-world.com/ArcGIS/rest/services/GlobalWMA/MapServer/tile/{z}/{y}/{x}', {
maxZoom: 19,
attribution: 'Map data © Location-World'
}).addTo(map); */
for (var index = 0; index < series0.length; ++index) {
var record = series0[index];
/* var MMarker = L.MakiMarkers.icon({
icon: "circle",
color: '#f03',
size: "m"
}); */
//alert(record.Latitude);
/* var marker1 = L.marker([record.Latitude,record.Longitude]).addTo(map); */
var circle = L.circle([record.Latitude,record.Longitude], record.Amount, {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.5
}).addTo(map);
}
/* var svg = Leaflet.select("#" + map ).append("div")
.attr("id", instanceData.id + "svg")
.style("width", w + "px")
.style("height", h + "px")
.append("svg:svg")
.attr("width", w)
.attr("height", h)
.append("svg:g")
.attr("transform", "translate(.5,.5)"); */
};
});