//wfs-t editable overlay var wfs_layer = new OpenLayers.Layer.Vector("Vector sample", { strategies: [new OpenLayers.Strategy.Fixed()], //projection: new OpenLayers.Projection("EPSG:4326"), protocol: new OpenLayers.Protocol.WFS({ version: "1.1.0", // loading data through localhost url path url: ".....", featureNS : ".....", extractAttributes: true, // layer name featureType: "....", geometryName: "geom", schema: "localhost:8080/geoserver......" }) });
//vector style: var vector_style = new OpenLayers.Style({ 'fillColor': '#669933', 'fillOpacity': .8, 'strokeColor': '#aaee77', 'strokeWidth': 3, 'pointRadius': 8 });
//wfs-t editable overlay
var wfs_layer = new OpenLayers.Layer.Vector("Vector sample", {
strategies: [new OpenLayers.Strategy.Fixed()],
//projection: new OpenLayers.Projection("EPSG:4326"),
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
// loading data through localhost url path
url: ".....",
featureNS : ".....",
extractAttributes: true,
// layer name
featureType: "....",
geometryName: "geom",
schema: "localhost:8080/geoserver......"
})
});
//vector style:
var vector_style = new OpenLayers.Style({
'fillColor': '#669933',
'fillOpacity': .8,
'strokeColor': '#aaee77',
'strokeWidth': 3,
'pointRadius': 8
});
var vector_style_select = new OpenLayers.Style({
'fillColor': '#FF0000',
'fillOpacity': .10,
'graphicName': 'circle',
//'label': 'klik',
'pointRadius': 8,
'strokeColor': '#f86633',
'strokeDashstyle': 'solid',
'strokeWidth': 4
});
var vector_style_iz_table = new OpenLayers.Style({
'cursor': 'pointer',
'fillColor': '#669933',
'fillOpacity': .8,
'fontColor': '#343434',
'label': '${table1}',
'pointRadius': '8',
'strokeColor': '#aaee77',
'strokeWidth': 3,
'strokeDashstyle': 'solid',
'strokeWidth': '${4}'
});
var vector_style_map = new OpenLayers.StyleMap({
'default': vector_style_iz_table,
'select': vector_style_select
});
wfs_layer.styleMap = vector_style_map;