[pmapper-users] search.xml with 2 fields (one depending on another)

2013-05-30 Thread Sylvain Arabeyre
Dear all,I've been struggling with the search.xml and the dependfld
parameter.I want to set a search with 2 fields, one depending on another (a
suggest depending on an option) with shapefile data.My problem is that the
suggest field suggests all values from the data without taking into
account the value chosen in the options field.I've come across  this
thread
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-search-xml-with-2-fields-td4025124.html
  
and tried all the suggestions from there (namely replace the compressed js
files from the ones from trunk) but it still won't work.Here's what my
search.xml looks like:$ 


onchange=$('#pmsfld_DESIGNA').val('').flushCache()



Even when I change the connection to db and point to the .dbf file of the
shapefile, the suggest list from the second field (DESIGNA) will show all
values and not just the values that depend on the first field (TIPE).As
the first field (TIPE) has special characters, I thought this might be an
issue and eliminated them but even though, the search won't work
properly.I'm working with ms4w version 3.0.6 (Apache 2.2.22, PHP 5.4.3,
Mapserver version: 6.0.3) in a Windows SP environment
(SP3).Thanks.Regards,Sylvain.



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/search-xml-with-2-fields-one-depending-on-another-tp4025207.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.
--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-05 Thread Chris forum
Hi Armin, Thomas,

I had to deal with another little problem, accents in the street names from
the postgis DB which is encoded in ISO-8859-1.

- They are replaced by a special text character in the drop down menu.
Just need to specify the right dns for both fields in the search.xml file:
dsn encoding=ISO-8859-1

The content of the drop down menu is now ok, but as the main html page is
UTF-8 encoded, the query is still sended back to postgis in UTF-8.

- Had to add an utf8_decode in suggest.php, function dbSuggestMatch:
foreach ($dependFields as $fieldName = $fieldValue) {
*pm_logDebug(3, $fieldValue, fieldvalue before utf8decode);**
$fieldValue = utf8_decode($fieldValue); //utf8 - iso-8859-1
**pm_logDebug(3, $fieldValue, fieldvalue after
utf8decode);*

   $sql = str_replace(array('[dependfldval]',
[dependfldval_$fieldName]), trim($fieldValue), $sql);
}

the logDebug shows, when searching the street name Genève:
[05-Apr-2013 11:18:14] P.MAPPER debug info
fieldvalue before utf8decode
 Genève
[05-Apr-2013 11:18:14] P.MAPPER debug info
fieldvalue after utf8decode
 Genève

Works fine now, don't know if it is the proper way to do it though for an
SVN commit.

Talking about SVN, is it ok for you if I let you know through emails what I
had to correct to have p.mapper working?

Cheers,
Chris





On Thu, Apr 4, 2013 at 9:32 AM, Chris forum bak.fo...@gmail.com wrote:

 Hi Armin, Thomas

 I've just replaced the 3 compressed JS files, search works fine now using
 them!

 Ok, flushCache is set.

 Thx a lot guys, pmapper rocks!
 Chris






 On Wed, Apr 3, 2013 at 7:39 PM, Armin Burger armin.bur...@gmail.comwrote:

 On 04/03/2013 03:55 PM, Chris forum wrote:
  Should I dare asking a last question?
  Do I better use this, what is it actually doing?
  eventsonchange=$('#pmsfld_numero').val('').flushCache()/events
 

 that resets the text input field and empties the auto-complete cache of
 the  suggest, so usually it is recommended to be set. You need to adapt
 the xyz part of '#pmsfld_xyz' to the suggest field name.






 --
 Minimize network downtime and maximize team effectiveness.
 Reduce network management and security costs.Learn how to hire
 the most talented Cisco Certified professionals. Visit the
 Employer Resources Portal
 http://www.cisco.com/web/learning/employer_resources/index.html
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users



--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-04 Thread Chris forum
Hi Armin, Thomas

I've just replaced the 3 compressed JS files, search works fine now using
them!

Ok, flushCache is set.

Thx a lot guys, pmapper rocks!
Chris






On Wed, Apr 3, 2013 at 7:39 PM, Armin Burger armin.bur...@gmail.com wrote:

 On 04/03/2013 03:55 PM, Chris forum wrote:
  Should I dare asking a last question?
  Do I better use this, what is it actually doing?
  eventsonchange=$('#pmsfld_numero').val('').flushCache()/events
 

 that resets the text input field and empties the auto-complete cache of
 the  suggest, so usually it is recommended to be set. You need to adapt
 the xyz part of '#pmsfld_xyz' to the suggest field name.






 --
 Minimize network downtime and maximize team effectiveness.
 Reduce network management and security costs.Learn how to hire
 the most talented Cisco Certified professionals. Visit the
 Employer Resources Portal
 http://www.cisco.com/web/learning/employer_resources/index.html
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Chris forum
Hi Thomas,

Thx a lot for the explanation, I have chosen to use the nosubmit=1
parameter.

First field works now, the query is not launched anymore when a suggested
street name is clicked:
definition type=suggest connectiontype=db minlength=1 startleft=1
sort=asc *nosubmit=1*


So I am a step further, there is still a problem though with the second
field: it doesn't suggest anything:
definition type=suggest connectiontype=db sort=asc minlength=1
dependfld=lastname

Did you manage to test my data? Does it work on your system?
Here, if I choose the street name Abeilles and then type 2 in the
second field, nothing is proposed while the numbers 23 , 25, 27 and
29 are in the db (the one I sent you).

Sorry to insist...

Chris




On Tue, Apr 2, 2013 at 6:05 PM, Thomas RAFFIN traf...@sirap.fr wrote:

 OK, it is due to bad configuration.

 You could do one of those:
 - Unactivate auto submit for suggested fields == set
 PM.suggestLaunchSearch = false; in js_config.php (applies to all
 suggested fields!)
 - keep PM.suggestLaunchSearch = true; and add to each definition where
 it is needed the nosubmit parameter to 1 like this for instance:
 definition type=suggest connectiontype=db minlength=1 startleft=1
 sort=asc nosubmit=1

 Bye

 Thomas

 Le 02/04/2013 15:43, Chris forum a écrit :

  Hi Thomas,

 Please find attached the necessary files to reproduce my environment.

 Thanx a lot!
 Chris




--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Thomas RAFFIN
Hi,

With your data and this search definition it worked yesterday:

searchitem name=goeland_adresses description=Adresses -Suggest 
Suggest PGSQL-
layer type=postgis name=goeland_addresse_lausanne
   field type=s name=lastname description=Rue wildcard=2
 definition type=suggest connectiontype=db 
minlength=1 startleft=1 sort=asc nosubmit=1
dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT lastname FROM 
test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY 
lastname/sql
!--eventsonchange=$('#pmsfld_numero').val('').flushCache()/events--
/definition
 /field

 field type=n name=numero description=No wildcard=2
  definition type=suggest connectiontype=db sort=asc 
minlength=0 dependfld=lastname
 dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT numero FROM 
test.goeland_addresse_lausanne WHERE numero::text ~* '^[search]' and 
lastname = '[dependfldval]' ORDER BY numero/sql
  /definition
   /field
/layer
/searchitem

Take a look on the dsn that don't need to be re-specified. But it 
requires 1 character or more.
The table is in the test schema here.

Le 03/04/2013 10:06, Chris forum a écrit :
 Hi Thomas,

 Thx a lot for the explanation, I have chosen to use the nosubmit=1 
 parameter.

 First field works now, the query is not launched anymore when a 
 suggested street name is clicked:
 definition type=suggest connectiontype=db minlength=1 
 startleft=1 sort=asc *nosubmit=1*


 So I am a step further, there is still a problem though with the 
 second field: it doesn't suggest anything:
 definition type=suggest connectiontype=db sort=asc 
 minlength=1 dependfld=lastname

 Did you manage to test my data? Does it work on your system?
 Here, if I choose the street name Abeilles and then type 2 in the 
 second field, nothing is proposed while the numbers 23 , 25, 27 
 and 29 are in the db (the one I sent you).

 Sorry to insist...

 Chris




 On Tue, Apr 2, 2013 at 6:05 PM, Thomas RAFFIN traf...@sirap.fr 
 mailto:traf...@sirap.fr wrote:

 OK, it is due to bad configuration.

 You could do one of those:
 - Unactivate auto submit for suggested fields == set
 PM.suggestLaunchSearch = false; in js_config.php (applies to all
 suggested fields!)
 - keep PM.suggestLaunchSearch = true; and add to each definition
 where it is needed the nosubmit parameter to 1 like this for
 instance:
 definition type=suggest connectiontype=db minlength=1
 startleft=1 sort=asc nosubmit=1

 Bye

 Thomas

 Le 02/04/2013 15:43, Chris forum a écrit :

 Hi Thomas,

 Please find attached the necessary files to reproduce my
 environment.

 Thanx a lot!
 Chris





--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Chris forum
Still no luck here...
I copy/paste your search above, replacing the test shema with public one,
but the second field is still not proposing anything.

Here under the content of the pm_debug.log, with 'abe'-Abeilles and '2'
values used in the fields.

Looking at the last line of the log, I have tried to replace
'[dependfldval]' with 'Abeilles' in search.xml, and the second field this
time proposed me values to choose from!

Shouldn't the last line of the log contain 'Abeilles' instead of
'[dependfldval]'? It looks like the substitution is not done.


[03-Apr-2013 13:44:46] P.MAPPER debug info
 Validation of search.xml file succeeded
[03-Apr-2013 13:44:49] P.MAPPER debug info
XML-//definition
 SimpleXMLElement Object
(
[@attributes] = Array
(
[type] = suggest
[connectiontype] = db
[minlength] = 1
[startleft] = 1
[sort] = asc
[nosubmit] = 1
)

[dsn] = @
[sql] = SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne
WHERE lastname IS NOT NULL ORDER BY lastname
[comment] = SimpleXMLElement Object
(
)

)

[03-Apr-2013 13:44:49] P.MAPPER debug info
XML-//definition
 SimpleXMLElement Object
(
[@attributes] = Array
(
[type] = suggest
[connectiontype] = db
[sort] = asc
[minlength] = 0
[dependfld] = lastname
)

[dsn] = @
[sql] = SELECT DISTINCT numero FROM public.goeland_addresse_lausanne
WHERE numero::text ~* '^[search]' and lastname = '[dependfldval]' ORDER BY
numero
)

[03-Apr-2013 13:44:51] P.MAPPER debug info
request
 Array
(
[searchitem] = goeland_adresses
[fldname] = lastname
[q] = abe
[limit] = 0
[timestamp] = 1364989492518
)

[03-Apr-2013 13:44:51] P.MAPPER debug info
Parameters for attribute search file: suggest.php function: __construct
 Array
(
[type] = db
[sort] = asc
[minlength] = 1
[regexleft] =
[startleft] = 1
[dsn] = pgsql://user:pass@localhost:5432/goeland
[encoding] = UTF-8
[sql] = SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne
WHERE lastname IS NOT NULL ORDER BY lastname
[dependFields] = Array
(
)

)

[03-Apr-2013 13:44:51] P.MAPPER debug info
 SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne WHERE
lastname IS NOT NULL ORDER BY lastname

[03-Apr-2013 13:45:39] P.MAPPER debug info
request
 Array
(
[searchitem] = goeland_adresses
[fldname] = numero
[q] = 2
[limit] = 0
[timestamp] = 1364989540505
[dependfldval] = Abeilles
)

[03-Apr-2013 13:45:39] P.MAPPER debug info
Parameters for attribute search file: suggest.php function: __construct
 Array
(
[type] = db
[sort] = asc
[minlength] = 0
[regexleft] =
[startleft] = 0
[dsn] = pgsql://user:pass@localhost:5432/goeland
[encoding] = UTF-8
[sql] = SELECT DISTINCT numero FROM public.goeland_addresse_lausanne
WHERE numero::text ~* '^[search]' and lastname = '[dependfldval]' ORDER BY
numero
[dependFields] = Array
(
)

)

[03-Apr-2013 13:45:39] P.MAPPER debug info
 SELECT DISTINCT numero FROM public.goeland_addresse_lausanne WHERE
numero::text ~* '^2' and lastname = '[dependfldval]' ORDER BY numero


On Wed, Apr 3, 2013 at 11:05 AM, Thomas RAFFIN traf...@sirap.fr wrote:

  Hi,

 With your data and this search definition it worked yesterday:

 searchitem name=goeland_adresses description=Adresses -Suggest Suggest
 PGSQL-
layer type=postgis name=goeland_addresse_lausanne
   field type=s name=lastname description=Rue wildcard=2

 definition type=suggest connectiontype=db minlength=1
 startleft=1 sort=asc nosubmit=1
dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT lastname FROM
 test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname/sql

 !--eventsonchange=$('#pmsfld_numero').val('').flushCache()/events--
/definition
 /field

 field type=n name=numero description=No wildcard=2
  definition type=suggest connectiontype=db sort=asc
 minlength=0 dependfld=lastname

 dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT numero FROM
 test.goeland_addresse_lausanne WHERE numero::text ~* '^[search]' and
 lastname = '[dependfldval]' ORDER BY numero/sql
  /definition
   /field
/layer
 /searchitem

 Take a look on the dsn that don't need to be re-specified. But it requires
 1 character or more.
 The table is in the test schema here.

 Le 03/04/2013 10:06, Chris forum a écrit :

   Hi Thomas,

 Thx a lot for the explanation, I have chosen to use the nosubmit=1
 parameter.

  First field works now, the query is not launched anymore when a suggested
 street name is clicked:
 definition type=suggest connectiontype=db minlength=1 startleft=1
 sort=asc *nosubmit=1*


  So I am a step further, there is still a problem though with the second
 field: it doesn't suggest 

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Thomas RAFFIN
The compress js version is certainly not up-to-date.

Try to change your configuration like this:
pm_javascript_locationjavascript/src/pm_javascript_location

Armin, could you update the js compress files please?

