I use wms layer from geoserver on my map and i use openlayers3 api. I want to zoom to my selected layer but for this i have too use extent of my selected layer.
mySelectedLayer=map.getLayers().getArray()[map.getLayers().getLength()-1];
mySelectedLayer.getExtent()// result is undefined
why?