var map= L.map('map').setView([-19, 50], 6);
var base = L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:""});
base.addTo(map);
var geojsonLayer = new L.GeoJSON();
function handleJson(data) {
console.log(data)
geojsonLayer.addData(data);
map.addLayer(geojsonLayer);
}
var geoJsonUrl = "http://localhost:8080/geoserver/STEG/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=STEG:potentiel&maxFeatures=50&outputFormat=text/javascript&format_options=callback:getJson"
$.ajax({
url : geoJsonUrl,
dataType : 'jsonp',
jsonpCallback: 'getJson',
success : handleJson
});