Le 03/04/2013 14:35, Chris forum a écrit :
 Still no luck here...
 I copy/paste your search above, replacing the test shema with public 
 one, but the second field is still not proposing anything.

 Here under the content of the pm_debug.log, with 'abe'-Abeilles and 
 '2' values used in the fields.

 Looking at the last line of the log, I have tried to replace 
 '[dependfldval]' with 'Abeilles' in search.xml, and the second field 
 this time proposed me values to choose from!

 Shouldn't the last line of the log contain 'Abeilles' instead of 
 '[dependfldval]'? It looks like the substitution is not done.


 [03-Apr-2013 13:44:46] P.MAPPER debug info
  Validation of search.xml file succeeded
 [03-Apr-2013 13:44:49] P.MAPPER debug info
 XML-//definition
  SimpleXMLElement Object
 (
 [@attributes] = Array
 (
 [type] = suggest
 [connectiontype] = db
 [minlength] = 1
 [startleft] = 1
 [sort] = asc
 [nosubmit] = 1
 )

 [dsn] = @
 [sql] = SELECT DISTINCT lastname FROM 
 public.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY 
 lastname
 [comment] = SimpleXMLElement Object
 (
 )

 )

 [03-Apr-2013 13:44:49] P.MAPPER debug info
 XML-//definition
  SimpleXMLElement Object
 (
 [@attributes] = Array
 (
 [type] = suggest
 [connectiontype] = db
 [sort] = asc
 [minlength] = 0
 [dependfld] = lastname
 )

 [dsn] = @
 [sql] = SELECT DISTINCT numero FROM 
 public.goeland_addresse_lausanne WHERE numero::text ~* '^[search]' and 
 lastname = '[dependfldval]' ORDER BY numero
 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
 request
  Array
 (
 [searchitem] = goeland_adresses
 [fldname] = lastname
 [q] = abe
 [limit] = 0
 [timestamp] = 1364989492518
 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
 Parameters for attribute search file: suggest.php function: __construct
  Array
 (
 [type] = db
 [sort] = asc
 [minlength] = 1
 [regexleft] =
 [startleft] = 1
 [dsn] = pgsql://user:pass@localhost:5432/goeland
 [encoding] = UTF-8
 [sql] = SELECT DISTINCT lastname FROM 
 public.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY 
 lastname
 [dependFields] = Array
 (
 )

 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
  SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne WHERE 
 lastname IS NOT NULL ORDER BY lastname

 [03-Apr-2013 13:45:39] P.MAPPER debug info
 request
  Array
 (
 [searchitem] = goeland_adresses
 [fldname] = numero
 [q] = 2
 [limit] = 0
 [timestamp] = 1364989540505
 [dependfldval] = Abeilles
 )

 [03-Apr-2013 13:45:39] P.MAPPER debug info
 Parameters for attribute search file: suggest.php function: __construct
  Array
 (
 [type] = db
 [sort] = asc
 [minlength] = 0
 [regexleft] =
 [startleft] = 0
 [dsn] = pgsql://user:pass@localhost:5432/goeland
 [encoding] = UTF-8
 [sql] = SELECT DISTINCT numero FROM 
 public.goeland_addresse_lausanne WHERE numero::text ~* '^[search]' and 
 lastname = '[dependfldval]' ORDER BY numero
 [dependFields] = Array
 (
 )

 )

 [03-Apr-2013 13:45:39] P.MAPPER debug info
  SELECT DISTINCT numero FROM public.goeland_addresse_lausanne WHERE 
 numero::text ~* '^2' and lastname = '[dependfldval]' ORDER BY numero


 On Wed, Apr 3, 2013 at 11:05 AM, Thomas RAFFIN traf...@sirap.fr 
 mailto:traf...@sirap.fr wrote:

 Hi,

 With your data and this search definition it worked yesterday:

 searchitem name=goeland_adresses description=Adresses -Suggest
 Suggest PGSQL-
layer type=postgis name=goeland_addresse_lausanne
   field type=s name=lastname description=Rue wildcard=2

 definition type=suggest connectiontype=db
 minlength=1 startleft=1 sort=asc nosubmit=1
dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT lastname FROM
 test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname/sql
 
 !--eventsonchange=$('#pmsfld_numero').val('').flushCache()/events--
/definition
 /field

 field type=n name=numero description=No wildcard=2
  definition type=suggest connectiontype=db sort=asc
 minlength=0 dependfld=lastname

 dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT numero FROM
 test.goeland_addresse_lausanne WHERE numero::text ~* '^[search]'
 and lastname = '[dependfldval]' ORDER BY numero/sql
  /definition
   /field
/layer
 /searchitem

 Take a look on the dsn that don't need to be 

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Chris forum
Well done! \o/
Works perfectly now : ))

Thank you so much Thomas!

Should I dare asking a last question?
Do I better use this, what is it actually doing?
eventsonchange=$('#pmsfld_numero').val('').flushCache()/events



On Wed, Apr 3, 2013 at 3:28 PM, Thomas RAFFIN traf...@sirap.fr wrote:

  The compress js version is certainly not up-to-date.

 Try to change your configuration like this:
 pm_javascript_locationjavascript/src/pm_javascript_location

 Armin, could you update the js compress files please?

 Le 03/04/2013 14:35, Chris forum a écrit :

   Still no luck here...
  I copy/paste your search above, replacing the test shema with public one,
 but the second field is still not proposing anything.

  Here under the content of the pm_debug.log, with 'abe'-Abeilles and '2'
 values used in the fields.

  Looking at the last line of the log, I have tried to replace
 '[dependfldval]' with 'Abeilles' in search.xml, and the second field this
 time proposed me values to choose from!

 Shouldn't the last line of the log contain 'Abeilles' instead of
 '[dependfldval]'? It looks like the substitution is not done.


 [03-Apr-2013 13:44:46] P.MAPPER debug info
  Validation of search.xml file succeeded
 [03-Apr-2013 13:44:49] P.MAPPER debug info
 XML-//definition
  SimpleXMLElement Object
 (
 [@attributes] = Array
 (
 [type] = suggest
 [connectiontype] = db
 [minlength] = 1
 [startleft] = 1
 [sort] = asc
 [nosubmit] = 1
 )

 [dsn] = @
 [sql] = SELECT DISTINCT lastname FROM
 public.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname
 [comment] = SimpleXMLElement Object
 (
 )

 )

 [03-Apr-2013 13:44:49] P.MAPPER debug info
 XML-//definition
  SimpleXMLElement Object
 (
 [@attributes] = Array
 (
 [type] = suggest
 [connectiontype] = db
 [sort] = asc
 [minlength] = 0
 [dependfld] = lastname
 )

 [dsn] = @
 [sql] = SELECT DISTINCT numero FROM public.goeland_addresse_lausanne
 WHERE numero::text ~* '^[search]' and lastname = '[dependfldval]' ORDER BY
 numero
 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
 request
  Array
 (
 [searchitem] = goeland_adresses
 [fldname] = lastname
 [q] = abe
 [limit] = 0
 [timestamp] = 1364989492518
 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
 Parameters for attribute search file: suggest.php function: __construct
  Array
 (
 [type] = db
 [sort] = asc
 [minlength] = 1
 [regexleft] =
 [startleft] = 1
 [dsn] = pgsql://user:pass@localhost:5432/goeland
 [encoding] = UTF-8
 [sql] = SELECT DISTINCT lastname FROM
 public.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname
 [dependFields] = Array
 (
 )

 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
  SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne WHERE
 lastname IS NOT NULL ORDER BY lastname

 [03-Apr-2013 13:45:39] P.MAPPER debug info
 request
  Array
 (
 [searchitem] = goeland_adresses
 [fldname] = numero
 [q] = 2
 [limit] = 0
 [timestamp] = 1364989540505
 [dependfldval] = Abeilles
 )

 [03-Apr-2013 13:45:39] P.MAPPER debug info
 Parameters for attribute search file: suggest.php function: __construct
  Array
 (
 [type] = db
 [sort] = asc
 [minlength] = 0
 [regexleft] =
 [startleft] = 0
 [dsn] = pgsql://user:pass@localhost:5432/goeland
 [encoding] = UTF-8
 [sql] = SELECT DISTINCT numero FROM public.goeland_addresse_lausanne
 WHERE numero::text ~* '^[search]' and lastname = '[dependfldval]' ORDER BY
 numero
 [dependFields] = Array
 (
 )

 )

 [03-Apr-2013 13:45:39] P.MAPPER debug info
  SELECT DISTINCT numero FROM public.goeland_addresse_lausanne WHERE
 numero::text ~* '^2' and lastname = '[dependfldval]' ORDER BY numero


 On Wed, Apr 3, 2013 at 11:05 AM, Thomas RAFFIN traf...@sirap.fr wrote:

  Hi,

 With your data and this search definition it worked yesterday:

 searchitem name=goeland_adresses description=Adresses -Suggest
 Suggest PGSQL-
layer type=postgis name=goeland_addresse_lausanne
   field type=s name=lastname description=Rue wildcard=2

 definition type=suggest connectiontype=db minlength=1
 startleft=1 sort=asc nosubmit=1
 dsn encoding=UTF-8@/dsn
  sqlSELECT DISTINCT lastname FROM
 test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname/sql

 !--eventsonchange=$('#pmsfld_numero').val('').flushCache()/events--
/definition
 /field

 field type=n name=numero description=No wildcard=2
  definition type=suggest connectiontype=db sort=asc
 minlength=0 dependfld=lastname

 dsn encoding=UTF-8@/dsn
  sqlSELECT DISTINCT numero FROM
 test.goeland_addresse_lausanne WHERE numero::text ~* 

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Armin Burger
On 04/03/2013 03:28 PM, Thomas RAFFIN wrote:
 The compress js version is certainly not up-to-date.

 Armin, could you update the js compress files please?

Hi Thomas

I updated now the compressed JS files to SVN trunk. I was believing you 
were also committing these ones to SVN. It means that the pmapper 4.3 
release will very likely have outdated files as well since I just 
exported it from SVN trunk...

Armin

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Armin Burger
On 04/03/2013 03:55 PM, Chris forum wrote:
 Should I dare asking a last question?
 Do I better use this, what is it actually doing?
 eventsonchange=$('#pmsfld_numero').val('').flushCache()/events


that resets the text input field and empties the auto-complete cache of 
the  suggest, so usually it is recommended to be set. You need to adapt 
the xyz part of '#pmsfld_xyz' to the suggest field name.





--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-02 Thread Chris forum
Still struggling with the search function.

To resume what I am experiencing with a 2 fields search, which consists in
finding a street name and then a building number on this street:

1) It looks like I can not set the first field search mode to 'options', my
postgis table is too big (~10'000 rows).
If I do, even though the values are there (Firebug can lists the option
values), they are not displayed in the drop down menu.

2) When I set the first field mode to 'suggest', it works but the query is
launched as soon as I click on a proposed value.
So when I click on a street name, the query is done before I can specify a
building number.

Is a two fields search supposed to work with both fields using 'suggest'
mode?
If so, do you have any idea why the search doesn't wait for the second
input before launching the query?

Any working exemple available?
Link to the gisdb postgis table used in the dev search.xml?


Thanx,
Chris








On Wed, Mar 27, 2013 at 3:56 PM, Chris forum bak.fo...@gmail.com wrote:

 Hi Thomas,

 Thx for your fast reply!

 The searchitem of my last message was related to a shapefile for a
 test. That's why I didn't add an SQL query in it as I didn't see any
 shapefile example with an sql tag.
 Anyway, I just tried to add:
 sqlSELECT DISTINCT NUMBER FROM building _shp
 WHERE TYPE = '[dependfldval]'  AND NUMBER ~* '[search]' ORDER BY NUMBER
 /sql

 But the second field is still not filtered... : (

 From what I see, you example with 2 fields is dealing with a PGSQL table.
 Here is what I have:
 searchitem name=addresses description=Addresses -Suggest Suggest
 PGSQL-
layer type=postgis name=Address_table

 field type=s name=Address_field description=Street
 wildcard=2
 definition type=suggest connectiontype=db
 minlength=1 startleft=1 sort=asc
dsn encoding=UTF-8pgsql://user:pass@localhost
 /db/dsn
   sqlSELECT DISTINCT Address_field FROM
 public.Address_table WHERE Address_field IS NOT NULL ORDER BY
 Address_field/sql

 eventsonchange=$('#pmsfld_number_field').val('').flushCache()/events
/definition
 /field

 field type=n name=Number_field description=Nb
 wildcard=2
definition type=suggest connectiontype=db sort=asc
 minlength=3 dependfld=Address_field
   dsn encoding=UTF-8pgsql://user:pass@localhost
 /db/dsn
   sqlSELECT DISTINCT Number_field FROM
 public.goeland_addresse_lausanne WHERE Number_field ~* '^[search]' {and
 Address_field = '[dependfldval]'} ORDER BY Number_field/sql
/definition
 /field

  /layer
 /searchitem

 First field works, but the query is made as soon as I choose one entry in
 the list. No chance to select anything on the 2nd field.
 If I switch the first field mode to 'options', the drop down menu comes
 empty. Actually the values are in there, but just not displayed... very
 strange.

 In case the problem is there, here under the related layer of my mapfile:
 LAYER
NAME Address_table
TYPE POINT
DATA geom from Address_table using unique idaddress using srid=21781
CONNECTIONTYPE postgis
CONNECTION user=user password=pass dbname=db host=localhost
 port=5432
METADATA
   DESCRIPTION Addresses
   RESULT_FIELDS idaddress, Address_table, Number_field
RESULT_HEADERS ID, Street, Nb
ows_title addresses
END
TEMPLATE void
CLASS
   STYLE
  SYMBOL circle
  COLOR 255 0 125
  MINSIZE 1
  SIZE 6
  MAXSIZE 10
   END
END
 END

 Do you see anything wrong/missing?





 On Wed, Mar 27, 2013 at 2:55 PM, Thomas RAFFIN traf...@sirap.fr wrote:

 I think you have to define the SQL query for suggest option with depend
 field val. Here is an example for the 2d field that depend on field1

  field type=s name=field2 description=Field 2
 wildcard=0 size=15
  definition type=suggest connectiontype=db
 startleft=1 sort=asc minlength=4 dependfld=field1
  dsn encoding=UTF-8@/dsn
  sqlSELECT DISTINCT field2 FROM schema.table WHERE
 field1 = '[dependfldval]'  AND field2 ~* '[search]' ORDER BY field2/sql
events/events
  /definition
  /field

 NB: it is possible to use many depend fields, but if it doesn't works
 already, maybe I've forgotten to commit something...
  field type=s name=field1 description=Field 1
 wildcard=0 size=15

 eventsonchange=$('#pmsfld_field2').val('');$('#pmsfld_field2').flushCache();/events
  /field
  field type=s name=field2 description=Field 2
 wildcard=0 size=15
  definition type=suggest connectiontype=db
 startleft=1 sort=asc minlength=4 dependfld=field1
  dsn encoding=UTF-8@/dsn
  sqlSELECT DISTINCT field2 FROM schema.table WHERE
 field1 = '[dependfldval]' AND field2 

Re: [pmapper-users] search.xml with 2 fields

2013-04-02 Thread Thomas RAFFIN
Hi,


Le 02/04/2013 10:08, Chris forum a écrit :
 Still struggling with the search function.

 To resume what I am experiencing with a 2 fields search, which 
 consists in finding a street name and then a building number on this 
 street:

 1) It looks like I can not set the first field search mode to 
 'options', my postgis table is too big (~10'000 rows).
 If I do, even though the values are there (Firebug can lists the 
 option values), they are not displayed in the drop down menu.

 2) When I set the first field mode to 'suggest', it works but the 
 query is launched as soon as I click on a proposed value.
 So when I click on a street name, the query is done before I can 
 specify a building number.


I don't remember how to do this, but i'm sure a suggest field is able to 
not send search


 Is a two fields search supposed to work with both fields using 
 'suggest' mode?
 If so, do you have any idea why the search doesn't wait for the second 
 input before launching the query?

I will check code, but it shoudl work as you discribed.



 Any working exemple available?
 Link to the gisdb postgis table used in the dev search.xml?

Could you send me small SQL scripts to create and populate DB (and the 
corresponding mapfile layer part) please?



 Thanx,
 Chris








 On Wed, Mar 27, 2013 at 3:56 PM, Chris forum bak.fo...@gmail.com 
 mailto:bak.fo...@gmail.com wrote:

 Hi Thomas,

 Thx for your fast reply!

 The searchitem of my last message was related to a shapefile for
 a test. That's why I didn't add an SQL query in it as I didn't see
 any shapefile example with an sql tag.
 Anyway, I just tried to add:
 sqlSELECT DISTINCT NUMBER FROM building _shp
 WHERE TYPE = '[dependfldval]'  AND NUMBER ~* '[search]' ORDER BY
 NUMBER /sql

 But the second field is still not filtered... : (

 From what I see, you example with 2 fields is dealing with a PGSQL
 table.
 Here is what I have:
 searchitem name=addresses description=Addresses -Suggest
 Suggest PGSQL-
layer type=postgis name=Address_table

 field type=s name=Address_field description=Street
 wildcard=2
 definition type=suggest connectiontype=db minlength=1
 startleft=1 sort=asc
 dsn encoding=UTF-8pgsql://user:pass@localhost/db/dsn
 sqlSELECT DISTINCT Address_field FROM public.Address_table WHERE
 Address_field IS NOT NULL ORDER BY Address_field/sql
 eventsonchange=$('#pmsfld_number_field').val('').flushCache()/events
 /definition
 /field

 field type=n name=Number_field description=Nb
 wildcard=2
definition type=suggest connectiontype=db
 sort=asc minlength=3 dependfld=Address_field
   dsn
 encoding=UTF-8pgsql://user:pass@localhost/db/dsn
 sqlSELECT DISTINCT Number_field FROM
 public.goeland_addresse_lausanne WHERE Number_field ~* '^[search]'
 {and Address_field = '[dependfldval]'} ORDER BY Number_field/sql
 /definition
 /field

  /layer
 /searchitem

 First field works, but the query is made as soon as I choose one
 entry in the list. No chance to select anything on the 2nd field.
 If I switch the first field mode to 'options', the drop down menu
 comes empty. Actually the values are in there, but just not
 displayed... very strange.

 In case the problem is there, here under the related layer of my
 mapfile:
 LAYER
NAME Address_table
TYPE POINT
DATA geom from Address_table using unique idaddress using
 srid=21781
CONNECTIONTYPE postgis
CONNECTION user=user password=pass dbname=db host=localhost
 port=5432
METADATA
   DESCRIPTION Addresses
   RESULT_FIELDS idaddress, Address_table, Number_field
RESULT_HEADERS ID, Street, Nb
ows_title addresses
END
TEMPLATE void
CLASS
   STYLE
  SYMBOL circle
  COLOR 255 0 125
  MINSIZE 1
  SIZE 6
  MAXSIZE 10
   END
END
 END

 Do you see anything wrong/missing?





 On Wed, Mar 27, 2013 at 2:55 PM, Thomas RAFFIN traf...@sirap.fr
 mailto:traf...@sirap.fr wrote:

 I think you have to define the SQL query for suggest option
 with depend
 field val. Here is an example for the 2d field that depend on
 field1

  field type=s name=field2 description=Field 2
 wildcard=0 size=15
  definition type=suggest connectiontype=db
 startleft=1 sort=asc minlength=4 dependfld=field1
  dsn encoding=UTF-8@/dsn
  sqlSELECT DISTINCT field2 FROM
 schema.table WHERE
 field1 = '[dependfldval]'  AND field2 ~* '[search]' ORDER BY
 field2/sql
events/events
 

Re: [pmapper-users] search.xml with 2 fields

2013-04-02 Thread Thomas RAFFIN
OK, it is due to bad configuration.

You could do one of those:
- Unactivate auto submit for suggested fields == set 
PM.suggestLaunchSearch = false; in js_config.php (applies to all 
suggested fields!)
- keep PM.suggestLaunchSearch = true; and add to each definition where 
it is needed the nosubmit parameter to 1 like this for instance:
definition type=suggest connectiontype=db minlength=1 
startleft=1 sort=asc nosubmit=1

Bye

Thomas

Le 02/04/2013 15:43, Chris forum a écrit :
 Hi Thomas,

 Please find attached the necessary files to reproduce my environment.

 Thanx a lot!
 Chris




--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml with 2 fields

2013-03-27 Thread Chris forum
Hi all,

I am having a hard time getting to work a search with 2 fields, second one
being dependant of the first one.
I especially would like to do that with data coming from PGSQL .

I know there are examples in the search.xml of the wiki, but I am not able
to reproduce them with the demo data:
- Cities Options Suggest MS: P.MAPPER ERROR: This version of PHP does
support dBase functions
- Communes Suggest PG: I can not find where to download the PGSQL
database gisdb

Does anyone have a link where to get gisdb database?

Here under what I tried with my own shapefile data.
This sort of work, but the second field is not filtered according to what
has been chosen on the first field.

searchitem name=Test description=Test -Options Suggest MS-
layer type=shape name=building _shp

   field type=s name=TYPE description=Building Type
wildcard=2
definition type=options connectiontype=ms
sort=asc firstoption=*
mslayer encoding=ISO-8859-1 keyfield=TYPE
showfield=TYPE/

eventsonchange=$('#pmsfld_NUMBER').val('').flushCache()/events
/definition
/field

  field type=s name=NUMBER description=Building
Number wildcard=2
  definition type=suggest connectiontype=ms
minlength=1 startleft=1 sort=asc dependfld=TYPE
  mslayer encoding=ISO-8859-1 keyfield=NUMBER
showfield=NUMBER/
  /definition
  /field

/layer
/searchitem


Regards,
Chris
--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-03-27 Thread Thomas RAFFIN
I think you have to define the SQL query for suggest option with depend 
field val. Here is an example for the 2d field that depend on field1

 field type=s name=field2 description=Field 2 
wildcard=0 size=15
 definition type=suggest connectiontype=db 
startleft=1 sort=asc minlength=4 dependfld=field1
 dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT field2 FROM schema.table WHERE 
field1 = '[dependfldval]'  AND field2 ~* '[search]' ORDER BY field2/sql
   events/events
 /definition
 /field

NB: it is possible to use many depend fields, but if it doesn't works 
already, maybe I've forgotten to commit something...
 field type=s name=field1 description=Field 1 
wildcard=0 size=15
eventsonchange=$('#pmsfld_field2').val('');$('#pmsfld_field2').flushCache();/events
 /field
 field type=s name=field2 description=Field 2 
wildcard=0 size=15
 definition type=suggest connectiontype=db 
startleft=1 sort=asc minlength=4 dependfld=field1
 dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT field2 FROM schema.table WHERE 
field1 = '[dependfldval]' AND field2 ~* '[search]' ORDER BY att1/sql
eventsonchange=$('#pmsfld_field3').val('');$('#pmsfld_field3').flushCache();/events
 /definition
 /field
 field type=s name=field3 description=Field 3 
wildcard=0 size=15
 definition type=suggest connectiontype=db 
startleft=1 sort=asc minlength=4 dependfld=field1,field2
 dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT field3 FROM schema.table WHERE 
field1 = '[dependfldval_field1 ]' AND field2 = '[dependfldval_field2]' 
AND field3 ~* '[search]' ORDER BY field3/sql
   events/events
 /definition
 /field

Le 27/03/2013 14:15, Chris forum a écrit :
 Hi all,

 I am having a hard time getting to work a search with 2 fields, second one
 being dependant of the first one.
 I especially would like to do that with data coming from PGSQL .

 I know there are examples in the search.xml of the wiki, but I am not able
 to reproduce them with the demo data:
 - Cities Options Suggest MS: P.MAPPER ERROR: This version of PHP does
 support dBase functions
 - Communes Suggest PG: I can not find where to download the PGSQL
 database gisdb

 Does anyone have a link where to get gisdb database?

 Here under what I tried with my own shapefile data.
 This sort of work, but the second field is not filtered according to what
 has been chosen on the first field.

 searchitem name=Test description=Test -Options Suggest MS-
  layer type=shape name=building _shp

 field type=s name=TYPE description=Building Type
 wildcard=2
  definition type=options connectiontype=ms
 sort=asc firstoption=*
  mslayer encoding=ISO-8859-1 keyfield=TYPE
 showfield=TYPE/

 eventsonchange=$('#pmsfld_NUMBER').val('').flushCache()/events
  /definition
  /field

field type=s name=NUMBER description=Building
 Number wildcard=2
definition type=suggest connectiontype=ms
 minlength=1 startleft=1 sort=asc dependfld=TYPE
mslayer encoding=ISO-8859-1 keyfield=NUMBER
 showfield=NUMBER/
/definition
/field

  /layer
  /searchitem


 Regards,
 Chris
 --
 Own the Future-Intelreg; Level Up Game Demo Contest 2013
 Rise to greatness in Intel's independent game demo contest.
 Compete for recognition, cash, and the chance to get your game
 on Steam. $5K grand prize plus 10 genre and skill prizes.
 Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users



-- 


Thomas RAFFIN
Chef de Projet Internet
traf...@sirap.fr mailto:traf...@sirap.fr  Sirap http://sirap.fr 
Tel 
: 04 75 72 84 10
Fax : 04 75 70 07 98
Rue Paul Louis Héroult - BP 253
26106 Romans cedex

--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON in pmapper v4.2.0

2013-03-04 Thread Serge Claudio Rafanoharana
Dear Suman,

I just had a quick view of you code and I think you should make the name
lower case; and refer to this hint:
:HINT:  No function matches the given name and argument types. You might
need
to add explicit type casts.

Please have a look at: http://svn.pmapper.net/trac/wiki/DocManualsearch

Cheers,
Serge

On Sun, Mar 3, 2013 at 5:17 PM, Suman ant_...@yahoo.com wrote:

 Hi all Pmapper User
 I am using ms4w v3.0.6. , mapserver v6.0.3, PHP v5.4.3. and pmapper 4.2.0.
 When I run a query on a PostGIS table I can see suggestions but when i
 click
 them no any response.
 This is my inline search.xml

 --
 searchlist version=1.0
 dataroot$/dataroot

 searchitem name=Utility_and_services description=Utility and
 services suggest
 layer type=postgis name=Utility_and_services
 field type=s name=name description=Utility and
 services suggest wildcard=2
 definition type=suggest connectiontype=db
 minlength=1 startleft=1 sort=asc dependfld=gid
 dsn
 encoding=UTF-8pgsql://postgres:postgres@localhost:5432/gisdb/dsn
 sqlSELECT DISTINCT name
 FROM public.tbl_utility WHERE name ~* '^[search]' ORDER BY name/sql
 /definition
 /field
 /layer
 /searchitem
 /searchlist

 ---

 and i found in chrome console invalid JSON

 Invalid JSON: br /
 Warning:  pg_query(): Query failed: ERROR:  function xmin(box3d) does not
 exist
 LINE 2:  xmin(box3d(geom)),
  ^
 HINT:  No function matches the given name and argument types. You might
 need
 to add explicit type casts. in
 C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php on line 712br /
 br /
 Warning:  pg_numrows() expects parameter 1 to be resource, boolean given in
 C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php on line 716br /
 {mode:search, queryResult:0}
 pm_cjs.js:38


 http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-search-xml-with-postgis-invalidJSON-td2790207.html#a4025076
 
 http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-search-xml-with-postgis-invalidJSON-td2790207.html#a4025076
 
 i tried all above given suggestions but i cant solve this problem.. plz
 help
 me..

 suman



 --
 View this message in context:
 http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/search-xml-with-postgis-invalidJSON-in-pmapper-v4-2-0-tp4025077.html
 Sent from the pmapper-users -- p.mapper users mailing list mailing list
 archive at Nabble.com.


 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_d2d_feb
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users




-- 
Serge
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2013-03-04 Thread Suman
thanx for help..

sorry it was silly mistake. i typed wrong spelling of option.
thanx again for your help.

Best Regards,
Suman



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-search-xml-with-postgis-invalidJSON-tp2790207p4025082.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2013-03-03 Thread Suman
Hi all Pmapper User
I am using ms4w v3.0.6. , mapserver v6.0.3, PHP v5.4.3. and pmapper 4.2.0. 
When I run a query on a PostGIS table I can see suggestions but when i click
them no any response. 
This is my inline search.xml 
--
 
searchlist version=1.0
dataroot$/dataroot

searchitem name=Utility_and_services description=Utility and
services suggest
layer type=postgis name=Utility_and_services
field type=s name=name description=Utility and
services suggest wildcard=2
definition type=suggest connectiontype=db
minlength=1 startleft=1 sort=asc dependfld=gid
dsn
encoding=UTF-8pgsql://postgres:postgres@localhost:5432/gisdb/dsn
sqlSELECT DISTINCT name FROM 
public.tbl_utility WHERE name ~*
'^[search]' ORDER BY name/sql
/definition
/field 
/layer
/searchitem
/searchlist
---
 

and i found in chrome console invalid JSON

Invalid JSON: br /
*Warning*:  pg_query(): Query failed: ERROR:  function xmin(box3d) does not
exist
LINE 2:  xmin(box3d(geom)), 
 ^
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts. in
*C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php* on line *712*br /
br /
*Warning*:  pg_numrows() expects parameter 1 to be resource, boolean given
in *C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php* on line *716*br
/
{mode:search, queryResult:0}  

pm_cjs.js:38

i tried all above given suggestions but i cant solve this problem.. plz help
me..



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-search-xml-with-postgis-invalidJSON-tp2790207p4025076.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml with postgis - invalidJSON in pmapper v4.2.0

2013-03-03 Thread Suman
Hi all Pmapper User 
I am using ms4w v3.0.6. , mapserver v6.0.3, PHP v5.4.3. and pmapper 4.2.0. 
When I run a query on a PostGIS table I can see suggestions but when i click
them no any response. 
This is my inline search.xml 
--
 
searchlist version=1.0
dataroot$/dataroot

searchitem name=Utility_and_services description=Utility and
services suggest
layer type=postgis name=Utility_and_services
field type=s name=name description=Utility and
services suggest wildcard=2
definition type=suggest connectiontype=db
minlength=1 startleft=1 sort=asc dependfld=gid
dsn
encoding=UTF-8pgsql://postgres:postgres@localhost:5432/gisdb/dsn
sqlSELECT DISTINCT name
FROM public.tbl_utility WHERE name ~* '^[search]' ORDER BY name/sql
/definition
/field  
/layer
/searchitem
/searchlist
---
 

and i found in chrome console invalid JSON 

Invalid JSON: br /
Warning:  pg_query(): Query failed: ERROR:  function xmin(box3d) does not
exist 
LINE 2:  xmin(box3d(geom)), 
 ^ 
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts. in
C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php on line 712br /
br /
Warning:  pg_numrows() expects parameter 1 to be resource, boolean given in
C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php on line 716br /
{mode:search, queryResult:0}  

pm_cjs.js:38 

http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-search-xml-with-postgis-invalidJSON-td2790207.html#a4025076
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-search-xml-with-postgis-invalidJSON-td2790207.html#a4025076
  
i tried all above given suggestions but i cant solve this problem.. plz help
me..

suman



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/search-xml-with-postgis-invalidJSON-in-pmapper-v4-2-0-tp4025077.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2013-03-03 Thread Armin Burger
this is related to old code in query/squery.php using deprecated Postgis 
functions. This was working with Postgis up to version 1.5.x, but not 
any more with v2.x where the deprecated functions have been removed.

p.mapper 4.3 should have this fixed thanks to Thomas Raffin. In your 
case you need to edit the file
   incphp/query/squery.php
and change inside function dumpPGQueryResults xmin to ST_xmin and so 
forth. So it should look like

$query = SELECT $unique_field,
  ST_xmin(box3d($geom)),
  ST_ymin(box3d($geom)),
  ST_xmax(box3d($geom)),
  ST_ymax(box3d($geom)),
  $select
 FROM $dbtable
WHERE $queryStr
LIMIT $searchlimit;

The changeset
   http://svn.pmapper.net/trac/changeset/1272
lists all parts of the code where this was updated.

In principal it should also just be fine replacing the whole squery.php 
with the one of p.mapper 4.3

Armin

On 03/03/2013 11:13 AM, Suman wrote:
 Hi all Pmapper User
 I am using ms4w v3.0.6. , mapserver v6.0.3, PHP v5.4.3. and pmapper 4.2.0.
 When I run a query on a PostGIS table I can see suggestions but when i click
 them no any response.
 This is my inline search.xml
 --
 searchlist version=1.0
  dataroot$/dataroot

  searchitem name=Utility_and_services description=Utility and
 services suggest
  layer type=postgis name=Utility_and_services
  field type=s name=name description=Utility and
 services suggest wildcard=2
  definition type=suggest connectiontype=db
 minlength=1 startleft=1 sort=asc dependfld=gid
  dsn
 encoding=UTF-8pgsql://postgres:postgres@localhost:5432/gisdb/dsn
   sqlSELECT DISTINCT name FROM 
 public.tbl_utility WHERE name ~*
 '^[search]' ORDER BY name/sql
   /definition
  /field
  /layer
  /searchitem
  /searchlist
 ---

 and i found in chrome console invalid JSON

 Invalid JSON: br /
 *Warning*:  pg_query(): Query failed: ERROR:  function xmin(box3d) does not
 exist
 LINE 2:  xmin(box3d(geom)),
   ^
 HINT:  No function matches the given name and argument types. You might need
 to add explicit type casts. in
 *C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php* on line *712*br /
 br /
 *Warning*:  pg_numrows() expects parameter 1 to be resource, boolean given
 in *C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php* on line *716*br
 /
 {mode:search, queryResult:0}
 pm_cjs.js:38

 i tried all above given suggestions but i cant solve this problem.. plz help
 me..



 --
 View this message in context: 
 http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-search-xml-with-postgis-invalidJSON-tp2790207p4025076.html
 Sent from the pmapper-users -- p.mapper users mailing list mailing list 
 archive at Nabble.com.

 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_d2d_feb
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-14 Thread moka61

sorry for the delayed response.

I tried the two suggested solutions and entering:

$ searchJson = str_replace (\ \ ' ', $ searchJson) in x_search.php

I will return the correct JSON string. ... Vito d 'Asio, Vito d' Asio.

I also solved the problem of the INCLUDE, it was a trivial problem.
the file name of the tag IMAGE of reference map contained a point to a
typing error. But among the various includes I found it hard to detect.
Oddly enough log files of mapserver and pmapper this was not detected.

Armin, Thomas Thank you for your help
-- 
View this message in context: 
http://old.nabble.com/search.xml-with-postgis---invalidJSON-tp31342230p31394401.html
Sent from the pmapper users mailing list archive at Nabble.com.


--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-11 Thread Thomas RAFFIN
Hi,

Since jQuery 1.4.2 I had to change in incphp/x_ajax/x_search.php the 
JSON string returned (just before echo):
$searchJson = str_replace(\\', ', $searchJson);

I have the options_array2json function with addslashes.

I think it is the only change I made concerning this issue (simple quotes).

Thomas



Le 10/04/2011 23:27, Armin Burger a écrit :

 On 08/04/2011 09:18, moka61 wrote:

 Thank you for the quick response.

 I removed the apostrophe from the name VITO D'ASIO and the query works
 correctly. The escape is made ​​only in the second part of the key JSON.

 for p.mapper 4.1 try the following:

 in incphp/query/search.php-options_array2json() replace line 855
 $json .= $sep \ . $k . \: . \. addslashes($v) . \;
 with
 $json .= $sep \ . $k . \: . \. $v . \;

 and see if it solves the problem. I have not found any negative
 side-effects so far for this workaround. But I guess there should be a
 clean way to escape reserved JSON characters for both the key and the
 value of the options (it's not very likely that e.g. fields in
 shapefiles contain backslashes or double quotes, but who knows)

 armin


 --
 Xperia(TM) PLAY
 It's a major breakthrough. An authentic gaming
 smartphone on the nation's most reliable network.
 And it wants your games.
 http://p.sf.net/sfu/verizon-sfdev
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-10 Thread Armin Burger


On 08/04/2011 09:18, moka61 wrote:


 Thank you for the quick response.

 I removed the apostrophe from the name VITO D'ASIO and the query works
 correctly. The escape is made ​​only in the second part of the key JSON.


for p.mapper 4.1 try the following:

in incphp/query/search.php-options_array2json() replace line 855
   $json .= $sep \ . $k . \: . \. addslashes($v) . \;
with
   $json .= $sep \ . $k . \: . \. $v . \;

and see if it solves the problem. I have not found any negative 
side-effects so far for this workaround. But I guess there should be a 
clean way to escape reserved JSON characters for both the key and the 
value of the options (it's not very likely that e.g. fields in 
shapefiles contain backslashes or double quotes, but who knows)

armin


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-08 Thread moka61


Thank you for the quick response.

I removed the apostrophe from the name VITO D'ASIO and the query works
correctly. The escape is made ​​only in the second part of the key JSON.

yet information.. 

I noticed that from version 4.10 if I use the INCLUDE tag in the map file
print and export module do not run.
In version 4.0 everything worked properly.
With the ICLUDE tag is easy to manage and clustering multiple map files.

thanks again for the help
-- 
View this message in context: 
http://old.nabble.com/search.xml-with-postgis---invalidJSON-tp31342230p31349281.html
Sent from the pmapper users mailing list archive at Nabble.com.


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-08 Thread Thomas RAFFIN
Hi,

Concerning the INCLUDE tag in mapfiles, with mapserver 5.4 or 5.6, 
everything is OK.

Thomas.

Le 08/04/2011 09:18, moka61 a écrit :

 Thank you for the quick response.

 I removed the apostrophe from the name VITO D'ASIO and the query works
 correctly. The escape is made ​​only in the second part of the key JSON.

 yet information..

 I noticed that from version 4.10 if I use the INCLUDE tag in the map file
 print and export module do not run.
 In version 4.0 everything worked properly.
 With the ICLUDE tag is easy to manage and clustering multiple map files.

 thanks again for the help

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-08 Thread moka61


Hi mrs. Raffin

I am using version 5.6 of Mapserver.
With version 4.0 of pmapper using INCLUDE in the mapfile export and print
module work.
But in version 4.1.0 and 4.1.1 work only if your mapfile is unique and not
use INCLUDE tags.

example:
main map file that call other mapfiles

  INCLUDE '/home/mapfile/main.map'
  INCLUDE '/home/mapfile/web.map'
  INCLUDE '/home/mapfile/reference.map'
  INCLUDE '/home/sit/mapfile/matrici/suolo/moland.map'
  
  INCLUDE '/home/mapfile/endmap.map'

is convenient and modular to enable various layers in this way...
-- 
View this message in context: 
http://old.nabble.com/search.xml-with-postgis---invalidJSON-tp31342230p31349633.html
Sent from the pmapper users mailing list archive at Nabble.com.


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-08 Thread Armin Burger
Daniele

I cannot find any reason why the include should not work, especially not 
why it worked in p.mapper 4.0 and not any more in 4.1 . Maybe it is a 
side-effect of another issue. p.mapper uses the standard way of 
Mapscript for opening a map file, and I don't see any difference between 
recent versions. I'll check that.

When you say it does not work in export and print, does it mean it works 
for all the other mapping actions?

armin

On 08/04/2011 10:21, moka61 wrote:


 Hi mrs. Raffin

 I am using version 5.6 of Mapserver.
 With version 4.0 of pmapper using INCLUDE in the mapfile export and print
 module work.
 But in version 4.1.0 and 4.1.1 work only if your mapfile is unique and not
 use INCLUDE tags.

 example:
 main map file that call other mapfiles

INCLUDE '/home/mapfile/main.map'
INCLUDE '/home/mapfile/web.map'
INCLUDE '/home/mapfile/reference.map'
INCLUDE '/home/sit/mapfile/matrici/suolo/moland.map'

INCLUDE '/home/mapfile/endmap.map'

 is convenient and modular to enable various layers in this way...


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-08 Thread Armin Burger

On 08/04/2011 09:18, moka61 wrote:

 Thank you for the quick response.

 I removed the apostrophe from the name VITO D'ASIO and the query works
 correctly. The escape is made ​​only in the second part of the key JSON.

I know, the problem is that the JSON values afterwards are used by 
Javascript and there might be an escaping necessary, but the escape 
backslash has to be escaped itself for correct JSON syntax. I don't know 
any more why the escaping was just set for the value and not the key of 
the options pair. I need to make some testing with datasets that have 
apostrophes...

armin

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-08 Thread moka61

I cannot find any reason why the include should not work, especially not 
why it worked in p.mapper 4.0 and not any more in 4.1 . Maybe it is a 
side-effect of another issue. p.mapper uses the standard way of 
Mapscript for opening a map file, and I don't see any difference between 
recent versions. I'll check that.

 ok, I re-check system.

When you say it does not work in export and print, does it mean it works 
for all the other mapping actions?

 Yes .Mapping system is working well .Only print and export generate
 blank html pages whit INCLUDE  map file.
 Thank you for help


-- 
View this message in context: 
http://old.nabble.com/search.xml-with-postgis---invalidJSON-tp31342230p31349806.html
Sent from the pmapper users mailing list archive at Nabble.com.


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-08 Thread Thomas RAFFIN
Have you got errors in the php log file?

Maybe there could be acces rights errors (/home/sit/mapfile  and 
/home/mapfile).

Le 08/04/2011 10:46, moka61 a écrit :
 I cannot find any reason why the include should not work, especially not
 why it worked in p.mapper 4.0 and not any more in 4.1 . Maybe it is a
 side-effect of another issue. p.mapper uses the standard way of
 Mapscript for opening a map file, and I don't see any difference between
 recent versions. I'll check that.

 ok, I re-check system.
 When you say it does not work in export and print, does it mean it works
 for all the other mapping actions?

 Yes .Mapping system is working well .Only print and export generate
 blank html pages whit INCLUDE  map file.
 Thank you for help


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-08 Thread moka61

Have you got errors in the php log file?
 No. php log is the same as the previous post. I rediect here all errors

Maybe there could be acces rights errors (/home/sit/mapfile  and 
/home/mapfile).

access rights seem to me correct.
but I'll do other attempts
bye


-- 
View this message in context: 
http://old.nabble.com/search.xml-with-postgis---invalidJSON-tp31342230p31350248.html
Sent from the pmapper users mailing list archive at Nabble.com.


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml with postgis - invalidJSON

2011-04-07 Thread moka61

Hi folks

I downloaded 4.1.1 version stable for an update to the previous.
When I run a query on a PostGIS table I can not display the dropbox.

This is my inline search.xml
--
searchlist version=1.0
dataroot$/dataroot
searchitem name=com description=Capoluoghi
layer type=postgis name=capoluoghi
field type=s name=nome description=capoluoghi 
wildcard=2
definition type=options connectiontype=db 
sort=asc
dsn 
encoding=UTF-8pgsql://user:pass@localhost/base/dsn
sqlSELECT DISTINCT nome, nome FROM 
base.centroidi_comune WHERE nome
IS NOT NULL ORDER BY nome/sql 
/definition 
/field 
/layer
/searchitem
/searchlist
---
When view pmapper log I have this result

[07-Apr-2011 14:45:29] P.MAPPER debug info 
search.php-getOptionsFromDb()-json
 { ANDREIS:ANDREIS, ARBA:ARBA, . VITO D'ASIO:VITO
D\'ASIO, ZOPPOLA:ZOPPOLA}
[07-Apr-2011 14:53:47] P.MAPPER debug info 
XML-//definition
 SimpleXMLElement Object
(
[@attributes] = Array
(
[type] = options
[connectiontype] = db
[sort] = asc
)

[dsn] = pgsql://user:paswd@localhost/base
[sql] = SELECT DISTINCT nome, nome FROM base.centroidi_comune WHERE
nome IS NOT NULL ORDER BY nome
)

sems fair...

but in firebug i notice this: invalid JSON

Invalid JSON: {searchJson:{searchitem: com, fields: [{description:
capoluoghi, fldname: nome, fldsize: false, fldsizedesc: false,
fldinline: false, definition: {type:options, selectname:nome,
firstoption:*, size: 0, events:false, options: {
ANDREIS:ANDREIS, 
.   }}}]}, action:searchitem, divelem:2}

in the previous version 4.0 everything was working properly.

I also noticed that the print and download the map if it is not possible if
the map file using INCLUDE tag  with other map file.

Thanks in advance

Daniele

-- 
View this message in context: 
http://old.nabble.com/search.xml-with-postgis---invalidJSON-tp31342230p31342230.html
Sent from the pmapper users mailing list archive at Nabble.com.


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with postgis - invalidJSON

2011-04-07 Thread Armin Burger
Daniele

I guess it's related to an insufficient escaped apostrophe (could eg. be 
the VITO D'ASIO). There were changes in v 4.1 and it especially now 
uses a newer version of jQuery which expects syntactically correct JSON. 
I'll have a look at it and will try to add a patch soon. Please send me 
also via private mail the full JSON string that is reported as invalid.

Regards
Armin

On 07/04/2011 15:06, moka61 wrote:

 Hi folks

 I downloaded 4.1.1 version stable for an update to the previous.
 When I run a query on a PostGIS table I can not display the dropbox.

 This is my inline search.xml
 --
 searchlist version=1.0
  dataroot$/dataroot
   searchitem name=com description=Capoluoghi
   layer type=postgis name=capoluoghi
   field type=s name=nome description=capoluoghi 
 wildcard=2
   definition type=options connectiontype=db 
 sort=asc
   dsn 
 encoding=UTF-8pgsql://user:pass@localhost/base/dsn
   sqlSELECT DISTINCT nome, nome FROM 
 base.centroidi_comune WHERE nome
 IS NOT NULL ORDER BY nome/sql
   /definition
   /field
   /layer
  /searchitem
  /searchlist
 ---
 When view pmapper log I have this result

 [07-Apr-2011 14:45:29] P.MAPPER debug info
 search.php-getOptionsFromDb()-json
   { ANDREIS:ANDREIS, ARBA:ARBA, . VITO D'ASIO:VITO
 D\'ASIO, ZOPPOLA:ZOPPOLA}
 [07-Apr-2011 14:53:47] P.MAPPER debug info
 XML-//definition
   SimpleXMLElement Object
 (
  [@attributes] =  Array
  (
  [type] =  options
  [connectiontype] =  db
  [sort] =  asc
  )

  [dsn] =  pgsql://user:paswd@localhost/base
  [sql] =  SELECT DISTINCT nome, nome FROM base.centroidi_comune WHERE
 nome IS NOT NULL ORDER BY nome
 )

 sems fair...

 but in firebug i notice this: invalid JSON

 Invalid JSON: {searchJson:{searchitem: com, fields: [{description:
 capoluoghi, fldname: nome, fldsize: false, fldsizedesc: false,
 fldinline: false, definition: {type:options, selectname:nome,
 firstoption:*, size: 0, events:false, options: {
 ANDREIS:ANDREIS,
 .   }}}]}, action:searchitem, divelem:2}

 in the previous version 4.0 everything was working properly.

 I also noticed that the print and download the map if it is not possible if
 the map file using INCLUDE tag  with other map file.

 Thanks in advance

 Daniele



--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml

2009-10-22 Thread Kevin Edmundson
I am using the search.xml to define searches and parameters.

 

Is there a way to search on date fields in shape files?

 

Kevin Edmundson

CIO

WTH Technology, Inc

567 W Westfield Blvd

Indianapolis, IN 46208

317.259.0105 office

317.259.1423 fax

317.501.8560 mobile

kevin.edmund...@wthtechnology.com

 

NOTICE: This message is from the technology firm WTH Technology, Inc.
This message is intended only for the individual or entity to which it
is directed. If you are not the addressee, or if this message has been
addressed to you in error, you are not authorized to use, read, copy or
distribute this message and any attachments, and we ask that you please
immediately delete this message and attachments (including all copies),
and notify the sender by return e-mail so that our records can be
corrected. All personal messages express views only of the sender, which
are not to be attributed to WTH Technology, Inc, and may not be
distributed or copied without this statement.

 

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml problem: including external files

2009-09-06 Thread Armin Burger
Paul

I added the modifications to the SVN for all XML parsing (search, print, 
config). Could you be so kind and add some description and use cases for 
this ENTITY references to the Trac Wiki? This way also other users could 
benefit from this. Url for the search would be

http://svn.pmapper.net/trac/wiki/DocManualsearch

To create an account for Trac click on the 'Register' link at the top right.

Thanks, Armin

On 04/09/2009 01:10, Paul Wickman wrote:
 
 Bingo!   That's splendid...
 
 Anyone who would like to see a nice P.Mapper application example can 
 check this one out (all data comes from a PostGIS database on the same 
 server).  Armin, feel free to add it to the gallery if you like.
 
 http://www.mapfeeder.net/rmb
 
 
 Thanks,
 
 Paul Wickman
 North Star Geographics
 pwick...@northstargeographics.com
 612.280.5850
 
 
 On Sep 3, 2009, at 2:48 AM, Armin Burger wrote:
 
 Try to change in query/search.php line 50, from

 $this-xml = simplexml_load_file($xmlFN);

 to

 $this-xml = simplexml_load_file($xmlFN, NULL, LIBXML_NOENT);

 and see if it works better. If so I can add this to the release code.
 I might as well include it for all other XML parsing functions.

 note: this requires  PHP =5.1.0 and Libxml = 2.6.0

 armin

 On Thu, Sep 3, 2009 at 12:06 AM, Paul
 Wickmanpwick...@northstargeographics.com wrote:
 I have a number of P.Mapper (4.0.beta1) applications that have nearly
 identical search.xml files.  Each has a few searchitem definitions
 particular to the application as well as some searchitem definitions
 common to all the applications.  Rather than continue duplicating the
 those things in common for each individual search.xml file, I was
 hoping to include the common entries with an ENTITY reference.

 Here is an example of the search.xml file I am trying to create:

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE document [
 !ENTITY commonsearch SYSTEM /home/nsg/pmapper/
 pmapper-4.0.beta1/config/common/search.xml
 ]
 searchlist version=1.0

 searchitem name=township_range description=PLS: Township/Range/
 SEction
 layer type=postgis name=sections
field type=n name=town description=Township size=3
 wildcard=1 /
field type=n name=rang description=Range size=2
 wildcard=1 /
field type=n name=sect description=Section size=2
 wildcard=1 /
 /layer
 /searchitem

 commonsearch;

 /searchlist


 And here is an excerpt from the referenced file:


 searchitem name=county description=County
 layer type=postgis name=counties
field type=s name=cty_name description=County Name 
 wildcard=2
   definition type=options connectiontype=db sort=asc
 firstoption=-
dsn 
 encoding=LATIN1pgsql://guest1:f33d...@localhost/minnesota/
 dsn
sqlSELECT DISTINCT cty_name,cty_name FROM
 boundary.jurisdiction_county_area ORDER by cty_name/sql
   /definition
/field
 /layer
 /searchitem



 None of the entries from the referenced file get included.  Has anyone
 else tried doing something similar, or is this ability not supported?

 Thanks,

 Paul Wickman
 North Star Geographics
 pwick...@northstargeographics.com
 612.280.5850

 --
  

 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 
 30-Day
 trial. Simplify your report design, integration and deployment - and 
 focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

 
 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml problem: including external files

2009-09-03 Thread Armin Burger
Try to change in query/search.php line 50, from

$this-xml = simplexml_load_file($xmlFN);

to

$this-xml = simplexml_load_file($xmlFN, NULL, LIBXML_NOENT);

and see if it works better. If so I can add this to the release code.
I might as well include it for all other XML parsing functions.

note: this requires  PHP =5.1.0 and Libxml = 2.6.0

armin

On Thu, Sep 3, 2009 at 12:06 AM, Paul
Wickmanpwick...@northstargeographics.com wrote:
 I have a number of P.Mapper (4.0.beta1) applications that have nearly
 identical search.xml files.  Each has a few searchitem definitions
 particular to the application as well as some searchitem definitions
 common to all the applications.  Rather than continue duplicating the
 those things in common for each individual search.xml file, I was
 hoping to include the common entries with an ENTITY reference.

 Here is an example of the search.xml file I am trying to create:

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE document [
         !ENTITY commonsearch SYSTEM /home/nsg/pmapper/
 pmapper-4.0.beta1/config/common/search.xml
 ]
 searchlist version=1.0

 searchitem name=township_range description=PLS: Township/Range/
 SEction
     layer type=postgis name=sections
        field type=n name=town description=Township size=3
 wildcard=1 /
        field type=n name=rang description=Range size=2
 wildcard=1 /
        field type=n name=sect description=Section size=2
 wildcard=1 /
     /layer
 /searchitem

 commonsearch;

 /searchlist


 And here is an excerpt from the referenced file:


 searchitem name=county description=County
     layer type=postgis name=counties
        field type=s name=cty_name description=County Name wildcard=2
           definition type=options connectiontype=db sort=asc
 firstoption=-
                dsn 
 encoding=LATIN1pgsql://guest1:f33d...@localhost/minnesota/
 dsn
                sqlSELECT DISTINCT cty_name,cty_name FROM
 boundary.jurisdiction_county_area ORDER by cty_name/sql
           /definition
        /field
     /layer
 /searchitem



 None of the entries from the referenced file get included.  Has anyone
 else tried doing something similar, or is this ability not supported?

 Thanks,

 Paul Wickman
 North Star Geographics
 pwick...@northstargeographics.com
 612.280.5850

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml problem: including external files

2009-09-03 Thread Paul Wickman

Bingo!   That's splendid...

Anyone who would like to see a nice P.Mapper application example can  
check this one out (all data comes from a PostGIS database on the same  
server).  Armin, feel free to add it to the gallery if you like.

http://www.mapfeeder.net/rmb


Thanks,

Paul Wickman
North Star Geographics
pwick...@northstargeographics.com
612.280.5850


On Sep 3, 2009, at 2:48 AM, Armin Burger wrote:

 Try to change in query/search.php line 50, from

 $this-xml = simplexml_load_file($xmlFN);

 to

 $this-xml = simplexml_load_file($xmlFN, NULL, LIBXML_NOENT);

 and see if it works better. If so I can add this to the release code.
 I might as well include it for all other XML parsing functions.

 note: this requires  PHP =5.1.0 and Libxml = 2.6.0

 armin

 On Thu, Sep 3, 2009 at 12:06 AM, Paul
 Wickmanpwick...@northstargeographics.com wrote:
 I have a number of P.Mapper (4.0.beta1) applications that have nearly
 identical search.xml files.  Each has a few searchitem definitions
 particular to the application as well as some searchitem  
 definitions
 common to all the applications.  Rather than continue duplicating the
 those things in common for each individual search.xml file, I was
 hoping to include the common entries with an ENTITY reference.

 Here is an example of the search.xml file I am trying to create:

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE document [
 !ENTITY commonsearch SYSTEM /home/nsg/pmapper/
 pmapper-4.0.beta1/config/common/search.xml
 ]
 searchlist version=1.0

 searchitem name=township_range description=PLS: Township/Range/
 SEction
 layer type=postgis name=sections
field type=n name=town description=Township size=3
 wildcard=1 /
field type=n name=rang description=Range size=2
 wildcard=1 /
field type=n name=sect description=Section size=2
 wildcard=1 /
 /layer
 /searchitem

 commonsearch;

 /searchlist


 And here is an excerpt from the referenced file:


 searchitem name=county description=County
 layer type=postgis name=counties
field type=s name=cty_name description=County Name  
 wildcard=2
   definition type=options connectiontype=db sort=asc
 firstoption=-
dsn encoding=LATIN1pgsql://guest1:f33dME! 
 @localhost/minnesota/
 dsn
sqlSELECT DISTINCT cty_name,cty_name FROM
 boundary.jurisdiction_county_area ORDER by cty_name/sql
   /definition
/field
 /layer
 /searchitem



 None of the entries from the referenced file get included.  Has  
 anyone
 else tried doing something similar, or is this ability not supported?

 Thanks,

 Paul Wickman
 North Star Geographics
 pwick...@northstargeographics.com
 612.280.5850

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports  
 2008 30-Day
 trial. Simplify your report design, integration and deployment -  
 and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml problem: including external files

2009-09-02 Thread Paul Wickman
I have a number of P.Mapper (4.0.beta1) applications that have nearly  
identical search.xml files.  Each has a few searchitem definitions  
particular to the application as well as some searchitem definitions  
common to all the applications.  Rather than continue duplicating the  
those things in common for each individual search.xml file, I was  
hoping to include the common entries with an ENTITY reference.

Here is an example of the search.xml file I am trying to create:

?xml version=1.0 encoding=UTF-8?

!DOCTYPE document [
 !ENTITY commonsearch SYSTEM /home/nsg/pmapper/ 
pmapper-4.0.beta1/config/common/search.xml
]
searchlist version=1.0

searchitem name=township_range description=PLS: Township/Range/ 
SEction
 layer type=postgis name=sections
field type=n name=town description=Township size=3  
wildcard=1 /
field type=n name=rang description=Range size=2  
wildcard=1 /
field type=n name=sect description=Section size=2  
wildcard=1 /
 /layer
/searchitem

commonsearch;

/searchlist


And here is an excerpt from the referenced file:


searchitem name=county description=County
 layer type=postgis name=counties
field type=s name=cty_name description=County Name wildcard=2
   definition type=options connectiontype=db sort=asc  
firstoption=-
dsn 
encoding=LATIN1pgsql://guest1:f33d...@localhost/minnesota/ 
dsn
sqlSELECT DISTINCT cty_name,cty_name FROM  
boundary.jurisdiction_county_area ORDER by cty_name/sql
   /definition
/field
 /layer
/searchitem



None of the entries from the referenced file get included.  Has anyone  
else tried doing something similar, or is this ability not supported?

Thanks,

Paul Wickman
North Star Geographics
pwick...@northstargeographics.com
612.280.5850

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] SEARCH.XML FOR ORACLE LAYER

2009-05-06 Thread Armin Burger
Luis

I unfortunately have no Oracle installation available so I usually
cannot test the functioning of it. All tests made so far with oracle
was on a server from a user that I could access via ftp. Since 1 year
or more I have not any more tried this and I guess the connection is
not any more available.

Why the query doesn't return any result, I don't know. The whole
querybyattribute stuff is not one of the best parts of Mapserver and
not always working as expected with anything else than shapefiles.
That's the reason why I still keep the separate query for Postgis
using PHP-Postgres functions instead of Mapscript.

Please try the query with a simple, example using the script from here
http://svn.pmapper.net/trac/browser/pmapper/trunk/utils/test_query_string.php?format=txt

modify the parameters for mapfile, layer name and query string (taking
the one from the debug log, like
UPPER(DPTO) LIKE '%CHALATENANGO%'), ie. $mapFile, $qLayer, $qStr. If
no result is returned then you need to ask this on the Mapserver
mailing list. Be sure that the query executes correctly when executing
it from a normal Oracle client.

armin

On Wed, May 6, 2009 at 6:22 AM, Luis Orlando Melendez
luisorlando.melen...@gmail.com wrote:
 Hi everyone,

 Im trying to configure search.xml file  for a oracle layer and when
 performing the search i have no results, please any  idea about what  i
 m doing wrong is welcome:

 * I'm using :    MS4W  2.2.8,  mapserv 5.2.0     ,  pmapper 3.2 0 -
 BUILD 2008-03-05,  the database is oracle XE 10g
 Im runnig all in a ruindows xp  sp2

 *
 this is the search.xml file :

 ?xml version=1.0 ?
 !--?xml-stylesheet type=text/xsl href=stylesheet.xsl?--
 searchlist version=1.0

  dataroot$/dataroot

  searchitem name=departamentos description=departamentos
    layer type=oracle name=departamentos
        field type=n name=GID description=GID wildcard=2 /
    /layer
  /searchitem


  searchitem name=municipios description=Municipios
    layer type=oracle name=municipios
      field type=s name=LONGNAME description=Municipios
 wildcard=0 /
    /layer
  /searchitem

  searchitem name=iglesias description=iglesias
    layer type=oracle name=iglesias
      field type=s name=LONGNAME description=iglesias wildcard=0 /
    /layer
  /searchitem


  searchitem name=campings description=Camping
    layer type=oracle name=campings
      field type=s name=LONGNAME description=Camping : wildcard=0
      /field
    /layer
  /searchitem
 /searchlist


 the layer I have configured is this:

 #== DEPARTAMENTOS
 ==#
 #departamentos
 #
 # Start of Layer Departamentos
 #
 LAYER
  NAME departamentos
  TYPE polygon
    CONNECTIONTYPE oraclespatial
    CONNECTION mapa/m...@admin
    DATA GEOMETRY FROM DEPARTAMENTOS USING UNIQUE GID
    DUMP TRUE
    TEMPLATE void
    STATUS ON
  #TRANSPARENCY 70
  PROJECTION
    init=epsg:32062
  END
  METADATA
    DESCRIPTION departamentos
    RESULT_FIELDS DPTO, GID
    RESULT_HEADERS dpto, gid
    RESULT_HYPERLINK DPTO, GID
    ows_title      departamentos
  END  # Metadata
  CLASS
    Name 'departamentos'
    COLOR 16 181 84
    OUTLINECOLOR 0 0 0
    TEMPLATE void
  END  # Class
 END  # Layer


 THIS IS THE PM_DEBUG.LOG i n the  \incphp\xajax   directory


 [05-May-2009 23:04:11] P.MAPPER debug info
 Validation of search.xml file succeeded

 [05-May-2009 23:04:37] P.MAPPER debug info
 Searcharray in search.php-getSearchParameters()
  Array
 (
    [DPTO] = CHALATENANGO
    [mode] = search
    [PHPSESSID] = 5d82664df04e9a59a4c450810ad4857d
 )

 [05-May-2009 23:04:37] P.MAPPER debug info
 Parameters for searchArray
 file: query.php-q_execAttributeQuery

  Array
 (
    [DPTO] = CHALATENANGO
    [mode] = search
    [PHPSESSID] = 5d82664df04e9a59a4c450810ad4857d
 )

 [05-May-2009 23:04:37] P.MAPPER debug info
 Parameters for searchParams
 file: query.php-q_execAttributeQuery
  Array
 (
    [layerName] = departamentos
    [layerType] = oracle
    [firstFld] = DPTO
    [qStr] =   UPPER(DPTO) LIKE '%CHALATENANGO%'
 )






 --
 The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
 production scanning environment may not be a perfect world - but thanks to
 Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
 Series Scanner you'll get full speed at 300 dpi even with all image
 processing features enabled. http://p.sf.net/sfu/kodak-com
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users


--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series 

Re: [pmapper-users] SEARCH.XML FOR ORACLE LAYER

2009-05-06 Thread Thomas Raffin
Hi Luis,

I've made few modification for querying Oracle layers but I haven't yet 
finished my tests.

Try to replace in your-pmapper-dir/incphp/query.php, at the end of 
q_execAttributeQuery function :

@$this-qLayer-queryByAttributes($fldName, $this-qStr, 
MS_MULTIPLE);

with

if ($this-qLayerType == oracle) {
 @$this-qLayer-queryByAttributes(null, $this-qStr, 
MS_MULTIPLE);
} else {
 @$this-qLayer-queryByAttributes($fldName, 
$this-qStr, MS_MULTIPLE);
}

I think it will solve your problem.

Thomas

Armin Burger a écrit :
 Luis

 I unfortunately have no Oracle installation available so I usually
 cannot test the functioning of it. All tests made so far with oracle
 was on a server from a user that I could access via ftp. Since 1 year
 or more I have not any more tried this and I guess the connection is
 not any more available.

 Why the query doesn't return any result, I don't know. The whole
 querybyattribute stuff is not one of the best parts of Mapserver and
 not always working as expected with anything else than shapefiles.
 That's the reason why I still keep the separate query for Postgis
 using PHP-Postgres functions instead of Mapscript.

 Please try the query with a simple, example using the script from here
 http://svn.pmapper.net/trac/browser/pmapper/trunk/utils/test_query_string.php?format=txt

 modify the parameters for mapfile, layer name and query string (taking
 the one from the debug log, like
 UPPER(DPTO) LIKE '%CHALATENANGO%'), ie.   $mapFile, $qLayer, $qStr. If
 no result is returned then you need to ask this on the Mapserver
 mailing list. Be sure that the query executes correctly when executing
 it from a normal Oracle client.

 armin

 On Wed, May 6, 2009 at 6:22 AM, Luis Orlando Melendez
 luisorlando.melen...@gmail.com wrote:
   
 Hi everyone,

 Im trying to configure search.xml file  for a oracle layer and when
 performing the search i have no results, please any  idea about what  i
 m doing wrong is welcome:

 * I'm using :MS4W  2.2.8,  mapserv 5.2.0 ,  pmapper 3.2 0 -
 BUILD 2008-03-05,  the database is oracle XE 10g
 Im runnig all in a ruindows xp  sp2

 *
 this is the search.xml file :

 ?xml version=1.0 ?
 !--?xml-stylesheet type=text/xsl href=stylesheet.xsl?--
 searchlist version=1.0

  dataroot$/dataroot

  searchitem name=departamentos description=departamentos
layer type=oracle name=departamentos
field type=n name=GID description=GID wildcard=2 /
/layer
  /searchitem


  searchitem name=municipios description=Municipios
layer type=oracle name=municipios
  field type=s name=LONGNAME description=Municipios
 wildcard=0 /
/layer
  /searchitem

  searchitem name=iglesias description=iglesias
layer type=oracle name=iglesias
  field type=s name=LONGNAME description=iglesias wildcard=0 /
/layer
  /searchitem


  searchitem name=campings description=Camping
layer type=oracle name=campings
  field type=s name=LONGNAME description=Camping : wildcard=0
  /field
/layer
  /searchitem
 /searchlist


 the layer I have configured is this:

 #== DEPARTAMENTOS
 ==#
 #departamentos
 #
 # Start of Layer Departamentos
 #
 LAYER
  NAME departamentos
  TYPE polygon
CONNECTIONTYPE oraclespatial
CONNECTION mapa/m...@admin
DATA GEOMETRY FROM DEPARTAMENTOS USING UNIQUE GID
DUMP TRUE
TEMPLATE void
STATUS ON
  #TRANSPARENCY 70
  PROJECTION
init=epsg:32062
  END
  METADATA
DESCRIPTION departamentos
RESULT_FIELDS DPTO, GID
RESULT_HEADERS dpto, gid
RESULT_HYPERLINK DPTO, GID
ows_title  departamentos
  END  # Metadata
  CLASS
Name 'departamentos'
COLOR 16 181 84
OUTLINECOLOR 0 0 0
TEMPLATE void
  END  # Class
 END  # Layer


 THIS IS THE PM_DEBUG.LOG i n the  \incphp\xajax   directory


 [05-May-2009 23:04:11] P.MAPPER debug info
 Validation of search.xml file succeeded

 [05-May-2009 23:04:37] P.MAPPER debug info
 Searcharray in search.php-getSearchParameters()
  Array
 (
[DPTO] = CHALATENANGO
[mode] = search
[PHPSESSID] = 5d82664df04e9a59a4c450810ad4857d
 )

 [05-May-2009 23:04:37] P.MAPPER debug info
 Parameters for searchArray
 file: query.php-q_execAttributeQuery

  Array
 (
[DPTO] = CHALATENANGO
[mode] = search
[PHPSESSID] = 5d82664df04e9a59a4c450810ad4857d
 )

 [05-May-2009 23:04:37] P.MAPPER debug info
 Parameters for searchParams
 file: query.php-q_execAttributeQuery
  Array
 (
[layerName] = departamentos
[layerType] = oracle
[firstFld] = DPTO
[qStr] =   UPPER(DPTO) LIKE '%CHALATENANGO%'
 )






 --
 The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
 production scanning environment may not be a perfect world - but thanks to
 Kodak, there's a perfect scanner to get the job done! With the NEW 

Re: [pmapper-users] SEARCH.XML FOR ORACLE LAYER

2009-05-06 Thread Armin Burger

Thanks. It's added to SVN trunk and latest-stable.

armin

On 06/05/2009 11:03, Thomas Raffin wrote:
 Hi Luis,
 
 I've made few modification for querying Oracle layers but I haven't yet 
 finished my tests.
 
 Try to replace in your-pmapper-dir/incphp/query.php, at the end of 
 q_execAttributeQuery function :
 
 @$this-qLayer-queryByAttributes($fldName, $this-qStr, 
 MS_MULTIPLE);
 
 with
 
 if ($this-qLayerType == oracle) {
  @$this-qLayer-queryByAttributes(null, $this-qStr, 
 MS_MULTIPLE);
 } else {
  @$this-qLayer-queryByAttributes($fldName, 
 $this-qStr, MS_MULTIPLE);
 }
 
 I think it will solve your problem.
 
 Thomas
 
 Armin Burger a écrit :
 Luis

 I unfortunately have no Oracle installation available so I usually
 cannot test the functioning of it. All tests made so far with oracle
 was on a server from a user that I could access via ftp. Since 1 year
 or more I have not any more tried this and I guess the connection is
 not any more available.

 Why the query doesn't return any result, I don't know. The whole
 querybyattribute stuff is not one of the best parts of Mapserver and
 not always working as expected with anything else than shapefiles.
 That's the reason why I still keep the separate query for Postgis
 using PHP-Postgres functions instead of Mapscript.

 Please try the query with a simple, example using the script from here
 http://svn.pmapper.net/trac/browser/pmapper/trunk/utils/test_query_string.php?format=txt

 modify the parameters for mapfile, layer name and query string (taking
 the one from the debug log, like
 UPPER(DPTO) LIKE '%CHALATENANGO%'), ie.  $mapFile, $qLayer, $qStr. If
 no result is returned then you need to ask this on the Mapserver
 mailing list. Be sure that the query executes correctly when executing
 it from a normal Oracle client.

 armin

 On Wed, May 6, 2009 at 6:22 AM, Luis Orlando Melendez
 luisorlando.melen...@gmail.com wrote:
   
 Hi everyone,

 Im trying to configure search.xml file  for a oracle layer and when
 performing the search i have no results, please any  idea about what  i
 m doing wrong is welcome:

 * I'm using :MS4W  2.2.8,  mapserv 5.2.0 ,  pmapper 3.2 0 -
 BUILD 2008-03-05,  the database is oracle XE 10g
 Im runnig all in a ruindows xp  sp2

 *
 this is the search.xml file :

 ?xml version=1.0 ?
 !--?xml-stylesheet type=text/xsl href=stylesheet.xsl?--
 searchlist version=1.0

  dataroot$/dataroot

  searchitem name=departamentos description=departamentos
layer type=oracle name=departamentos
field type=n name=GID description=GID wildcard=2 /
/layer
  /searchitem


  searchitem name=municipios description=Municipios
layer type=oracle name=municipios
  field type=s name=LONGNAME description=Municipios
 wildcard=0 /
/layer
  /searchitem

  searchitem name=iglesias description=iglesias
layer type=oracle name=iglesias
  field type=s name=LONGNAME description=iglesias wildcard=0 /
/layer
  /searchitem


  searchitem name=campings description=Camping
layer type=oracle name=campings
  field type=s name=LONGNAME description=Camping : wildcard=0
  /field
/layer
  /searchitem
 /searchlist


 the layer I have configured is this:

 #== DEPARTAMENTOS
 ==#
 #departamentos
 #
 # Start of Layer Departamentos
 #
 LAYER
  NAME departamentos
  TYPE polygon
CONNECTIONTYPE oraclespatial
CONNECTION mapa/m...@admin
DATA GEOMETRY FROM DEPARTAMENTOS USING UNIQUE GID
DUMP TRUE
TEMPLATE void
STATUS ON
  #TRANSPARENCY 70
  PROJECTION
init=epsg:32062
  END
  METADATA
DESCRIPTION departamentos
RESULT_FIELDS DPTO, GID
RESULT_HEADERS dpto, gid
RESULT_HYPERLINK DPTO, GID
ows_title  departamentos
  END  # Metadata
  CLASS
Name 'departamentos'
COLOR 16 181 84
OUTLINECOLOR 0 0 0
TEMPLATE void
  END  # Class
 END  # Layer


 THIS IS THE PM_DEBUG.LOG i n the  \incphp\xajax   directory


 [05-May-2009 23:04:11] P.MAPPER debug info
 Validation of search.xml file succeeded

 [05-May-2009 23:04:37] P.MAPPER debug info
 Searcharray in search.php-getSearchParameters()
  Array
 (
[DPTO] = CHALATENANGO
[mode] = search
[PHPSESSID] = 5d82664df04e9a59a4c450810ad4857d
 )

 [05-May-2009 23:04:37] P.MAPPER debug info
 Parameters for searchArray
 file: query.php-q_execAttributeQuery

  Array
 (
[DPTO] = CHALATENANGO
[mode] = search
[PHPSESSID] = 5d82664df04e9a59a4c450810ad4857d
 )

 [05-May-2009 23:04:37] P.MAPPER debug info
 Parameters for searchParams
 file: query.php-q_execAttributeQuery
  Array
 (
[layerName] = departamentos
[layerType] = oracle
[firstFld] = DPTO
[qStr] =   UPPER(DPTO) LIKE '%CHALATENANGO%'
 )






 --
 The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
 production 

Re: [pmapper-users] SEARCH.XML FOR ORACLE LAYER

2009-05-06 Thread Luis Orlando Melendez
Hi Thomas,

Thanks a Lot for the piece of code, it solved the problem, now  i have 
results.
Armin,
 I also checked the script you sent me to understand how it works.

Thaks a lot Thomas and Armin for your time.

Muchas Gracias,
Luis Orlando Melendez
El Salvador, Centro America

Thomas Raffin escribió:
 Hi Luis,

 I've made few modification for querying Oracle layers but I haven't 
 yet finished my tests.

 Try to replace in your-pmapper-dir/incphp/query.php, at the end of 
 q_execAttributeQuery function :
 
 @$this-qLayer-queryByAttributes($fldName, $this-qStr, 
 MS_MULTIPLE);
 
 with
 
 if ($this-qLayerType == oracle) {
  @$this-qLayer-queryByAttributes(null, $this-qStr, 
 MS_MULTIPLE);
 } else {
  @$this-qLayer-queryByAttributes($fldName, 
 $this-qStr, MS_MULTIPLE);
 }
 
 I think it will solve your problem.

 Thomas

 Armin Burger a écrit :
 Luis

 I unfortunately have no Oracle installation available so I usually
 cannot test the functioning of it. All tests made so far with oracle
 was on a server from a user that I could access via ftp. Since 1 year
 or more I have not any more tried this and I guess the connection is
 not any more available.

 Why the query doesn't return any result, I don't know. The whole
 querybyattribute stuff is not one of the best parts of Mapserver and
 not always working as expected with anything else than shapefiles.
 That's the reason why I still keep the separate query for Postgis
 using PHP-Postgres functions instead of Mapscript.

 Please try the query with a simple, example using the script from here
 http://svn.pmapper.net/trac/browser/pmapper/trunk/utils/test_query_string.php?format=txt

 modify the parameters for mapfile, layer name and query string (taking
 the one from the debug log, like
 UPPER(DPTO) LIKE '%CHALATENANGO%'), ie.  $mapFile, $qLayer, $qStr. If
 no result is returned then you need to ask this on the Mapserver
 mailing list. Be sure that the query executes correctly when executing
 it from a normal Oracle client.

 armin

 On Wed, May 6, 2009 at 6:22 AM, Luis Orlando Melendez
 luisorlando.melen...@gmail.com wrote:
   
 Hi everyone,

 Im trying to configure search.xml file  for a oracle layer and when
 performing the search i have no results, please any  idea about what  i
 m doing wrong is welcome:

 * I'm using :MS4W  2.2.8,  mapserv 5.2.0 ,  pmapper 3.2 0 -
 BUILD 2008-03-05,  the database is oracle XE 10g
 Im runnig all in a ruindows xp  sp2

 *
 this is the search.xml file :

 ?xml version=1.0 ?
 !--?xml-stylesheet type=text/xsl href=stylesheet.xsl?--
 searchlist version=1.0

  dataroot$/dataroot

  searchitem name=departamentos description=departamentos
layer type=oracle name=departamentos
field type=n name=GID description=GID wildcard=2 /
/layer
  /searchitem


  searchitem name=municipios description=Municipios
layer type=oracle name=municipios
  field type=s name=LONGNAME description=Municipios
 wildcard=0 /
/layer
  /searchitem

  searchitem name=iglesias description=iglesias
layer type=oracle name=iglesias
  field type=s name=LONGNAME description=iglesias wildcard=0 /
/layer
  /searchitem


  searchitem name=campings description=Camping
layer type=oracle name=campings
  field type=s name=LONGNAME description=Camping : wildcard=0
  /field
/layer
  /searchitem
 /searchlist


 the layer I have configured is this:

 #== DEPARTAMENTOS
 ==#
 #departamentos
 #
 # Start of Layer Departamentos
 #
 LAYER
  NAME departamentos
  TYPE polygon
CONNECTIONTYPE oraclespatial
CONNECTION mapa/m...@admin
DATA GEOMETRY FROM DEPARTAMENTOS USING UNIQUE GID
DUMP TRUE
TEMPLATE void
STATUS ON
  #TRANSPARENCY 70
  PROJECTION
init=epsg:32062
  END
  METADATA
DESCRIPTION departamentos
RESULT_FIELDS DPTO, GID
RESULT_HEADERS dpto, gid
RESULT_HYPERLINK DPTO, GID
ows_title  departamentos
  END  # Metadata
  CLASS
Name 'departamentos'
COLOR 16 181 84
OUTLINECOLOR 0 0 0
TEMPLATE void
  END  # Class
 END  # Layer


 THIS IS THE PM_DEBUG.LOG i n the  \incphp\xajax   directory


 [05-May-2009 23:04:11] P.MAPPER debug info
 Validation of search.xml file succeeded

 [05-May-2009 23:04:37] P.MAPPER debug info
 Searcharray in search.php-getSearchParameters()
  Array
 (
[DPTO] = CHALATENANGO
[mode] = search
[PHPSESSID] = 5d82664df04e9a59a4c450810ad4857d
 )

 [05-May-2009 23:04:37] P.MAPPER debug info
 Parameters for searchArray
 file: query.php-q_execAttributeQuery

  Array
 (
[DPTO] = CHALATENANGO
[mode] = search
[PHPSESSID] = 5d82664df04e9a59a4c450810ad4857d
 )

 [05-May-2009 23:04:37] P.MAPPER debug info
 Parameters for searchParams
 file: query.php-q_execAttributeQuery
  Array
 (
[layerName] = departamentos
[layerType] = oracle
[firstFld] = DPTO
[qStr] =   UPPER(DPTO) LIKE 

[pmapper-users] search.xml

2009-02-16 Thread Kevin Edmundson
Hello List,

 

I have a map file that contains multiple shape files for parcels that
are separated by townships meaning that I have 9 shape files that
comprise different geographical regions of one governmental entity.  

 

I would like to give the user the ability to have a search function that
would be by OwnerName.  Each of these layers (shapefiles) has a filed
OwnerName.  I was wondering if there was a way to configure the
search.xml such that one SearchItem entry would search ALL 9 layers for
that particular field value and return the result?

 

Any help would be greatly appreciated.

 

Kevin Edmundson

CIO

WTH Technology, Inc

567 W Westfield Blvd

Indianapolis, IN 46208

317.259.0105 office

317.259.1423 fax

317.501.8560 mobile

kevin.edmund...@wthtechnology.com

 

NOTICE: This message is from the technology firm WTH Technology, Inc.
This message is intended only for the individual or entity to which it
is directed. If you are not the addressee, or if this message has been
addressed to you in error, you are not authorized to use, read, copy or
distribute this message and any attachments, and we ask that you please
immediately delete this message and attachments (including all copies),
and notify the sender by return e-mail so that our records can be
corrected. All personal messages express views only of the sender, which
are not to be attributed to WTH Technology, Inc, and may not be
distributed or copied without this statement.

 

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml

2009-02-16 Thread Armin Burger
If you combine all 9 shape datasets in 1 tileindex layer insetad of 9 
separate layers
(see http://mapserver.org/optimization/tileindex.html)
then the search should go through all single shapes and retrieve all 
parcels. I think that also the suggest definition works (with 
connectiontype=ms) with tileindex layers.

armin

On 16/02/2009 17:51, Kevin Edmundson wrote:
 Hello List,
 
  
 
 I have a map file that contains multiple shape files for parcels that
 are separated by townships meaning that I have 9 shape files that
 comprise different geographical regions of one governmental entity.  
 
  
 
 I would like to give the user the ability to have a search function that
 would be by OwnerName.  Each of these layers (shapefiles) has a filed
 OwnerName.  I was wondering if there was a way to configure the
 search.xml such that one SearchItem entry would search ALL 9 layers for
 that particular field value and return the result?
 
  
 
 Any help would be greatly appreciated.
 
  
 
 Kevin Edmundson
 
 CIO
 
 WTH Technology, Inc
 
 567 W Westfield Blvd
 
 Indianapolis, IN 46208
 
 317.259.0105 office
 
 317.259.1423 fax
 
 317.501.8560 mobile
 
 kevin.edmund...@wthtechnology.com
 
  
 
 NOTICE: This message is from the technology firm WTH Technology, Inc.
 This message is intended only for the individual or entity to which it
 is directed. If you are not the addressee, or if this message has been
 addressed to you in error, you are not authorized to use, read, copy or
 distribute this message and any attachments, and we ask that you please
 immediately delete this message and attachments (including all copies),
 and notify the sender by return e-mail so that our records can be
 corrected. All personal messages express views only of the sender, which
 are not to be attributed to WTH Technology, Inc, and may not be
 distributed or copied without this statement.
 
  
 
 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
 -Strategies to boost innovation and cut costs with open source participation
 -Receive a $600 discount off the registration fee with the source code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users
 



--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml

2009-02-16 Thread Armin Burger
the *attribute* search in p.mapper is independent of the current map 
extent since it's not applied on the map object before running the 
queryByAttribute() method (there's no difference between normal shape 
layers and tileindex layers). So it uses the default extent defined in 
the map file.

armin

On 16/02/2009 19:55, Kevin Edmundson wrote:
 Thanks for the information.  I think I will use that on my image files.
 
 
 However...I do not want to limit the searching of a vector layer to just
 the current view.  A user might be searching for 'SMITH' as a last name
 for parcel information and they might exist outside the currently viewed
 data.
 
 Unless there is a way to use the TileIndex that way, is my only option
 to combine the actual shapefiles into one gigantic one and use it as the
 source for the layer?
 
 Kevin Edmundson
 CIO
 WTH Technology, Inc
 567 W Westfield Blvd
 Indianapolis, IN 46208
 317.259.0105 office
 317.259.1423 fax
 317.501.8560 mobile
 kevin.edmund...@wthtechnology.com
 
 NOTICE: This message is from the technology firm WTH Technology, Inc.
 This message is intended only for the individual or entity to which it
 is directed. If you are not the addressee, or if this message has been
 addressed to you in error, you are not authorized to use, read, copy or
 distribute this message and any attachments, and we ask that you please
 immediately delete this message and attachments (including all copies),
 and notify the sender by return e-mail so that our records can be
 corrected. All personal messages express views only of the sender, which
 are not to be attributed to WTH Technology, Inc, and may not be
 distributed or copied without this statement.
 
 -Original Message-
 From: Armin Burger [mailto:armin.bur...@gmail.com] 
 Sent: Monday, February 16, 2009 1:37 PM
 To: Kevin Edmundson
 Cc: pmapper-users@lists.sourceforge.net
 Subject: Re: [pmapper-users] search.xml
 
 If you combine all 9 shape datasets in 1 tileindex layer insetad of 9 
 separate layers
 (see http://mapserver.org/optimization/tileindex.html)
 then the search should go through all single shapes and retrieve all 
 parcels. I think that also the suggest definition works (with 
 connectiontype=ms) with tileindex layers.
 
 armin
 
 On 16/02/2009 17:51, Kevin Edmundson wrote:
 Hello List,

  

 I have a map file that contains multiple shape files for parcels that
 are separated by townships meaning that I have 9 shape files that
 comprise different geographical regions of one governmental entity.  

  

 I would like to give the user the ability to have a search function
 that
 would be by OwnerName.  Each of these layers (shapefiles) has a filed
 OwnerName.  I was wondering if there was a way to configure the
 search.xml such that one SearchItem entry would search ALL 9 layers
 for
 that particular field value and return the result?

  

 Any help would be greatly appreciated.

  

 Kevin Edmundson

 CIO

 WTH Technology, Inc

 567 W Westfield Blvd

 Indianapolis, IN 46208

 317.259.0105 office

 317.259.1423 fax

 317.501.8560 mobile

 kevin.edmund...@wthtechnology.com

  

 NOTICE: This message is from the technology firm WTH Technology, Inc.
 This message is intended only for the individual or entity to which it
 is directed. If you are not the addressee, or if this message has been
 addressed to you in error, you are not authorized to use, read, copy
 or
 distribute this message and any attachments, and we ask that you
 please
 immediately delete this message and attachments (including all
 copies),
 and notify the sender by return e-mail so that our records can be
 corrected. All personal messages express views only of the sender,
 which
 are not to be attributed to WTH Technology, Inc, and may not be
 distributed or copied without this statement.

  


 
 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San
 Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the
 Enterprise
 -Strategies to boost innovation and cut costs with open source
 participation
 -Receive a $600 discount off the registration fee with the source
 code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

 
 
 


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists

[pmapper-users] search.xml

2008-03-18 Thread Eugenio Trumpy

Hi to all!
I've got a problem with a pmapper 3.1 project, in particular with search.xml 
files. 
I'm using a just one pmapper directory for 8 map in my project.
I've prepared 8 config directory, inside:
/var/www/pmapper/config/
for each directory i've php_config.php and search.xml,
but i've got the search combo box only in the first map that use
search.xml inside the default directory in /var/www/pmapper/config/
I've put the path in the config file, but it doesn't work.
What is the problem?
 
Best reguards
Eugenio
_
Gioca a Fantaleague e sfida i tuoi amici sul campo!
http://fantaleague.it.msn.com/
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml

2008-03-18 Thread Armin Burger
check the value of the session var 'PM_SEARCH_CONFIGFILE' and see if it 
corresponds with your config.

armin

On 18/03/2008 09:26, Eugenio Trumpy wrote:
 Hi to all!
 I've got a problem with a pmapper 3.1 project, in particular with search.xml 
 files. 
 I'm using a just one pmapper directory for 8 map in my project.
 I've prepared 8 config directory, inside:
 /var/www/pmapper/config/
 for each directory i've php_config.php and search.xml,
 but i've got the search combo box only in the first map that use
 search.xml inside the default directory in /var/www/pmapper/config/
 I've put the path in the config file, but it doesn't work.
 What is the problem?
  
 Best reguards
 Eugenio
 _
 Gioca a Fantaleague e sfida i tuoi amici sul campo!
 http://fantaleague.it.msn.com/
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml and layer oraclespatial

2008-03-05 Thread Ivan Mincik
Hi,
there is nice documentation here: 
http://svn.pmapper.net/trac/wiki/DocManualsearch


On Wednesday 05 March 2008 09:32, Adriano Di Pasquale wrote:
 I'm a newbie.
 I'm using pmapper-3.1-beta4

 I've added the following layer in the mapfile pmapper_demo.map:

 ##
 LAYER
  NAME rivers
  TYPE POLYGON
  STATUS OFF
  CONNECTIONTYPE oraclespatial
  CONNECTION tracking/[EMAIL PROTECTED]

  DATA GEOMETRY FROM (SELECT * FROM WORLD_SAMPLE.M_ADMIN_AREA2 WHERE
 COUNTRY_CODE_3 = 'ITA' ) USING SRID 8307

  PROJECTION
   init=epsg:4326
  END
  CLASS
   NAME Comuni
   OUTLINECOLOR 0 0 0
   COLOR 0 128 128
  END
 END
 ##

 where data are extracted from a table of oracle spatial, whose structure is
 the following:

 TABLE M_ADMIN_AREA2
 (
FEATURE_ID  NUMBER,
FEATURE_NAMEVARCHAR2(225 CHAR),
AREA_ID NUMBER,
NAME_LANGCODE   VARCHAR2(35 CHAR),
FEATURE_TYPEVARCHAR2(30 CHAR),
COUNTRY_CODE_3  VARCHAR2(3 CHAR),
GEOMETRYMDSYS.SDO_GEOMETRY,
CARTO_IDNUMBER(10)
 )

 I would like to understand how to perform a search using the search.xml
 file. The field I would like to search is FEATURE_NAME


 Thanks
 Adriano

 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml

2008-02-21 Thread marcozani...@geosweb.it
Hi i'm working with pmapper 3.2 beta4, i'm using search.xml
and i noted that if i write a accent word the search doesn't
work, the form desappears from the layout.
Example:

field type=s name=FRAZIONE
description=Località wildcard=2

i used alse the decoding for special characters:

field type=s name=FRAZIONE
description=Localitaagrave; wildcard=2
but i didn't have any good result.

Anybody could help me??

thanks all!!
marco zanieri



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml

2008-01-16 Thread marcozani...@geosweb.it
Hi, i have installed MDB2 on PEAR so i haven't any more the
error: Warning:  Suggest::require_once(DB.php)
 [function.Suggest-require-once]: failed to open stream: No
 such file or directory in

C:\ms4w\apps\pmapper\pmapper-3.2.beta4\incphp\query\suggest.php
 on line 126
but the search doesn't work; i'm working with
pmapper3.2beta4 and i'm using postgis, i'm trying to make a
search type=suggest/option, so in search.xml i wrote:
searchitem name=civici_pg description=civici pg
layer type=postgis name=civici
field type=s name=descvia description=via
 wildcard=2
  definition type=suggest connectiontype=db
sort=asc minlength=2 dependfld=descvia
  dsn
encoding=UTF-8pgsql://postgres:[EMAIL PROTECTED]/acam/dsn
  /definition
/field   
/layer
/searchitem

where:
user= postgres
host= localhost
db= acam

When I make the search it doesn't work and in the log
file(\ms4w\Apache\logs) there is not any information. 
 Anybody could help me??

 thanks all!!
 marco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml

2008-01-16 Thread Andre van Atten
Marco,

Look in pmapper-3.2.beta4\config\dev\search.xml fro some nice samples.
Teh second field is a suggest. Mind the sql statement and the depend
field.

searchitem name=cities_options_suggest_pg description=Communes
Suggest PG
layer type=postgis name=cmeu01
field type=s name=cmcncd description=Country
wildcard=2
definition type=options
connectiontype=db sort=asc
dsn
encoding=UTF-8pgsql://postgres:[EMAIL PROTECTED]/gisdb/dsn
sqlSELECT DISTINCT cnty_id, name_en FROM countries
WHERE name_en IS NOT NULL ORDER BY name_en/sql
 
eventsonchange=resetSuggestCache();$('#pmsfld_CITY_NAME').val('')/e
vents
/definition
/field
field type=s name=cmsbname description=Name
wildcard=2
definition type=suggest
connectiontype=db sort=asc minlength=3 dependfld=cmcncd
dsn
encoding=UTF-8pgsql://postgres:[EMAIL PROTECTED]/gisdb/dsn
sqlSELECT DISTINCT cmsbname
FROM cmeu01 WHERE cmsbname ~* '^[search]' {and cmcncd =
'[dependfldval]'} ORDER BY cmsbname/sql
/definition
/field 
/layer
/searchitem

Andre van Atten  

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens
[EMAIL PROTECTED]
Verzonden: woensdag 16 januari 2008 15:13
Aan: pmapper-users@lists.sourceforge.net
Onderwerp: [pmapper-users] search.xml

Hi, i have installed MDB2 on PEAR so i haven't any more the
error: Warning:  Suggest::require_once(DB.php)
 [function.Suggest-require-once]: failed to open stream: No such file 
 or directory in

C:\ms4w\apps\pmapper\pmapper-3.2.beta4\incphp\query\suggest.php
 on line 126
but the search doesn't work; i'm working with
pmapper3.2beta4 and i'm using postgis, i'm trying to make a search
type=suggest/option, so in search.xml i wrote:
searchitem name=civici_pg description=civici pg
layer type=postgis name=civici
field type=s name=descvia description=via
 wildcard=2
  definition type=suggest connectiontype=db
sort=asc minlength=2 dependfld=descvia
  dsn
encoding=UTF-8pgsql://postgres:[EMAIL PROTECTED]/acam/dsn
  /definition
/field   
/layer
/searchitem

where:
user= postgres
host= localhost
db= acam

When I make the search it doesn't work and in the log
file(\ms4w\Apache\logs) there is not any information. 
 Anybody could help me??

 thanks all!!
 marco


-
This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml

2008-01-15 Thread marcozani...@geosweb.it
Hi, i'm working with pmapper3.2beta4 and i'm using postgis;
i have a problem to use search.xml with
type=suggest/option, i wrote in search.xml:

searchitem name=civici description=civici_pg
layer type=postgis name=civici
field type=s name=descvia description=via
 wildcard=2
  definition type=suggest connectiontype=db
sort=asc minlength=1 dependfld=descvia/
/field   
/layer
/searchitem

When i make the search i have this error:
Warning:  Suggest::require_once(DB.php)
[function.Suggest-require-once]: failed to open stream: No
such file or directory in
C:\ms4w\apps\pmapper\pmapper-3.2.beta4\incphp\query\suggest.php
on line 126
Anybody could help me??

thanks all!!
marco 

 

 

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml

2008-01-15 Thread Alessandro Pasotti
Il martedì 15 gennaio 2008, [EMAIL PROTECTED] ha scritto:
 Hi, i'm working with pmapper3.2beta4 and i'm using postgis;
 i have a problem to use search.xml with
 type=suggest/option, i wrote in search.xml:

 searchitem name=civici description=civici_pg
 layer type=postgis name=civici
 field type=s name=descvia description=via
  wildcard=2
   definition type=suggest connectiontype=db
 sort=asc minlength=1 dependfld=descvia/
 /field
 /layer
 /searchitem

 When i make the search i have this error:
 Warning:  Suggest::require_once(DB.php)
 [function.Suggest-require-once]: failed to open stream: No
 such file or directory in
 C:\ms4w\apps\pmapper\pmapper-3.2.beta4\incphp\query\suggest.php
 on line 126
 Anybody could help me??

 thanks all!!
 marco




This error seems not related to p.mapper. 

Please check your PEAR installation.

As the message says, DB.php was not found.

DB.php is part of PEAR DB abstraction layer.

HIH

-- 
Alessandro Pasotti
itOpen - Open Solutions for the Net Age
w3:  www.itopen.it
Linux User# 167502

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml????

2007-10-07 Thread Salvator*eL*arosa



Salvator*eL*arosa wrote:
 
 Hi at all, hi Armin,
 
 I am a problem, a big problem with search function!
 I'm unable to configuring file search.xml, when i use identify
 tool on the map it get me NO MATCH FOUND, why?
 
 My search.xml file:
 ?xml version='1.0'?
 !-- ?xml-stylesheet href=style.xsl type=text/xsl ? --
 
 searchlist version=1.0
 
 dataroot../../../data/shp/dataroot
 
 searchitem name=Comuni description=Comuni
 layer type=shape name=Comuni
 field type=s name=NOME description=Comune  wildcard=0
 /
 /layer
 /searchitem
 /searchlist 
 My data root is located in: C\ms4w\Apache\htdocs\data\shp
 and my shpfile is: Comuni.shp, Comuni.shx, Comuni.dbf
 
 Why i don't can look info?
 Can somebody hep me?
 
 Thanks!
 

it's possible to use the search function of the version 3.0 in 3.1 (stable)?

I don't know the way to using the search.xml.
-- 
View this message in context: 
http://www.nabble.com/search.xml-tf4581569.html#a13086674
Sent from the pmapper users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml????

2007-10-07 Thread Armin Burger

Salvator*eL*arosa wrote:
 
 it's possible to use the search function of the version 3.0 in 3.1 (stable)?

no


 I don't know the way to using the search.xml.

http://svn.pmapper.net/trac/wiki/UpgradeInfo#Attributesearch

armin

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml????

2007-10-06 Thread Salvator*eL*arosa

Hi at all, hi Armin,

I am a problem, a big problem with search function!
I'm unable to configuring file search.xml, when i use identify
tool on the map it get me NO MATCH FOUND, why?

My search.xml file:
?xml version='1.0'?
!-- ?xml-stylesheet href=style.xsl type=text/xsl ? --

searchlist version=1.0

dataroot../../../data/shp/dataroot

searchitem name=Comuni description=Comuni
layer type=shape name=Comuni
field type=s name=NOME description=Comune  wildcard=0
/
/layer
/searchitem
/searchlist 
My data root is located in: C\ms4w\Apache\htdocs\data\shp
and my shpfile is: Comuni.shp, Comuni.shx, Comuni.dbf

Why i don't can look info?
Can somebody hep me?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/search.xml-tf4581569.html#a13078608
Sent from the pmapper users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml????

2007-10-06 Thread Salvator*eL*arosa



Salvator*eL*arosa wrote:
 
 Hi at all, hi Armin,
 
 I am a problem, a big problem with search function!
 I'm unable to configuring file search.xml, when i use identify
 tool on the map it get me NO MATCH FOUND, why?
 ...
 
 

:-)))
Sorry!
I am not a problem!

am=have.

:-P
-- 
View this message in context: 
http://www.nabble.com/search.xml-tf4581569.html#a13078666
Sent from the pmapper users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Search.xml definition for a XY Layer

2007-09-07 Thread Armin Burger
Try to use
layer type=xy.../

armin

luis alfios wrote:
 Hi,
 
 I am loading a layer from a MS Access table, named tabla_ejemplo with a
 text field called nombre and the x and y fileds, using the following for
 this in the .map file:
METADATA
  DESCRIPTION layer XY
  RESULT_FIELDS nombre, direccion
  RESULT_HEADERS NAME, ADDRESS
  XYLAYER_PROPERTIES odbc://'':''/[EMAIL PROTECTED]
 ||tabla_ejemplo||x,y,0
END  # Metadata
 
 The layer is correctly displayed but I wanna to know how to define the
 attribute type of the search file for this layer, is the next code right?
 ,must the type field value be odbc?
 
 searchitem name=layerXY description=Capa XY
 layer type=odbc name=layerXY
 field type=s name=nombre description=Introduzca nombre:
 wildcard=0 /
 /layer
 /searchitem
 
 I get the next error in the pmapper error file when I try to search over the
 layer:
 
 [07-Sep-2007 14:48:13] = P.MAPPER: DB ERROR =
 Standard Message:   DB Error: syntax error
 DBMS/Debug Message: SELECT x, y, nombre FROM tabla_puntos  WHERE (
 [nombre] =~ /(D|d)/) [nativecode=37000 [Microsoft][Controlador ODBC
 Microsoft Access] Error de sintaxis en la expresión de consulta '(
 [[nombre]] =~ /(D|d)/)'.]
 
 
 Thanks
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now   http://get.splunk.com/
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users
 

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] Search.xml definition for a XY Layer

2007-09-07 Thread luis alfios
Hi,

I am loading a layer from a MS Access table, named tabla_ejemplo with a
text field called nombre and the x and y fileds, using the following for
this in the .map file:
   METADATA
 DESCRIPTION layer XY
 RESULT_FIELDS nombre, direccion
 RESULT_HEADERS NAME, ADDRESS
 XYLAYER_PROPERTIES odbc://'':''/[EMAIL PROTECTED]
||tabla_ejemplo||x,y,0
   END  # Metadata

The layer is correctly displayed but I wanna to know how to define the
attribute type of the search file for this layer, is the next code right?
,must the type field value be odbc?

searchitem name=layerXY description=Capa XY
layer type=odbc name=layerXY
field type=s name=nombre description=Introduzca nombre:
wildcard=0 /
/layer
/searchitem

I get the next error in the pmapper error file when I try to search over the
layer:

[07-Sep-2007 14:48:13] = P.MAPPER: DB ERROR =
Standard Message:   DB Error: syntax error
DBMS/Debug Message: SELECT x, y, nombre FROM tabla_puntos  WHERE (
[nombre] =~ /(D|d)/) [nativecode=37000 [Microsoft][Controlador ODBC
Microsoft Access] Error de sintaxis en la expresión de consulta '(
[[nombre]] =~ /(D|d)/)'.]


Thanks
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[pmapper-users] search.xml with php4

2007-06-06 Thread cristian78

hi ...

I have to make run the search with search.xml but with php4. I changed the
functions to load the xml file because simplexml_load doesn't work in php4.
And now i can load the xml file, and i have set to use this in the config
file, but the search doesn't show.

if somebody knows that it is what I can do. I am going to be very thankful
-- 
View this message in context: 
http://www.nabble.com/search.xml-with-php4-tf3880359.html#a10997037
Sent from the pmapper users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users