Monday, 9 October 2017

geoserver - Openlayers: error 405 (Method not allowed) while attempting to add a WFS-T layer


I need your help: basically I need to add, on a map with several layers already on, another layer WFS-T to allow adding and saving new features to a database. I checked on the internet and syntax looks OK, but all I get is an error 405 (method not allowed).


The server I'm using for the web app is IIS Express; for the layers I'm using GeoServer hosted on it's default server (not Apache) on port 8080. Of course I'm already using a proxy. Here is also the piece of my code about the WFS layer:


var database_poi = new OpenLayers.Layer.Vector("Points on Database", {
protocol: new OpenLayers.Protocol.WFS({
version: '1.1.0',

url: 'http://localhost:8080/geoserver/wfs',
featureType: 'database_poi',
geometryName: 'ogr_geometry',
srsName: 'EPSG:4326',
featurePrefix: "Grottole"
}),
strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy],
projection: new OpenLayers.Projection('EPSG:4326'),
eventListeners: {
'featureselected': function (evt) {

var feature = evt.feature;
var popup = new OpenLayers.Popup.FramedCloud("popup",
OpenLayers.LonLat.fromString(feature.geometry.toShortString()),
null,
feature.attributes.ogr_geometry,
null,
true,
null
);
popup.autoSize = true;

popup.maxSize = new OpenLayers.Size(400, 800);
popup.fixedRelativePosition = true;
feature.popup = popup;
map.addPopup(popup);
}
}

});

I really hope you can help me





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...