I've got an issue I am using GeoServer of boundlessSuite and when I tried to load a layer in OpenLayers 3 it doesn't show on the map. I found the problem but can't fix it.
On my GeoServer when I use the preview to see my layer this is the URL:
but when I inspect element on Chrome this is what it tries to load:
How can I fix that?
Here is my code:
var layers = [
new ol.layer.Tile({
source: new ol.source.OSM()
}),
new ol.layer.Tile({
extent: [-13884991, 2870341, -7455066, 6338219],
source: new ol.source.TileWMS({
url: 'http://localhost:8080/geoserver/test1/wms?',
params: {'LAYERS': 'test1:BoiteOptiqueTest'},
serverType: 'geoserver',
isBaseLayer: false,
projection: 'EPSG:4326'
})
})
];
var map = new ol.Map({
layers: layers,
target: 'map',
view: new ol.View({
projection: 'EPSG:4326',
center: [0, 0],
zoom: 2
})
});
I tried using different projections like EPSG::32620, EPSG::900913 but nothing works.