[ka-Map-users] tiling order / priority?
Brent Pedersen
bpederse at gmail.com
Fri Nov 11 14:41:30 EST 2005
hi, this works. not pretty. find the comment in init.php and insert this
code. the last line that's changed is commented.
if you add: or oLayer->group == "" after MS_OFF, it will give priority to
__base__ layers as well.
-brent
/*
* for this version, I have chosen to use groups to turn layers on and off
* a special group called __base__ is created to hold all ungrouped layers
* This group cannot be turned on/off in the interface (or at least not
* using the default legend template
*/
$onLayers = array();
$offLayers = array();
for($i=0;$i<$oMap->numlayers;$i++){
$oLayer = $oMap->getLayer($i);
if($oLayer->status!=MS_OFF){ # add code here for __base__ layers
array_push($onLayers,$oLayer);
}else{
array_push($offLayers,$oLayer);
}
}
$allLayers=array_merge($onLayers,$offLayers);
##################ABOVE INSERTED ############
#############BELOW CHANGED############
$szLayers = '';
for($i=0; $i<$oMap->numlayers; $i++)
{
$oLayer = $allLayers[$i]; # this line is changed !!!!!!
if ($oLayer->group != '')
{
On 11/11/05, Charlton Purvis <cplist at earthlink.net> wrote:
>
> Hi, all:
>
> Let's say that I've got 5 groups that a user can toggle on/off.
>
> g1, g2, g3, g4, g5
>
> My question is: what is the order that Ka-Map starts hitting tile.php? If
> I have only g3 and g5 selected, I'd much rather have g3 and g5 start
> caching, but I suspect that it always goes in the order of the .map. So in
> this case it would cache g1 and g2 before showing anything other than the
> base layers to the user.
>
> Which translates into a user waiting for layers to cache that s/he might
> not
> be interested in viewing. It would be ideal to give them their selected
> layers as a higher priority.
>
> I hope that makes some sense!
>
> Charlton
>
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20051111/f559387e/attachment.html
More information about the ka-Map-users
mailing list