Thread: [pmapper-users] points of interest and PEAR
Brought to you by:
arminburger
From: Tiziano <tiz...@da...> - 2006-11-14 13:30:00
|
Hello everybody, i was trying to understand if the pmapper is suitable for my work. One of the most important feature i have to implements is the possibility to add/modify/remove points on the map. The POI feature could be a good starting point, considering that i'll need to add a set of attribute to each point. The things that i haven't understand is where on the code the POI are read from the DB (it is a postgresql, right?) and put in the session. After that, i started from the versione 2.0.0 in the ms4w packed edition and i tried to use, as it is written, the already installed PEAR framework But it doesn't work. If i follow the PEAR definitions: require_once ("DB.php"); require_once ("query/query.php"); they doesn't work because they don't find the path. But i supposed that the customlayer.php was using data taken from the DB via PEAR framework. So, what it's not working? Finally, i was trying to update the file from version 2.0.0 to the new 3.0.0-beta1 but the different configurations of the directory are not recognized from the old version and i've not a _project definition, so i have big problem in converting my project. Thanks in advance for the answer Tiziano Mischi |
From: Armin B. <arm...@gm...> - 2006-11-14 14:59:37
|
> Hello everybody, i was trying to understand if the pmapper is suitable for > my work. One of the most important feature i have to implements is the > possibility to add/modify/remove points on the map. The POI feature could > be > a good starting point, considering that i'll need to add a set of > attribute > to each point. The things that i haven't understand is where on the code > the > POI are read from the DB (it is a postgresql, right?) and put in the > session. the POI is just a simple solution to add a few points to the current map. It's stored in the session, but can also be added via the URL. If you click on the link 'Link to current map' you get the URL with the points. It was mainly intended to give somebody a URL that includes a point on the map, saying 'Here am I', nothing more... Look in the mail archive, there was once some discussion about editing points (add to DB). I posted some script samples for that. > > After that, i started from the versione 2.0.0 in the ms4w packed edition > and > i tried to use, as it is written, the already installed PEAR framework But > it doesn't work. If i follow the PEAR definitions: > > require_once ("DB.php"); > require_once ("query/query.php"); the path should be in the php.ini. it's written there when PEAR is installed, I guess. > > they doesn't work because they don't find the path. But i supposed that > the > customlayer.php was using data taken from the DB via PEAR framework. So, > what it's not working? > > Finally, i was trying to update the file from version 2.0.0 to the new > 3.0.0-beta1 but the different configurations of the directory are not > recognized from the old version and i've not a _project definition, so i > have big problem in converting my project. this depends mainly how much you customized. There are some new settings in config.ini since version 2.1 that needed to be adjusted. armin -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer |
From: Tiziano <tiz...@da...> - 2006-11-16 14:21:55
|
First of all thanks for your reply :) > Look in the mail archive, there was once some discussion about editing points (add to DB). I posted some script samples for that. You mean the one who uses XY layers? For my project i need a more flexible solutions and i cannot write the query in the map file. Otherwise i haven't found it... could you please give me a suggestion of keyword to search to find it? >> After that, i started from the versione 2.0.0 in the ms4w packed edition >> and >> i tried to use, as it is written, the already installed PEAR framework But >> it doesn't work. If i follow the PEAR definitions: >> >> require_once ("DB.php"); >> require_once ("query/query.php"); > > the path should be in the php.ini. it's written there when PEAR is installed, I guess. the path is this include_path= ".;\ms4w\Apache\php\PEAR" and in this there isn't the query.php file I should copy the query folder under pmapper/incphp/query? In this case the installation of the PEAR framework miss this step. > this depends mainly how much you customized. There are some new settings in config.ini since version 2.1 that needed to be adjusted. Yes, indeed i tried to customize the 2.1 version without success. There is a list of things that need to be configured? Tiziano Mischi |
From: Armin B. <arm...@gm...> - 2006-11-16 15:17:26
|
> First of all thanks for your reply :) > > > Look in the mail archive, there was once some discussion about editing > points (add to DB). I posted some script samples for that. > > You mean the one who uses XY layers? For my project i need a more flexible > solutions and i cannot write the query in the map file. Otherwise i > haven't > found it... could you please give me a suggestion of keyword to search to > find it? > no, an example that adds points to a Postgis table (would be similar, however, for XY layers). Maybe the ones on this list who successfully used it could reply to that and give it to you if you cannot find it in the archives. I'll look if I find back an old zip lying around somewhere. > >> After that, i started from the versione 2.0.0 in the ms4w packed > edition > >> and > >> i tried to use, as it is written, the already installed PEAR framework > But > >> it doesn't work. If i follow the PEAR definitions: > >> > >> require_once ("DB.php"); > >> require_once ("query/query.php"); > > > > the path should be in the php.ini. it's written there when PEAR is > installed, I guess. > > the path is this > include_path= ".;\ms4w\Apache\php\PEAR" > > and in this there isn't the query.php file > I should copy the query folder under pmapper/incphp/query? In this case > the > installation of the PEAR framework miss this step. > No, you need a correct installation of PEAR and just pmapper normally installed. I'm wondering what special things the MS4W does or requires that it's so difficult to use p.mapper with it. > > > this depends mainly how much you customized. There are some new settings > in config.ini since version 2.1 that needed to be adjusted. > > Yes, indeed i tried to customize the 2.1 version without success. There is > a > list of things that need to be configured? maybe you could try start with newer versions as they are and adapt the basic config settings. With 'customized' I just mean modifications of the code, not the config setings. armin -- "Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht! |
From: Tiziano <tiz...@da...> - 2006-11-17 15:59:15
|
I would like to notice a problem that happens with firefox: when the map is loaded from the first time, the settings of defGroups in config.ini are just ignored. Depending of what you've set as default, when the map is loaded you see all the layer active or not active, indipendently of what you've set in defGroups. It's enough to change the visualization of layers clicking in the toc once to solve the problem. Using explorer this error doesn't happen. This error happens since version 2.0.0 (now i'm using the 3.0.0) After that i've made a code patch which solve the problem of the toolbar that is not entirely visible when the window is too small, just adding a scroll bar and modifing the size of the div where the toolbar is in. Would you like that i send this code to you? Finally, i've made a customization of the application for my project and i added some javascript and php code almost everywhere (some ajax functions, some buttons ... ) so my code is mixed whitin the code of pmapper itself. The problem is that when i upgrade files of pmapper sometimes i can lose my changes. It would be a good thing, for the future, if all this code, js and php, was contained in a separate folder loaded in addition to the files of pmapper. Tiziano Mischi |
From: Armin B. <arm...@gm...> - 2006-11-17 16:37:49
|
> I would like to notice a problem that happens with firefox: when the map > is > loaded from the first time, the settings of defGroups in config.ini are > just > ignored. Depending of what you've set as default, when the map is loaded > you > see all the layer active or not active, indipendently of what you've set > in > defGroups. It's enough to change the visualization of layers clicking in > the > toc once to solve the problem. Using explorer this error doesn't happen. > This error happens since version 2.0.0 (now i'm using the 3.0.0) > do you by chance have a comma after the last entry for defGroups? Otherwise I've never saw that error. > After that i've made a code patch which solve the problem of the toolbar > that is not entirely visible when the window is too small, just adding a > scroll bar and modifing the size of the div where the toolbar is in. Would > you like that i send this code to you? > yes, send it to me. I don't fully understand what it does, but then I will see. I typically try to reduce tools, also for the latest I took by default smaller buttons. A DHTML menu where one can put things not directly related to the navigation (like download, print) would also save some space. And in pmapper 3 one can finally use easily horizontal toolbars again. > Finally, i've made a customization of the application for my project and i > added some javascript and php code almost everywhere (some ajax functions, > some buttons ... ) so my code is mixed whitin the code of pmapper itself. > The problem is that when i upgrade files of pmapper sometimes i can lose > my > changes. It would be a good thing, for the future, if all this code, js > and > php, was contained in a separate folder loaded in addition to the files of > pmapper. You could then just put that into a separate folder... it's just a problem if the modifications are done on the p.mapper core files. armin > -- "Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht! |
From: Tiziano <tiz...@da...> - 2006-11-20 13:35:38
|
> > I would like to notice a problem that happens with firefox: when the map > > is > > loaded from the first time, the settings of defGroups in config.ini are > > just > > ignored. Depending of what you've set as default, when the map is loaded > > you > > see all the layer active or not active, indipendently of what you've set > > in > > defGroups. It's enough to change the visualization of layers clicking in > > the > > toc once to solve the problem. Using explorer this error doesn't happen. > > This error happens since version 2.0.0 (now i'm using the 3.0.0) > > > > do you by chance have a comma after the last entry for defGroups? Otherwise I've never saw that error. No, it isn't. It's strange that you've never seen this problem before, because it doesn't happen to me only, but to my collegue also. Anyway i will investigate further... > yes, send it to me. I don't fully understand what it does, but then I will see. I typically try to reduce tools, also for the latest I took by default smaller buttons. A DHTML menu where one can put things not directly related to the navigation (like download, print) would also save some space. And in pmapper 3 one can finally use easily horizontal toolbars again. Well, the code is pretty simple indeed. It set the "overflow" value to "auto" for the toolbar div and just resize first the y dimension of all the div, then check if the toolbar is visible or not and, according to this, i resize the toolbar width and all the others widths. Alternatively i found a nice javascript library which adds nice scrollbars to a div. I could try to integrate that one. And about horizontal toolbars, how can i choose to use it? In the config.ini there isn't no more the "toolBarOrientation" property that was present in the 2.0 version, you don't check for this variable in the startup_config but i think it's still this variable that controls the toolBarOrientation... > > > > Finally, i've made a customization of the application for my project and i > > added some javascript and php code almost everywhere (some ajax functions, > > some buttons ... ) so my code is mixed whitin the code of pmapper itself. > > The problem is that when i upgrade files of pmapper sometimes i can lose > > my > > changes. It would be a good thing, for the future, if all this code, js > > and > > php, was contained in a separate folder loaded in addition to the files of > > pmapper. > > You could then just put that into a separate folder... it's just a problem if the modifications are done on the p.mapper core files. > > armin yes you're right, but if i want to add a button to the toolbar which makes some actions on the map, for example, there is no way to do it without adding an "else if" in the domouseclick method, and this is in the p.mapper core. If i have to insert a button whithout modifing the core, i have to rewrite all the functions that interacts with the button and the map itself, and this is not a useful thing i think. And after that how can i add a file .js with my own functions in the project without modifing the map.phtml where there is the list of include? Tiziano Mischi |
From: Tiziano <tiz...@da...> - 2006-11-20 17:01:08
|
>And after that how can i add a file > .js with my own functions in the project without modifing the map.phtml > where there is the list of include? > > Tiziano Mischi I answer to myself on this point: it's enough to put the file .js in the javascript folder and it's automatically imported. This feature has not been reported to the manual, so i had to look at the code :) |
From: Armin B. <arm...@gm...> - 2006-11-20 17:59:39
|
Tiziano wrote: >> And after that how can i add a file >> .js with my own functions in the project without modifing the map.phtml >> where there is the list of include? >> >> Tiziano Mischi > > I answer to myself on this point: it's enough to put the file .js in the > javascript folder and it's automatically imported. This feature has not been > reported to the manual, so i had to look at the code :) > so now that you know it you can add it to the manual ;-) armin |
From: Tiziano <tiz...@da...> - 2006-11-21 14:51:32
|
> Tiziano wrote: > >> And after that how can i add a file > >> .js with my own functions in the project without modifing the map.phtml > >> where there is the list of include? > >> > >> Tiziano Mischi > > > > I answer to myself on this point: it's enough to put the file .js in the > > javascript folder and it's automatically imported. This feature has not been > > reported to the manual, so i had to look at the code :) > > > > so now that you know it you can add it to the manual ;-) > > armin > i would like to.... but how? The user and password i use for the mailing list doesn't work.... Tiziano |
From: Armin B. <arm...@gm...> - 2006-11-21 18:20:25
|
you have to create an account for the wiki... -> Login -> Register armin Tiziano wrote: >> Tiziano wrote: >>>> And after that how can i add a file >>>> .js with my own functions in the project without modifing the map.phtml >>>> where there is the list of include? >>>> >>>> Tiziano Mischi >>> I answer to myself on this point: it's enough to put the file .js in the >>> javascript folder and it's automatically imported. This feature has not > been >>> reported to the manual, so i had to look at the code :) >>> >> so now that you know it you can add it to the manual ;-) >> >> armin >> > > i would like to.... but how? The user and password i use for the mailing > list doesn't work.... > > Tiziano > |