Hello!
I created a new FeatureType with Config/Data/FeatureType/New. The
FeatureType is a view in database postgres. And in my jsp I create a layer
with this featuretype
These are the sentences:
olayer = new OpenLayers.Layer.WMS( 'AR_3_13200',
'http://localhost:8080/geoserver/wms’, {layers: 'topp:Nodos_Sistema',
transparent:'true', styles: '', srs: 'EPSG:4326', tiled: 'true',}, {
'reprojected':true, 'isBaseLayer': false, 'opacity': 0.5 },{buffer: 0});
map.addLayer(olayer);
It' is ok!
Now, I want create a custom featuretype filtering 'topp:Nodos_Sistema' from
code.
For example:
'topp:Nodos_Sistema' is this view
CREATE OR REPLACE VIEW "Nodos_Sistema" AS
SELECT "EL_Nodos".sis_pais AS sis_tipo, "EL_Nodos".sis_codigo,
"EL_Nodos".cap_codigo, "EL_Nodos".nod_id, "EL_Nodos".nod_objeto,
"EL_Nodos".nod_descripcion, "EL_Nodos".oid
FROM el_nodos "EL_Nodos"
WHERE "EL_Nodos".sis_pais = 'SI';
I want create a freaturetype with
SELECT sis_tipo, sis_codigo, cap_codigo, nod_id, nod_objeto,
nod_descripcion,
oid
FROM "Nodos_Sistema"
Where sis_codigo = 1;
And other with
SELECT sis_tipo, sis_codigo, cap_codigo, nod_id, nod_objeto,
nod_descripcion,
oid
FROM "Nodos_Sistema"
Where sis_codigo = 3;
But this from my code, no by web Config/Data/FeatureType/New.
In the geoserver docs I find this, but I don`t like this way
Alternatively, the FeatureType can be defined by manually creating a
directory ("localPostgis_test" in this example), with an info.xml file in
the featureTypes folder, which is itself located in Geoserver's data
directory. The catalog still needs to be reloaded, so the new FeatureType
is available.
Thank you
Regards
Abel
--
View this message in context: http://www.nabble.com/Custom-FeatureType-tp22789714p22789714.html
Sent from the GeoServer - User mailing list archive at Nabble.com.