Hi,

In any case, If you got a internal error.. it's a bug. Please fill a ticket in trac. Will try to check it as soon as possibl.e

Regards,
Alan

On 11-10-20 01:08 PM, Chris Green wrote:
Dear List

I’m struggling with what should be (I think) quite simple. I want to get
a feature from one layer of a map then add it to another layer. I am
using Mapserver 6.0 and PHP mapscript like so:

$map = ms_newMapobj("path/to/.map");

$layer1=$map->getLayerByName("countries");

$layer2=$map->getLayerByName("highlightCountry");

$country=’France’;

$layer1->queryByAttributes('NAME', $country , MS_SINGLE );

$shape = $layer1->getShape($layer1->getResult(0));

$layer2->open();

$layer2->addFeature($shape); ## I get a Mapserver ‘internal error’ at
this point ##

$layer2->close();

$image=$map->draw();

Extract from my mapfile:

LAYER

NAME "countries"

DATA "world"

STATUS default

TYPE line

CLASS

STYLE

COLOR 255 255 255

WIDTH 1

END # style

END # class

END #layer

LAYER

NAME "highlightCountry"

STATUS default

TYPE line

CLASS

STYLE

COLOR 255 255 0

WIDTH 4

END # style

END # class

END # layer

Can anyone help?

Chris



_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to