Re: [pmapper-users] dynamic legend, forcing refresh on pmapper 2.1.1
Brought to you by:
arminburger
From: Keith B. <kbo...@gm...> - 2006-12-04 18:39:28
|
Hi Armin, I had read through that thread on the list, and am in the same spot Stephan got to with defGroupList not defined, and as I looked at resolving my issue, it seemed I was essentially going through the steps of completely reloading the map. That's when I got discouraged and thought I'd check with the list..I was hoping someone on the list had gotten all the way through to a solution they were happy with. Of course it's my problem, and I have to solve it, I was just hoping someone might have a flash of insight :) My understanding of the legend code is rather muddled. thank for the pointer though, -Keith On 12/4/06, Armin Burger <arm...@gm...> wrote: > Keith > > try to use as a starting point this topic from the mailing list: > > http://www.mail-archive.com/pma...@li.../msg00494.html > > There is an attached PHP script for adding layers dynamically and the > explanations for it is in a mail later in that posting. They are > hopefully possible to understand. > > armin > > Keith Boyle wrote: > > Sorry for my delayed response, and as always thank you for the reply. > > I should have been more complete in describing what I'm up to, dynamic > > legends is too vague. Please forgive me if the following is too > > detailed: > > > > I'm implementing user created layers in postgres/postgis, allowing the > > user to create certain combinations of existing layers > > (intersections), distance envelopes (buffers) around selected classes > > of selected layers, and even uploading some basic data to create new > > points/shapes. > > > > I've set up two tables for describing layers, a 'layers' table and a > > 'classes' table that are read after the map file is read. Then through > > php/mapscript I'm adding the layers to the map created by the map > > file. > > > > All this I'm making progress on, but getting the legend to show the > > new layers I've added via mapscript is really eluding me. For now, I'm > > reloading the entire map.phtml page after the user creates a new > > layer. This works but seems very 'heavy handed' and not very elegant. > > If there is a better way, I'd love to go that path instead. > > > > Please let me know if you have any suggestions or pointers, I've dug > > through the code base but haven't found a solution to my issue that > > behaves well... > > > > again, as always, many thanks Armin for a great baseline from which to > > build! > > -Keith > > > > > > On 12/1/06, Armin Burger <arm...@gm...> wrote: > >> what do you mean exactly with 'dynamic legends'? > >> > >> In the current implementation you have the possibility to combine both > >> TOC and legend, typically in a foldable tree structure. Then the > >> legend icons are never updated. Or you swap between TOC and legedn > >> view, then the legend just shows the icons of the visible layers. > >> > >> *Real* dynamic legends with displaying only the icons of visible > >> classes on the current map extent are something I would like to have > >> but this would require a base function available via Mapscript. > >> > >> armin > > > |