[Chameleon] Dynamic Maps

Jason C. Leach jason.leach at gmail.com
Tue Nov 22 17:35:26 EST 2005


Hi Paul:

Thanks for the reply.  It seems to work for the most part:  I added
some code where you suggested to add a layer.  The layer appears in
the legend, complete with symbol and colour.  But, the layer does not
actually draw on the map.  Any ideas?

PS: It's a POSTGIS point layer.

J.

On 11/16/05, Paul Spencer <pspencer at dmsolutions.ca> wrote:
> Jason,
>
> this is quite easy to do with Chameleon if you have some mapscript
> knowledge without actually modifying Chameleon itself.  You can do
> quite a bit in the index.phtml file between CWCInitialize and
> CWCExecute.
>
> For instance, if you have some way of determining a user when the
> page is first hit, you can access the mapscript map object ($oApp-
>  >moMapSession->oMap) and create layers on the fly, or change the
> properties of a layer.
>
> Cheers
>
> Paul
>
> On 16-Nov-05, at 12:29 PM, Jason C. Leach wrote:
>
> > Hi All:
> >
> > After seeing a post about VirtualSpatialData I thought it would be a
> > good time to ask about dynamic maps.  What I hope to do is, have
> > several static layers, but also give a user the ability to, based on a
> > query, construct a layer (series of polygons).
> >
> > What I was thinking I should do is:
> >
> > 1. Based on the HTML form, have the database create a View based on
> > the spatial tables in the DB.  This will be based on a
> > SELECT....WHERE....  I'll probably base the table name on the session
> > ID.
> >
> > 2. Have the part of Chameleon that creates the temporary MAP file
> > inject a layer entry.  It will do this based on the session ID, or a
> > query of an accounting table to see what extra layers should be added
> > for the user.
> >
> > Comments?  If this is a more complicated, or not the best way do to
> > this I'd be interested to hear more.  One of the reasons for this
> > aproach is, I will be able to have several users each have different
> > dynamic layers because
> >
> > Thanks,
> > Jason.
> >
> >
> > --
> > ........................................
> > .... Jason C. Leach
> > .... PGP Key: 0x62DDDF75
> > .... Keyserver: gpg.mit.edu
> >
> > _______________________________________________
> > Chameleon mailing list
> > Chameleon at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/chameleon
>
> +-----------------------------------------------------------------+
> |Paul Spencer                           pspencer at dmsolutions.ca   |
> +-----------------------------------------------------------------+
> |Applications & Software Development                              |
> |DM Solutions Group Inc                 http://www.dmsolutions.ca/|
> +-----------------------------------------------------------------+
>
>
>
>
>


--
........................................
.... Jason C. Leach
.... PGP Key: 0x62DDDF75
.... Keyserver: gpg.mit.edu



More information about the Chameleon mailing list