Still working at it... and yep, its not that simple as i thought before...
the demo-server is working fine. I tried the following featureType
<FeatureType>
<Name>og:roads</Name>
<Title>roads</Title>
<Abstract/>
<ows:Keywords><ows:Keyword>features</ows:Keyword><ows:Keyword>roads</ows:Keyword></ows:Keywords><DefaultCRS>urn:ogc:def:crs:EPSG::26713</DefaultCRS><ows:WGS84BoundingBox><ows:LowerCorner>-103.88034577292942 44.30742621244438</ows:LowerCorner><ows:UpperCorner>-103.62013461674628 44.567637368627516</ows:UpperCorner></ows:WGS84BoundingBox></FeatureType>
with the following code:
map = new L.Map('map', {
center: new L.LatLng(44.095475729465, -72.388916015626),
zoom: 7,
layers: [mapquest],
zoomControl: true
});
var owsrootUrl1 = 'http://demo.opengeo.org/geoserver/ows';
var defaultParameters1 = {
service : 'WFS',
version : '2.0.0',
request : 'GetFeature',
typeName : 'og:roads',
outputFormat: 'json'
};
var parameters1 = L.Util.extend(defaultParameters1);
var URL1 = owsrootUrl1 + L.Util.getParamString(parameters1);
alert(URL1);
var ajax = $.ajax({
url : URL1,
dataType : 'jsonp',
jsonpCallback : 'getJson',
success : WFSLayer
});
function WFSLayer(data) {
console.log(WFSLayer(data));
L.geoJson(data, {
style: function (feature) {
return {color: 'black',
fillColor: '#ff0000',
fillOpacity: 0.10};
}
}).addTo(map);
}
The alert(URL1) is working, this is the output:
http://demo.opengeo.org/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=og:roads&outputFormat=json
So far so good... but what should happen next?
There is no visible success. i thought the WFSLayer() function add a visible Layer to my USA-Map.
Need HEEEELP !!!! :D
no, seriously... please help me
THANKS in advance
ps: i´m from germany, so if you want to answer in german, no probs ;)