[ka-Map-users] Animated Maps - iboattrack.mapsherpa.com

Tim Schaub tim at commenspace.org
Fri Mar 24 12:05:06 EST 2006


> > Well, what if I want to animate the 
> > base data, by altering the mapfile Layer Filters and/ or Class 
> > Expressions on the fly (although this would have a variety of uses 
> > beyond that)?

Brandon -

Don't know if this gets at what you're looking for, but here's the
approach I have taken (see the "NOCACHE" option below).  I've added a
"TILE_SOURCE" metadata option for layers in the mapfile.  The possible
values for "TILE_SOURCE" are:

"AUTO"
If you don't specify anything, or if you specify "AUTO", then ka-map
behaves as it always has - tile.php is called from the client side and
if tiles exist in the cache, they are used.  If tiles don't exist, they
are generated by tile.php.

"CACHE"
If you have pre-rendered all your layers (groups) in your cache, you can
have the client side call those cached tiles directly (so tile.php
doesn't get called in this case).  This options requires that you
specify a web accessible path to your cache in config.php (see
congif.dist.php for an example).  This option is useful if you have very
static data (seldom updated on the server side).

"REDRAW"
If you specify "REDRAW" for the "TILE_SOURCE", then tile.php is called
and will re-render the requested tile (and metatile).  This option might
be useful if you have frequently updated data (many updates on the
client side).

"NOCACHE"
This option is similar to "REDRAW", but a script called tile_nocache.php
is called instead of tile.php.  One difference is that only the
requested tile is rendered (not the whole metatile).  Also, this tile is
sent directly to the browser without writing it to your cache (though it
is written to the temp directory specified by IMAGEPATH in your
mapfile).  The real benefit of this options is that it also allows for
variable substitution (as with mapserver cgi).  So, if you have data
that is defined by something that the client does (select options from a
form for example), you can create a query on the client side that will
be substituted for a variable in your mapfile (in the DATA, FILTER,
CONNECTION, or class EXPRESSION).

The first three options are available in CVS.  I have not committed the
fourth option, but would if it made sense to others.  If you've read
this far down, I'm hoping it makes sense.  It seems like a valuable
addition to me, but I think I've had trouble explaining the utility to
others.

I hope to have an example of these options that I can show around some
time soon.  After that, I'll create some documentation.

Let me know if you need any more detail,
Tim


> -----Original Message-----
> From: ka-map-users-bounces at lists.maptools.org 
> [mailto:ka-map-users-bounces at lists.maptools.org] On Behalf Of 
> Paul Spencer
> Sent: Friday, March 24, 2006 9:28 AM
> To: Brandon Plewe
> Cc: ka-map-users at lists.maptools.org
> Subject: Re: [ka-Map-users] Animated Maps - iboattrack.mapsherpa.com
> 
> Brandon,
> 
> Tim Schaub has been working on something similar I think.  He 
> is keen to be able to generate tiles using map file 
> substitution and avoiding the tile cache.  I think it is a 
> work in progress, but perhaps he can comment more on this.
> 
> Cheers
> 
> Paul
> 
> On 24-Mar-06, at 11:07 AM, Brandon Plewe wrote:
> 
> > This relates to a question I had earlier that never got a 
> response.  
> > On the site mentioned, I'm sure the points were created and managed 
> > within ka-map javascript, right?  Well, what if I want to 
> animate the 
> > base data, by altering the mapfile Layer Filters and/ or Class 
> > Expressions on the fly (although this would have a variety of uses 
> > beyond that)?  From what I've seen, nothing in ka-Map seems 
> to go back 
> > and alter the underlying mapserver; it only changes what happens to 
> > the maps after they're generated.  How hard would it be to 
> add such a 
> > functionality?  I could probably build & contribute it if someone 
> > could suggest an overall strategy.  The new function for 
> turning off 
> > the cache for specific layers will certainly help.
> >
> > Brandon
> >
> > _______________________________________________
> > ka-Map-users mailing list
> > ka-Map-users at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/ka-map-users
> 
> +-----------------------------------------------------------------+
> |Paul Spencer                           pspencer at dmsolutions.ca   |
> +-----------------------------------------------------------------+
> |Applications & Software Development                              |
> |DM Solutions Group Inc                 http://www.dmsolutions.ca/|
> +-----------------------------------------------------------------+
> 
> 
> 
> 
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 



More information about the ka-Map-users mailing list