I keep getting an insert error from geoserver when trying to save a point, poly etc etc to my postgis table. any ideas, my code is below
var Projection = new OpenLayers.Projection("EPSG:4326");
var map = new OpenLayers.Map("Map", {
//projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection:Projection,
controls:[]
}
);
//add google map
var GoogleMap = new OpenLayers.Layer.Google(
"GoogleSatellite",{
type:G_SATELLITE_MAP,
isBaseLayer:true,
sphericalMercator:true,
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),
numZoomLevels: 21
}
);
var NYC = new OpenLayers.Layer.WMS(
"nyc_buildings - Tiled", "http://soiisdev:8080/geoserver/wms",
{
layers: 'cite:nyc_buildings',
styles: '',
format: "image/png",
tiled: 'true',
transparent: true,
Projection:Projection
},
{
buffer: 0,
displayOutsideMaxExtent: true
}
);
var saveStrategy = new OpenLayers.Strategy.Save({auto:true})
var vectors = new OpenLayers.Layer.Vector("Vectors", {
strategies: [
new OpenLayers.Strategy.BBOX(),
saveStrategy
],
Projection:Projection,
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
url: "http://soiisdev:8080/geoserver/wfs",
featureNS : "http://www.opengeospatial.net/cite",
featureType: "nyc_vectors",
srsName: "EPSG:4326"
})
});
map.addLayers([GoogleMap, NYC, vectors]);
//map.zoomToMaxExtent();
var LonLat = new OpenLayers.LonLat(-73.988113, 40.750898);
LonLat.transform(Projection, map.getProjectionObject());
map.setCenter(LonLat, 15);
ive checked the header in fiddler and below is the xml sent to geoserver
-73.986374928559 40.742379645006
No comments:
Post a Comment