[mapserver-users] PHP mapscript and OGR problem

stupidzt stupidzt at yahoo.com
Tue Nov 6 19:26:59 PST 2012


Hi, 

I need help on OGR connectiontype 
part of my php script : 

    for($iLayer=0; $iLayer < $gpoMap->numlayers; $iLayer++){ 
        $oLayer = $gpoMap->GetLayer($iLayer); 
        $numResults = $oLayer->getNumResults(); 

and my map file : 

  LAYER 
    NAME "Kota/Kabupaten" 
    GROUP "POLYGON" 
    STATUS OFF 
    TYPE POLYGON 
    #CONNECTIONTYPE OGR 
    #CONNECTION "../data/KotaKabupaten_region.shp" 
    DATA "KotaKabupaten_region.shp" 

when I click on map (querybypoint) the script $numResults gets value 1. 
but if I change my map file to : 

  LAYER 
    NAME "Kota/Kabupaten" 
    GROUP "POLYGON" 
    STATUS OFF 
    TYPE POLYGON 
    CONNECTIONTYPE OGR 
    CONNECTION "../data/KotaKabupaten_region.shp" 
    DATA "KotaKabupaten_region" 

$numResults gets value 0 

both mapfile works fine, it show the map correctly. Even the function zoom
in, zoom out and recenter work fine. But when i use querybypoint, it's not
working for the second mapfile. 

Please help. 

MapServer version 6.0.1,PHP MapScript Version	($Revision: 11619 $ $Date:
2011-04-27 11:23:07 -0400 (Wed, 27 Apr 2011) $),PHP Version
5.3.10-1ubuntu3.3



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/PHP-mapscript-and-OGR-problem-tp5014436.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the MapServer-users mailing list