Here's the error generated. I'm trying to customize one of Bill Kropola's examples to my own data. Any suggestions<br><br>
<b>Warning</b>: getLayerByName failed for : sites
in <b>C:\ms4w\Apache\htdocs\jerba_dbase\index.php</b> on line <b>121</b><br>
<br>
<b>Fatal error</b>: Call to a member function set() on a non-object in <b>C:\ms4w\Apache\htdocs\jerba_dbase\index.php</b> on line <b>122<br><br> if (preg_match("/satt/", $layers)){ <br> $satt = "CHECKED";<br>
$this_layer = $map->getLayerByName('satt');<br> $this_layer->set('status', MS_ON);<br> } else { <br> $satt = "";<br> $this_layer = $map->getLayerByName('satt');<br>
$this_layer->set('status', MS_OFF);<br> }<br><br> if (preg_match("/soils/", $layers)){ <br> $lakes = "CHECKED";<br> $this_layer = $map->getLayerByName('soils');<br>
$this_layer->set('status', MS_ON);<br> } else { <br> $soils = "";<br> $this_layer = $map->getLayerByName('soils');<br> $this_layer->set('status', MS_OFF);<br>
}<br><br> if (preg_match("/sites/", $layers)){ <br> $states = "CHECKED";<br> $this_layer = $map->getLayerByName('sites');<br> $this_layer->set('status', MS_ON);<br>
} else {<br> $sites = "";<br> $this_layer = $map->getLayerByName('sites');<br> $this_layer->set('status', MS_OFF);<br></b>