' +
list[i].name.value + '';
bodydiv.innerHTML += topic;
bodydiv.innerHTML += '' + list[i].abstract.value + '
';
if(list[i].link) {
bodydiv.innerHTML += '' +
'' +
list[i].link.value + '
';
}
var iconFeature = new ol.Feature({
geometry: new ol.geom.Point(
ol.proj.transform(
[parseFloat(list[i].lon.value), parseFloat(list[i].lat.value)],
'EPSG:4326', 'EPSG:3857'))
});
var iconStyle = new ol.style.Style({
text: new ol.style.Text({
fill: new ol.style.Fill({
color: '#FFF',
opacity: 0.5}),
stroke: new ol.style.Stroke({
color: '#00F',
opacity: 0.5,
width: 5}),
text: i+1,
opacity: 0.5,
font: '20px Verdana'
}),
opacity: 0.5
});
iconFeature.setStyle(iconStyle);
vectorSource.addFeature(iconFeature);
}
if(list.length > 0) {
bodydiv.innerHTML += '
' + footer_dbpedia;
} else {
bodydiv.innerHTML = no_inf;
}
})
.error(function() {
req = null;
vectorSource.clear();
bodydiv.innerHTML = dbpedia_err;
});
$('#contentdiv').scrollTop(0);
}
function getRect() {
var lon1 = ol.proj.transform(map.getCoordinateFromPixel([0, 0]),
'EPSG:3857', 'EPSG:4326')[0];
var lat1 = ol.proj.transform(map.getCoordinateFromPixel([0, 0]),
'EPSG:3857', 'EPSG:4326')[1];
var lon2 = ol.proj.transform(map.getCoordinateFromPixel(map.getSize()),
'EPSG:3857', 'EPSG:4326')[0];
var lat2 = ol.proj.transform(map.getCoordinateFromPixel(map.getSize()),
'EPSG:3857', 'EPSG:4326')[1];
var minLon = lon1 < lon2 ? lon1 : lon2;
var maxLon = lon1 > lon2 ? lon1 : lon2;
var minLat = lat1 < lat2 ? lat1 : lat2;
var maxLat = lat1 > lat2 ? lat1 : lat2;
return new Array(minLon, minLat, maxLon, maxLat);
}