hi, this works. not pretty. find the comment in init.php and insert this code. the last line that's changed is commented.<br>
if you add: or oLayer->group == "" after MS_OFF, it will give priority to __base__ layers as well. <br>
<br>
-brent<br>
<br>
/* <br>
* for this version, I have chosen to use groups to turn layers on and off<br>
* a special group called __base__ is created to hold all ungrouped layers<br>
* This group cannot be turned on/off in the interface (or at least not<br>
* using the default legend template<br>
*/<br>
$onLayers = array();<br>
$offLayers = array();<br>
for($i=0;$i<$oMap->numlayers;$i++){<br>
$oLayer = $oMap->getLayer($i);<br>
if($oLayer->status!=MS_OFF){ # add code here for __base__ layers<br>
array_push($onLayers,$oLayer);<br>
}else{<br>
array_push($offLayers,$oLayer);<br>
}<br>
}<br>
$allLayers=array_merge($onLayers,$offLayers);<br>
<br>
##################ABOVE INSERTED ############<br>
#############BELOW CHANGED############<br>
$szLayers = '';<br>
for($i=0; $i<$oMap->numlayers; $i++)<br>
{<br>
$oLayer = $allLayers[$i]; # this line is changed !!!!!!<br>
if ($oLayer->group != '')<br>
{<br>
<br><br><div><span class="gmail_quote">On 11/11/05, <b class="gmail_sendername">Charlton Purvis</b> <<a href="mailto:cplist@earthlink.net">cplist@earthlink.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, all:<br><br>Let's say that I've got 5 groups that a user can toggle on/off.<br><br>g1, g2, g3, g4, g5<br><br>My question is: what is the order that Ka-Map starts hitting tile.php? If<br>I have only g3 and g5 selected, I'd much rather have g3 and g5 start
<br>caching, but I suspect that it always goes in the order of the .map. So in<br>this case it would cache g1 and g2 before showing anything other than the<br>base layers to the user.<br><br>Which translates into a user waiting for layers to cache that s/he might not
<br>be interested in viewing. It would be ideal to give them their selected<br>layers as a higher priority.<br><br>I hope that makes some sense!<br><br>Charlton<br><br><br>_______________________________________________<br>
ka-Map-users mailing list<br><a href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/ka-map-users">http://lists.maptools.org/mailman/listinfo/ka-map-users
</a><br></blockquote></div><br>