mapscript - queryByAttributes: Aborted
Jachym Cepicky
jachym.cepicky at CENTRUM.CZ
Sun Oct 9 02:44:13 PDT 2005
Ok, I get this error no more. Anyway, it does not work, how I would
expect:
my $layerObj = $mapObj->getLayerByName("landuse");
$layerObj->queryByAttributes($mapObj, 'number', '10850', $mapscript::MS_SINGLE);
my $resultCacheObj = $layerObj->getResults();
# but there is no $resultCacheObj defined
print $resultCacheObj,"\n";
# Use of uninitialized value in print at ./mapserv2.pl line 70.
How to perform the attribute query with mapscript?
Thanks
Jachym
On Sat, Oct 08, 2005 at 02:05:09PM +0200, Jachym Cepicky wrote:
> Hi,
>
> I work with perl-mapscript, after line with
>
> [...]
> $layerObj->queryByAttributes($mapObj, "n_leg", "2240",$mapscript::MS_SINGLE);
> [...]
>
> I get only
>
> $ ./mapscript.pl
> *** glibc detected *** double free or corruption (!prev): 0x083eb1a8 ***
> Aborted
> $
>
> I would like to write application, which would enable to find map
> objects defined by attribut in database table, I suppose,
> queryByAttribute is the method, I'm looking for.
>
> I thing, I will have to do it like follows:
>
> 1) set up map extent to fulll extent
> 2) create layerObj
> 3) $layerObj->queryByAttributes($mapObj, "column name", "value",$mapscript::MS_SINGLE);
> 4) $resultCacheObj = $layerObj->getResults();
> 5) new EXTENT = $resultCacheObj->{0}->{bounds};
>
> is there some better way, how to do this?
> how does exactly drawQuery work -- are there any exaples?
>
> I'm following the documentation from
> http://zcologia.com/mapserver/mapscript, is there some better place,
> where to look?
>
> Thank you
>
> Jachym
>
> --
> Jachym Cepicky
> e-mail: jachym.cepicky at centrum.cz
> URL: http://les-ejk.cz
> GPG: http://les-ejk.cz/gnupg_public_key/
> -----------------------------------------
> OFFICE:
> Department of Geoinformation Technologies
> LDF MZLU v Brně
> Zemědělská 3
> 613 00 Brno
> e-mail: xcepicky at node.mendelu.cz
> URL: http://mapserver.mendelu.cz
> Tel.: +420 545 134 514
--
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
LDF MZLU v Brně
Zemědělská 3
613 00 Brno
e-mail: xcepicky at node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514
More information about the MapServer-users
mailing list