I have asked this before but probably should have provided more information.
Please find below the data returned by the service.
I need to get hold on ‘geometria’, ‘nombre’ and ‘provincia’. So far, either
with or without prefix, in lower case or camelcase I always get back a ‘
property name xxx could not be resolved’.
Hi list,
I have a particular WFS layer here which is giving me trouble and I need some
help on identifying the correct geometryName and the filter property.
It’s gazetteer service and I want to apply comparison filters eventually.
var myFilter = new OpenLayers.Filter.Comparison({
type: "~",
property: "nombreEntidad", //no
value: "Madrid"
});
So far I’ve managed to display points on my map using Strategy.Fixed without
any filter:
var myLayer = new OpenLayers.Layer.Vector( "my title", {
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://www.idee.es/IDEE-WFS-Nomenclator-NGC/services?",
featureType: 'Entidad',
featurePrefix: 'mne',
featureNS : "http://www.idee.es/mne",
readFormat: new OpenLayers.Format.GML(),
srsName: "EPSG:4230",
version: '1.1.0',
maxFeatures: 10,
extractAttributes: true
}),
projection: new OpenLayers.Projection("EPSG:4230"),
// filter: myFilter;
});
I tried setting the filter property to "nombre" or "nombreEntidad" – with and
without prefix, but no luck. ("PropertyName " nombreEntidad" cannot be
resolved”).
For applying any spatial filters or just the BBOX strategy I’d have to indicate
additionally the geometryName which I haven’t figured out either.
Besides, I can select features but the attribute values are null
(feature.attributes have the expected keys but their values are null).
Does anybody have a clue? I could post some XML if it’s of help.
I’d also like to know if there is any difference in terms of performance
between
1) filterStrategy, 2) filter, and 3) style with a rule and a filter. I guess
the third option is slowest but what about the other 2 options?
Best regards
Any advice would be highly appreciated. Here comes the string of one point:
<wfs:FeatureCollection numberOfFeatures='1'
xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mne="http://www.idee.es/mne" xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://www.idee.es/mne
http://www.idee.es:80/IDEE-WFS-Nomenclator-NGC/services?SERVICE=WFS&amp;VERSION=1.1.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=mne:Entidad&amp;NAMESPACE=xmlns(mne=http://www.idee.es/mne)
http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"><gml:boundedBy><gml:Envelope
srsName='EPSG:4230'><gml:pos srsDimension='2'>-4.9
38.2333333333333</gml:pos><gml:pos srsDimension='2'>-4.9
38.2333333333333</gml:pos></gml:Envelope></gml:boundedBy><gml:featureMember><mne:Entidad
gml:id="ES.IGN.NGC_1018"><gml:boundedBy><gml:Envelope
srsName='EPSG:4230'><gml:pos srsDimension='2'>-4.9
38.2333333333333</gml:pos><gml:pos srsDimension="2">-4.9
38.2333333333333</gml:pos></gml:Envelope></gml:boundedBy><mne:nombreEntidad><mne:NombreEntidad
gml:id="ES.IGN.NGC_1018.GM2TENQ171644"><mne:nombre>Sierra
Chimorra</mne:nombre><mne:idioma>spa</mne:idioma><mne:claseNombre>preferente</mne:claseNombre><mne:estatus>oficial</mne:estatus><mne:fuente>1:1
millón: Mapa de la Península Ibérica, Baleares y Canarias, escala 1:1.000.000.
Instituto Geográfico Nacional, 2000</mne:fuente></mne:NombreEntidad>
</mne:nombreEntidad><mne:tipoEntidad><mne:TipoEntidad
gml:id="ES.IGN.NGC.TP.J5JE6R2S171644"><mne:tipo>OROGR</mne:tipo><mne:catalogoEntidades>URL:http://www.idee.es/show.do?to=pideep_conciso.ES</mne:catalogoEntidades></mne:TipoEntidad>
</mne:tipoEntidad><mne:tipoEntidad><mne:TipoEntidad
gml:id="ES.IGN.NGC.TP.KNUWK4TSME171644"><mne:tipo>Sierra</mne:tipo><mne:catalogoEntidades>URL:http://www.idee.es/show.do?to=pideep_conciso.ES</mne:catalogoEntidades></mne:TipoEntidad>
</mne:tipoEntidad><mne:posicionEspacial><mne:PosicionEspacial
gml:id="ES.IGN.NGC.PS.GEYDKNBUHA171644"><gml:boundedBy><gml:Envelope
srsName='EPSG:4230'><gml:pos srsDimension='2'>-4.9
38.2333333333333</gml:pos><gml:pos srsDimension="2">-4.9
38.2333333333333</gml:pos></gml:Envelope></gml:boundedBy><mne:geometria><gml:Point
srsName="EPSG:4230">
<gml:pos srsDimension="2">-4.9 38.2333333333333</gml:pos>
</gml:Point></mne:geometria></mne:PosicionEspacial>
</mne:posicionEspacial><mne:entidadLocal><mne:EntidadLocal
gml:id="ES.IGN.NGC.EL.IPZXEZDPMJQQ171644"><mne:comunidadAutonoma>Andalucía</mne:comunidadAutonoma><mne:provincia>Córdoba</mne:provincia></mne:EntidadLocal>
</mne:entidadLocal><mne:codificacion><mne:Codificacion
gml:id="ES.IGN.NGC.CO.NGC_1018171644"><mne:codigo>NGC_1018</mne:codigo><mne:sistemaCodificacion>Nomenclátor
Geográfico Conciso 1.0. Instituto Geográfico
Nacional</mne:sistemaCodificacion></mne:Codificacion>
</mne:codificacion><mne:mapa><mne:Mapa
gml:id="ES.IGN.NGC.MA.JVKE4NJQ.GA4DQMA171644"><mne:serie>MTN50</mne:serie><mne:hoja>0880</mne:hoja></mne:Mapa>
</mne:mapa></mne:Entidad>
</gml:featureMember></wfs:FeatureCollection>
_______________________________________________
Dev mailing list
d...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-dev