Re: [pmapper-users] search one layer

2014-07-23 Thread Bogumił Szady
Hello,
Thanks. I have tried to insert this modification.
I see my layer defined, but without white box on the right to put the 
search attribute.
Where is the the problem?

best

Bogumił


W dniu 2014-07-22 23:11, Armin Burger pisze:
 not a very elegant solution, but should work:

 add the following block at the end of your
  /config/[your-config]/custom.js
 file

 $.extend(PM.Query,
 {
   createSearchItems: function(url) {
   $.ajax({
   url: url,
   dataType: json,
   success: function(response){
   var searchJson = response.searchJson;
   var action = response.action;

   //---
   delete searchJson.options[0];
   //---

   if (action == 'searchitem') {
   PM.Query.createSearchInput(searchJson);
   } else {
   var searchHtml = PM.Query.json2Select(searchJson, 0);
   $('#searchoptions').html(searchHtml);
   }
   },
   error: function (XMLHttpRequest, textStatus, errorThrown) {
   if (window.console) console.log(errorThrown);
   }
   });
   }

 });




 or use

   //---
   if (Object.keys(searchJson.options).length  3) {
   delete searchJson.options[0];
   }
   //---

 to do this just in case the search has just 1 layer defined for search,
 in case you once will add another one you don't remember what you once
 modified...


 On 07/22/2014 07:25 PM, Bogumił Szady wrote:
 Hello,
 Is it possible to get one default search field turned on in the moment
 of starting of application window?
 I have only one layer to search and I would like to avoid every time
 selecting layer to search.


 all the best

 Bogumił

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] pmapper4: new plugins and options

2014-07-23 Thread Thomas RAFFIN
Hi,

Le 22/07/2014 18:51, jose mvm a écrit :
 Hi Thomas,

 after update the pmapper code, i found some questions and difficulties:

 - when pmapper start up php notice apeears (repeatedly):
 [22-Jul-2014 16:06:49 UTC] PHP Notice:  Undefined variable: dynamicClasses
 in /var/www/pmapper-4.3.2/incphp/layerview.php on line 218

 but no problem...

Just a small notice, no pb. It will be solved solved in a future revision.


 - when i make a search the table of results appears closed by default... (no
 probem too)

 but my main problem, possibly, is that I don't understand the philosophy,
 the goal, the mechanism and operation of the clientDynamicLayers. i don't
 understand the examples contained in plugin.

This is not a plugin, but a part of code shared by few others plugins: 
drawing, measure2, exportPoints, SelectionManagement, ... Its goal is to 
add dynamic data from your browser to server part of pmapper.

If you have development skills the code in example is to add in your js 
console (Firebug in Firefox for instance). Be careful to the coordinates 
in the examples: they have have to fit with your map. And you have to 
add the template-part.map to your real template.map (I've just commited 
a small correction for MapServer = 6: 
http://svn.pmapper.net/trac/changeset/1352 )



 and without this dependence plugin, the selectionManagement plugin doesn't
 work correctly. i can't save selections.


Yes it is a dependency: you can't use selectionManagement without 
clientDynamicLayers.


 Thanks in advence
 Best regards
Thomas




--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] pmapper4: new plugins and options

