Call to undefined method getFeature

Christopher Wellen christopher.wellen at MAIL.MCGILL.CA
Wed Jun 27 13:53:30 EDT 2007


*Hi all,

I'm having some trouble getting the getFeature method to work on a layer
object. Here's the error I get:

Fatal error*: Call to undefined method ms_layer_obj::getFeature() in
*C:\ms4w\Apache\htdocs\test.php* on line *10

And the php code:

<?php
dl("php_mapscript.dll");
dl("php_dbase.dll");
dl("php_curl.dll");


$shape_id = 1;
$map = ms_newMapObj("c:\ms4w\apache\htdocs\es.map");
$this_layer = $map->getLayerByName('pn_points');
$attribute = $this_layer->getFeature(1, -1);
echo "ok";
?>

and the mapfile:

# This is our fifth map file
NAME "es"
UNITS meters
EXTENT 167000 5814000 542300 5948000
SIZE 640 480
IMAGECOLOR 255 255 255
IMAGETYPE PNG
SHAPEPATH "c:\ms4w\apache\htdocs\wem\"
FONTSET "c:\ms4w\apache\htdocs\fontset.txt"

WEB
    IMAGEPATH "/ms_temp/"
    IMAGEURL "http://132.206.251.215/ms_temp/"
END

#####################################
# placenames layer - points
#
LAYER
    NAME "pn_points"
    DATA "points_ID_real"
    STATUS on
    TYPE point
    CLASS
         STYLE
              SIZE 1
              COLOR 100 100 200
         END
    END
END


END # mapfile

Any ideas? I'm totally stumped. I don't know if its the software (mapserver
4.10, mapscript 4.10, php 5)or a mistake I've made that is eluding me.
*

-- 
Christopher Wellen
M.Sc. Candidate
Department of Geography
McGill University
Montreal, Quebec
Burnside Hall room 428
805 Sherbrooke Street West
Montreal, Quebec H3A 2K6
skype: christopher.wellen
MSN: christopher.wellen at mail.mcgill.ca
home: 514-509-9476
cell: 514-585-5138



More information about the mapserver-users mailing list