About your first question ol.source.ServerVector is deprecated and yes you may use ol.source.Vector instead.
For you second question, you may read some info about the url
here here. I use the loader
function instead of url so I am not familiar to explain more about the url
.
Now about the startegy
. This is indicating which features to load. This could be:
ol.loadingstrategy.bbox
means will only load features exist within you current map MBR.
ol.loadingstrategy.all
means all features will be loaded in a single request
ol.loadingstrategy.tile
means loading features based on a tile grid.
(you may find some info for strategies here)
This is an example of a wfs layer that may give you some idea (I am using the loader
function)
var vecLyr = new ol.layer.Vector({
source: new ol.source.Vector({
loader: function(extent, resolution, projection) {
var urlTo = CONTEXT_ROOT + '/proxygetfeatures?targetURL='+MainApp.getGSUrl()+'/wfs?request=GetFeature' +
encodeURIComponent('&VERSION=1.1.0&SERVICE=WFS&TYPENAME=sdo_test:LAYERNAME') +
encodeURIComponent('&outputFormat=json')+
encodeURIComponent('&srsname=EPSG:2100&BBOX=' + extent.join(',') + ',EPSG:2100');
Ext.Ajax.request({
url : urlTo,
method : 'GET',
success: function(response) {
var res = Ext.decode(response.responseText);
var geojsonFormat = new ol.format.GeoJSON({
});
vecLyr.getSource().addFeatures(geojsonFormat.readFeatures(res,{
dataProjection : 'EPSG:2100',
featureProjection : 'EPSG:'+MainApp.Map.globalEpsgCode
}));
}
});
},
strategy: ol.loadingstrategy.bbox
}),
minResolution : getResolutionFromScale(100,'min'),
maxResolution : getResolutionFromScale(30000,'max'),
visible : false,
style : Layers.Styler.ParseJsonSldToOlStyle(wfsSldDocs[0])
})