[ka-Map-users] changing mapfile on the fly
Donal Regan
donal_regan10 at yahoo.co.uk
Thu Jun 1 05:27:46 EDT 2006
Hello.
I'm just wondering is it possible to do the following using ka-map :
- Highlight a polygon on a map that has already been drawn.
So I have a mapfile with the following
LAYER #start of "school regions"
NAME "school regions"
DATA PrimarySchool_region
STATUS DEFAULT
TYPE POLYGON
CLASSITEM "CODE"
CLASS
NAME "highlighted"
EXPRESSION "3"
COLOR 255 50 0
OUTLINECOLOR 0 0 0
END
CLASS
NAME "default"
COLOR 238 230 133
OUTLINECOLOR 0 0 0
END
END
I want to select an id number from a select box and then change the value of the expression in the "highlighted" class so that the polygon corresponding to the selected id is highlighted.
So I do a
call(myKaMap.server+'/setExpression.php?l='+layer+'&c='+classname+'&e='+exp,this,this.updateMap);
when I click on the select box.
setExpression.php looks like this
$oLayer = $oMap->getLayerByName($myLayerName);
for ($i=0; $i<$oLayer->numclasses; $i++)
{
$oClass = $oLayer->getClass($i);
if ( $oClass->name == $myClassName )
{
$oClass->setExpression($myExpression);
break;
}
}
and this is where I'm stuck.
How can I tell ka-map to redraw the tiles reflecting the changes in the mapfile?
Do I have to actually write a new mapfile on the server and then point to that?
Thanks.
D.
Send instant messages to your online friends http://uk.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060601/707e81f6/attachment.html
More information about the ka-Map-users
mailing list