2014-07-23 Thread Thomas RAFFIN
In the slectionManagement README.TXT, there is :

  Dependancies:
  - plugins/common/selectTools.inc.php
  - plugins/clientDynamicLayers/*

Have you got those files i?n your pmapper? Are they up-to-date?

Le 22/07/2014 21:53, jose mvm a écrit :
 ok, my php errors level is on the maximum for to help me to understand and
 report the problems.
 but i have a fatal error when i try to save the selections as i showed:

 [22-Jul-2014 16:40:46 UTC] PHP Fatal error:  Call to undefined function
 getLayersByGroupOrLayerName() in
 /var/www/pmapper-4.3.2/plugins/clientdynamiclayers/clientDynamicLayers.php
 on line 461

 and basicaly i can't get intersections (and i have no php errors about it).

 Thank you very much Armin Burger
 Congratulations for your great work!!!



 --
 View this message in context: 
 http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-pmapper4-new-plugins-and-options-tp4025551p4025559.html
 Sent from the pmapper-users -- p.mapper users mailing list mailing list 
 archive at Nabble.com.

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 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

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] pmapper4: new plugins and options

2014-07-23 Thread jose mvm
good morning Thomas and Armin - the sun rises earlier in France!

ok, the small php notice disappears with new revision of layerview.php.

thanks for your explain about clientdynamiclayers plugin - yes i have my
code all updated.

really, i can do intersections using a buffer! - but not with selections
from the searchtool or queryeditor.

save selections do not work with my installation yet - and I think this
plugin is very interesting too.

Thanks



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-pmapper4-new-plugins-and-options-tp4025551p4025566.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] pmapper4: new plugins and options

2014-07-23 Thread Thomas RAFFIN

Le 23/07/2014 10:37, jose mvm a écrit :
 good morning Thomas and Armin - the sun rises earlier in France!

 ok, the small php notice disappears with new revision of layerview.php.

 thanks for your explain about clientdynamiclayers plugin - yes i have my
 code all updated.

 really, i can do intersections using a buffer! - but not with selections
 from the searchtool or queryeditor.

The operators for selections only considers objects and their ids, not 
their geometry. So you have to compare things about the same layers:
- your current selection contains countries (and others layers objects, 
why not: towns, ...)
- your will make a new attribute search on countries (by name for instance)
- with the operator intersection
- the result will be : the towns from your search that were in your 
previous selection.



 save selections do not work with my installation yet - and I think this
 plugin is very interesting too.

Really? Have you try with a clean pmapper install and demo date? What 
type are your layers (SHP, postgis, ...) ?


 Thanks



 --
 View this message in context: 
 http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-pmapper4-new-plugins-and-options-tp4025551p4025566.html
 Sent from the pmapper-users -- p.mapper users mailing list mailing list 
 archive at Nabble.com.

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 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

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] pmapper4: new plugins and options

2014-07-23 Thread jose mvm
i'm sorry

i don't really understand the operator for selections in case of the
intersection... i need a simple demonstration...

i tried to save selections with a clean pmapper install and demo date (ms4w)
but doesn't work too. I can not see the error, but I suppose it is the same:

[23-Jul-2014 10:34:54 UTC] PHP Fatal error:  Call to undefined function
getLayersByGroupOrLayerName() in
/var/www/pmapper-4.3.2/plugins/clientdynamiclayers/clientDynamicLayers.php
on line 461

my layers are postgis type.

Thanks a lot again



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-pmapper4-new-plugins-and-options-tp4025551p4025568.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search one layer

2014-07-23 Thread Armin Burger
Ok, the change event is not applied if no change happens... Try the 
following for the custom.js which should also improve the labels and 
logic in this case:

$.extend(PM.Query,
{
 createSearchItems: function(url) {
 $.ajax({
 url: url,
 dataType: json,
 success: function(response){
 var searchJson = response.searchJson;
 var action = response.action;

 if (action == 'searchitem') {
 PM.Query.createSearchInput(searchJson);
 } else {
 delete searchJson.options[0];
 var searchHtml = PM.Query.json2Select(searchJson, 0);
 $('#searchoptions').html(searchHtml);
 PM.Query.setSearchInput();
 $('#searchoptions').html(_p(Search 
for)).css({white-space: nowrap});
 }
 },
 error: function (XMLHttpRequest, textStatus, errorThrown) {
 if (window.console) console.log(errorThrown);
 }
 });
 }

});


On 07/23/2014 08:58 AM, Bogumił Szady wrote:
 Hello,
 Thanks. I have tried to insert this modification.
 I see my layer defined, but without white box on the right to put the
 search attribute.
 Where is the the problem?

 best

 Bogumił


 W dniu 2014-07-22 23:11, Armin Burger pisze:
 not a very elegant solution, but should work:

 add the following block at the end of your
   /config/[your-config]/custom.js
 file

 $.extend(PM.Query,
 {
createSearchItems: function(url) {
$.ajax({
url: url,
dataType: json,
success: function(response){
var searchJson = response.searchJson;
var action = response.action;

//---
delete searchJson.options[0];
//---

if (action == 'searchitem') {
PM.Query.createSearchInput(searchJson);
} else {
var searchHtml = PM.Query.json2Select(searchJson, 
 0);
$('#searchoptions').html(searchHtml);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
if (window.console) console.log(errorThrown);
}
});
}

 });




 or use

//---
if (Object.keys(searchJson.options).length  3) {
delete searchJson.options[0];
}
//---

 to do this just in case the search has just 1 layer defined for search,
 in case you once will add another one you don't remember what you once
 modified...


 On 07/22/2014 07:25 PM, Bogumił Szady wrote:
 Hello,
 Is it possible to get one default search field turned on in the moment
 of starting of application window?
 I have only one layer to search and I would like to avoid every time
 selecting layer to search.


 all the best

 Bogumił

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users


--
Want fast and easy access to all the code in your enterprise? Index and
search up 

Re: [pmapper-users] search one layer

2014-07-23 Thread Bogumił Szady
I have tried and it doesn't work.
Like before I have normal search for label and then I have to select 
my one layer to search.
:(

Bogumił


W dniu 2014-07-23 20:38, Armin Burger pisze:
 Ok, the change event is not applied if no change happens... Try the
 following for the custom.js which should also improve the labels and
 logic in this case:

 $.extend(PM.Query,
 {
   createSearchItems: function(url) {
   $.ajax({
   url: url,
   dataType: json,
   success: function(response){
   var searchJson = response.searchJson;
   var action = response.action;

   if (action == 'searchitem') {
   PM.Query.createSearchInput(searchJson);
   } else {
   delete searchJson.options[0];
   var searchHtml = PM.Query.json2Select(searchJson, 0);
   $('#searchoptions').html(searchHtml);
   PM.Query.setSearchInput();
   $('#searchoptions').html(_p(Search
 for)).css({white-space: nowrap});
   }
   },
   error: function (XMLHttpRequest, textStatus, errorThrown) {
   if (window.console) console.log(errorThrown);
   }
   });
   }

 });


 On 07/23/2014 08:58 AM, Bogumił Szady wrote:
 Hello,
 Thanks. I have tried to insert this modification.
 I see my layer defined, but without white box on the right to put the
 search attribute.
 Where is the the problem?

 best

 Bogumił


 W dniu 2014-07-22 23:11, Armin Burger pisze:
 not a very elegant solution, but should work:

 add the following block at the end of your
/config/[your-config]/custom.js
 file

 $.extend(PM.Query,
 {
 createSearchItems: function(url) {
 $.ajax({
 url: url,
 dataType: json,
 success: function(response){
 var searchJson = response.searchJson;
 var action = response.action;

 //---
 delete searchJson.options[0];
 //---

 if (action == 'searchitem') {
 PM.Query.createSearchInput(searchJson);
 } else {
 var searchHtml = PM.Query.json2Select(searchJson, 
 0);
 $('#searchoptions').html(searchHtml);
 }
 },
 error: function (XMLHttpRequest, textStatus, errorThrown) {
 if (window.console) console.log(errorThrown);
 }
 });
 }

 });




 or use

 //---
 if (Object.keys(searchJson.options).length  3) {
 delete searchJson.options[0];
 }
 //---

 to do this just in case the search has just 1 layer defined for search,
 in case you once will add another one you don't remember what you once
 modified...


 On 07/22/2014 07:25 PM, Bogumił Szady wrote:
 Hello,
 Is it possible to get one default search field turned on in the moment
 of starting of application window?
 I have only one layer to search and I would like to avoid every time
 selecting layer to search.


 all the best

 Bogumił

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users
 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing 

Re: [pmapper-users] search one layer

2014-07-23 Thread Bogumił Szady
I suppose some error in brackets (syntax error).
I am trying to find...

Bogumil

W dniu 2014-07-23 20:38, Armin Burger pisze:
 Ok, the change event is not applied if no change happens... Try the
 following for the custom.js which should also improve the labels and
 logic in this case:

 $.extend(PM.Query,
 {
   createSearchItems: function(url) {
   $.ajax({
   url: url,
   dataType: json,
   success: function(response){
   var searchJson = response.searchJson;
   var action = response.action;

   if (action == 'searchitem') {
   PM.Query.createSearchInput(searchJson);
   } else {
   delete searchJson.options[0];
   var searchHtml = PM.Query.json2Select(searchJson, 0);
   $('#searchoptions').html(searchHtml);
   PM.Query.setSearchInput();
   $('#searchoptions').html(_p(Search
 for)).css({white-space: nowrap});
   }
   },
   error: function (XMLHttpRequest, textStatus, errorThrown) {
   if (window.console) console.log(errorThrown);
   }
   });
   }

 });


 On 07/23/2014 08:58 AM, Bogumił Szady wrote:
 Hello,
 Thanks. I have tried to insert this modification.
 I see my layer defined, but without white box on the right to put the
 search attribute.
 Where is the the problem?

 best

 Bogumił


 W dniu 2014-07-22 23:11, Armin Burger pisze:
 not a very elegant solution, but should work:

 add the following block at the end of your
/config/[your-config]/custom.js
 file

 $.extend(PM.Query,
 {
 createSearchItems: function(url) {
 $.ajax({
 url: url,
 dataType: json,
 success: function(response){
 var searchJson = response.searchJson;
 var action = response.action;

 //---
 delete searchJson.options[0];
 //---

 if (action == 'searchitem') {
 PM.Query.createSearchInput(searchJson);
 } else {
 var searchHtml = PM.Query.json2Select(searchJson, 
 0);
 $('#searchoptions').html(searchHtml);
 }
 },
 error: function (XMLHttpRequest, textStatus, errorThrown) {
 if (window.console) console.log(errorThrown);
 }
 });
 }

 });




 or use

 //---
 if (Object.keys(searchJson.options).length  3) {
 delete searchJson.options[0];
 }
 //---

 to do this just in case the search has just 1 layer defined for search,
 in case you once will add another one you don't remember what you once
 modified...


 On 07/22/2014 07:25 PM, Bogumił Szady wrote:
 Hello,
 Is it possible to get one default search field turned on in the moment
 of starting of application window?
 I have only one layer to search and I would like to avoid every time
 selecting layer to search.


 all the best

 Bogumił

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users

 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pmapper-users
 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 pmapper-users mailing list
 pmapper-users@lists.sourceforge.net
 

Re: [pmapper-users] search one layer

2014-07-23 Thread Bogumił Szady
It works
Thanks a lot!

Bogumił
W dniu 2014-07-23 20:38, Armin Burger pisze:
 $.extend(PM.Query,
 {
   createSearchItems: function(url) {
   $.ajax({
   url: url,
   dataType: json,
   success: function(response){
   var searchJson = response.searchJson;
   var action = response.action;

   if (action == 'searchitem') {
   PM.Query.createSearchInput(searchJson);
   } else {
   delete searchJson.options[0];
   var searchHtml = PM.Query.json2Select(searchJson, 0);
   $('#searchoptions').html(searchHtml);
   PM.Query.setSearchInput();
   $('#searchoptions').html(_p(Search
 for)).css({white-space: nowrap});
   }
   },
   error: function (XMLHttpRequest, textStatus, errorThrown) {
   if (window.console) console.log(errorThrown);
   }
   });
   }

 });

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users