After a little bit more consideration: Maybe the easier question is where would I insert custom queries into the existing structure if I wanted to call them?
-- Things are only difficult while you don't understand them. >From: "Gail Long" <codeburg at hotmail.com> >To: armin.burger at gmx.net >CC: pmapper-users at faunalia.it >Subject: Re: [Pmapper-users] Calling map.phtml >Date: Wed, 10 May 2006 12:38:25 -0700 > >Armin, > >Thank you for the quick response. Please forgive me but I don't entirely >understand what to do. > >I've cleared the resultlayers session variable and added the new values in >what I believe is the correct structure: > >array(1) { ["adapar"]=> array(31) { [991740]=> int(-1) [991511]=> >int(-1) >[991538]=> int(-1) [991549]=> int(-1) [991550]=> int(-1) [991554]=> >int(-1) [991564]=> int(-1) [991565]=> int(-1) [991571]=> int(-1) >[991573]=> int(-1) [991574]=> int(-1) [991577]=> int(-1) [991587]=> >int(-1) [991603]=> int(-1) [991617]=> int(-1) [991618]=> int(-1) >[991619]=> int(-1) [991622]=> int(-1) [991635]=> int(-1) [991639]=> >int(-1) [991640]=> int(-1) [991655]=> int(-1) [991656]=> int(-1) >[991657]=> int(-1) [991704]=> int(-1) [991706]=> int(-1) [991707]=> >int(-1) [991716]=> int(-1) [991735]=> int(-1) [991768]=> int(-1) >[991775]=> int(-1) } } > >These are the oids from the resultset and all are correct. The output >above >is a var_dump of $_SESSION['resultlayers']; > >I suppose what I need to know more specifically is do I use javascript to >contruct a call to map.phtml for the mapframe? And if so, what how would I >construct the url string for my results to call the highlighting functions? > >I don't understand how the entire query/highlight code chain works. Your >programming skills are definately above mine. I've tried a few variations >of the url strings that I've found in mapserver.js. > >Because I'm not using query,squery, or map.php to run a query perhaps I >would instantiate map.php and enter at a different point than from the url? > >-- >Things are only difficult while you don't understand them. > > > > > >From: Armin Burger <armin.burger at gmx.net> > >To: Gail Long <codeburg at hotmail.com> > >CC: pmapper-users at faunalia.it > >Subject: Re: [Pmapper-users] Calling map.phtml > >Date: Wed, 10 May 2006 20:43:17 +0200 > > > >you need to clear the session var $_SESSION["resultlayers"] and then >create > >it for your data in the required structure. You can also pass that via >the > >URL. 'resulttileindexes' are only needed for tileindex shapefiles (that I > >never use), otherwise this value can be -1 or 0 or so. Check the code for > >adding the resultindexes: > > > >pmap_checkResultLayers() > >pmap_addResultLayer($reslayer, $shpindexes) > > > >$shpindexes is the index retrieved from the query on the shapefiles. Or >for > >PostgIS is is the OID field. That is currently needed for pmapper, I will > >modify the code so that one can use an arbitrary field with unique >values, > >like specified in the map file "...USING UNIQUE..." for PostGIS layers. > > > >armin > > > > > > > >Gail Long wrote: > >>Hello all, > >> > >>I've written a query script that gets called from a form on the >resultwin > >>page. In the script I call postGIS with a query using the native php >pg_* > >>functions to get geometry and results. > >> > >>The query selects all of the features that intersect or are contained in >a > >>buffer around a feature I selected from the infowin page (info.phtml). > >> > >>I added the javascript for the zoom links and the zoom2extent js with >the > >>proper geometry to zoom to my results set or the individual features >All > >>that works. > >> > >>What I need is to be able to call map.phtml or understand what I need to > >>set to get map.phtml to clear the original highlighting and run the > >>highlighting code for my new results. > >> > >>There seems to be a lot happening when all of this stuff is run between > >>SESSION vars, hidden inputs, and javascript building the urls plus what > >>php is doing. > >> > >>I've tried to set the resulttileindexes session variable, all of the JS > >>variables that I've found by modeling the select, search, and identify > >>code paths. > >> > >>If its not a matter of calling map.phtml and inserting my query into > >>query.php or squery.php, some pointers to where that might best be done > >>would be helpful as well. > >> > >>Any assistance would be appreciated and would be a HUGE help. > >> > >>pmapper version 1.0.8 (printing modules somewhat modified) > >>mapserver 4.6 > >>mapscript from the 4.6 MS release > >>Slackware Linux 10.2 > >>using both IE and Firefox browsers > >>-- > >>Things are only difficult while you don't understand them. > >> > >> > >> > >>_______________________________________________ > >>Pmapper-users mailing list > >>Pmapper-users at faunalia.it > >>http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users > >> > >> > > > >_______________________________________________ >Pmapper-users mailing list >Pmapper-users at faunalia.it >http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users