Hi Armin

I tried define <layer type="ms" name="MyTerrenos"> in search.xml.
But the problem persist.

At log file pm_debug.log we can see the message below:
====================================
[23-Sep-2009 10:26:08] P.MAPPER debug info
Validation of search.xml file FAILED:
<br />
<b>Warning</b>:  DOMDocument::schemaValidate() [<a
href='function.DOMDocument-schemaValidate'>function.DOMDocument-schemaValidate</a>]:
Element 'layer', attribute 'type': [facet 'enumeration'] The value
'ms' is not an element of the set {'postgis', 'shape', 'xy',
'oracle'}. in <b>C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\query\search.php</b>
on line <b>66</b><br />
<br />
<b>Warning</b>:  DOMDocument::schemaValidate() [<a
href='function.DOMDocument-schemaValidate'>function.DOMDocument-schemaValidate</a>]:
Element 'layer', attribute 'type': 'ms' is not a valid value of the
local atomic type. in
<b>C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\query\search.php</b> on
line <b>66</b><br />
=======================================================

I changed the file search.xsd to insert the type "ms", but didn't resolve.

I'd like to try using the "XY Layer".
But i don't know how to configure the the map file.
The p.mapper doc says:

=============
XY Layers

One can use point layers based on DBMS tables that have x/y fields for
the coordinates. The data can be in any DB supported by PEAR. The
definition in the map file has to be as "XYLAYER_PROPERTIES" in the
METADATA tag, like the following example:

|--- IN METADATA --" |--- PEAR DB definition string ----------||- DB
table -...@- Filter -||coordinate fields
"XYLAYER_PROPERTIES"
"sqlite://'':''/home/data/sqlite/gisdb.db||cities_cn...@inh>100000||x,y"
=============

How to configure "XYLAYER_PROPERTIES" for a MySQL database?
Do you have any example?
How may i configure the tags: CONNECTIONTYPE, CONNECTION and DATA, at map file?

Thanks,
Homero



2009/9/22, Armin Burger <armin.bur...@gmail.com>:
> You defined your layer as a OGR dataset (Mapserver specific), not as XY
> Layer (specific only to p.mapper). If you want the latter then you need to
> follow the descriptions for it in the p.mapper docs. If you want to try the
> search on the OGR layer just define it as
>
>  <layer type="ms" name="MyTerrenos">
>
>  in the search.xml and see if it returns results.
>
>  armin
>
>
>  On 22/09/2009 23:08, Homero Cavalcanti wrote:
>
> >
> > Hi
> >
> > I have a application accessing a MySQL database using OGR and a "XY
> LAYER".
> > I'm using MapServer 5.0.2 and p.mapper 3.2.0
> >
> > The points are plotted correctly on de map.
> > The IDENTIFY functionality is OK.
> >
> > But the SEARCH functionality don't work.
> > Always return: "Records not found"
> >
> > I don't know what is wrong.
> >
> > I didn't define the attribute "XYLAYER_PROPERTIES" in the METADATA.
> > Is it necessary?
> > If yes, how to configure it for MySQL
> >
> > Somebody can help me?
> >
> > ======================
> > This is my OVF file
> > ======================
> >
> > <OGRVRTDataSource>
> >    <OGRVRTLayer name="aqidata">
> >
> >
> <SrcDataSource>MYSQL:habitacionais,user=user,password=pw,host=localhost,port=3306,tables=terrenos</SrcDataSource>
> >        <SrcSQL>SELECT
> >
> id,situacao,endereco,bairros.nome_bairro,propriedade.propriedade,propriedade_perc,contrato,habitacional,area,uh_PAC,uh_PROMETROPLE,data_Conclusao_Memorial_Descritivo,data_decreto_UP,data_conclusao_laudo_avaliacao,data_consulta_GRPU,situacao_atual,processo_negociacao,data_solicitacao_acao_imissao_posse_SAJ,data_ajuizamento_acao_imissao,data_deposito,data_imissao_provisoria_posse,data_imissao_definitiva_posse,matricula_registro_escritura,data_desistencia,oficio_desistencia,motivo_desistencia,observacao,coord_x,coord_y
> > FROM terrenos, bairros, propriedade WHERE terrenos.bairro =
> > bairros.codigo_bairro AND
> >
> terrenos.propriedade=propriedade.codigo_propriedade</SrcSQL>
> >        <GeometryType>wkbPoint</GeometryType>
> >        <GeometryField encoding="PointFromColumns" x="coord_x"
> y="coord_y"/>
> >    </OGRVRTLayer>
> > </OGRVRTDataSource>
> >
> >
> > =========================
> > This is my MAP file for the layer
> > =========================
> > ...
> > ...
> > ...
> > #
> > # Start of Layer MySQL habitacionais.terrenos
> > #
> > LAYER
> >    NAME "MyTerrenos"
> >    TYPE POINT
> >    LABELITEM "situacao"
> >    CLASSITEM   "situacao"
> >    CONNECTIONTYPE OGR
> >    CONNECTION "aqidata.ovf"
> >    DATA "aqidata"
> >    TOLERANCE 3
> >    TOLERANCEUNITS pixels
> >    TEMPLATE void
> >    METADATA
> >        "DESCRIPTION" "Terrenos"
> >        "RESULT_FIELDS"
> >
> "id,situacao,endereco,nome_bairro,propriedade,propriedade_perc,contrato,habitacional,area,uh_PAC,uh_PROMETROPLE,data_Conclusao_Memorial_Descritivo,data_decreto_UP,data_conclusao_laudo_avaliacao,data_consulta_GRPU,situacao_atual,processo_negociacao,data_solicitacao_acao_imissao_posse_SAJ,data_ajuizamento_acao_imissao,data_deposito,data_imissao_provisoria_posse,data_imissao_definitiva_posse,matricula_registro_escritura,data_desistencia,oficio_desistencia,motivo_desistencia,observacao,coord_x,coord_y"
> >        "RESULT_HEADERS"
> "Id,Situação,Endereço,Bairro,Propriedade,%
> >
> Propriedade,Contrato,Habitacional,Área,uh_PAC,uh_PROMETROPLE,Data
> Conclusao
> > Memorial Descritivo,Data decreto UP,Data conclusao laudo avaliacao,Data
> > consulta GRPU,Situacao GRPU,Processo negociacao,Data solicitacao acao
> > imissao posse SAJ,Data ajuizamento acao imissao,Data deposito,Data imissao
> > provisoria posse,Data imissao definitiva posse,Matricula registro
> > escritura,Data desistência,Ofício desistência,Motivo
> > desistência,Observação,coord_x,coord_y"
> >        "RESULT_HYPERLINK" "id"
> > #            "XYLAYER_PROPERTIES"
> >
> "sqlite://'':''/home/data/sqlite/gisdb.db||cities_cn...@inh>100000||x,y"
> > #            "XYLAYER_PROPERTIES" "mysql://user:[EMAIL
> > PROTECTED]/landmark||[EMAIL
> PROTECTED]'Hospitals'||longitude,latitude,0"
> >
> >        "LAYER_ENCODING" "ISO-8859-1"
> >        "ows_title"      "MyTerrenos"
> >    END  # Metadata
> >    CLASS
> >       TEMPLATE void
> >       NAME "Inicial"
> >       EXPRESSION "INICIAL"
> > ...
> > ...
> > ...
> >
> > ====================
> > This is my SEARCH.XML
> > ====================
> > ...
> > ...
> >    <searchitem name="MyTerrenos" description="MyTerrenos">
> >        <layer type="xy" name="MyTerrenos">
> >            <field type="n" name="id" description="id" wildcard="0" />
> >    </layer>
> >    </searchitem>
> > ...
> > ...
> >
> > ====================
> > This is the pm_debug.log
> > ====================
> > ...
> > ...
> > [22-Sep-2009 17:39:16] P.MAPPER debug info
> > Searcharray in search.php->getSearchParameters()
> >  Array
> > (
> >    [id] => 44
> >    [mode] => search
> >    [PHPSESSID] => 4382880ecbc123a9527c1007a95c2cfc
> > )
> >
> > [22-Sep-2009 17:39:16] P.MAPPER debug info
> > Parameters for searchArray
> > file: query.php->q_execAttributeQuery
> >
> >  Array
> > (
> >    [id] => 44
> >    [mode] => search
> >    [PHPSESSID] => 4382880ecbc123a9527c1007a95c2cfc
> > )
> >
> > [22-Sep-2009 17:39:16] P.MAPPER debug info
> > Parameters for searchParams
> > file: query.php->q_execAttributeQuery
> >  Array
> > (
> >    [layerName] => MyTerrenos
> >    [layerType] => xy
> >    [firstFld] => id
> >    [qStr] =>   id = 44
> > )
> >
> >
> > Thanks
> > Homero S. Cavalcanti
> > Prefeitura do Recife
> >
> ------------------------------------------------------------------------------
> > Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> > is the only developer event you need to attend this year. Jumpstart your
> > developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> > http://p.sf.net/sfu/devconf
> > _______________________________________________
> > pmapper-users mailing list
> > pmapper-users@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
> >
> >
>
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to