[mapserver-commits] r10469 -
sandbox/sdlime/common-expressions/mapserver/mapscript/swiginc
svn at osgeo.org
svn at osgeo.org
Tue Aug 24 23:52:05 EDT 2010
Author: sdlime
Date: 2010-08-25 03:52:05 +0000 (Wed, 25 Aug 2010)
New Revision: 10469
Modified:
sandbox/sdlime/common-expressions/mapserver/mapscript/swiginc/layer.i
sandbox/sdlime/common-expressions/mapserver/mapscript/swiginc/map.i
Log:
Added Swig-based MapScript wrappers for msQueryByFilter().
Modified: sandbox/sdlime/common-expressions/mapserver/mapscript/swiginc/layer.i
===================================================================
--- sandbox/sdlime/common-expressions/mapserver/mapscript/swiginc/layer.i 2010-08-25 03:23:21 UTC (rev 10468)
+++ sandbox/sdlime/common-expressions/mapserver/mapscript/swiginc/layer.i 2010-08-25 03:52:05 UTC (rev 10469)
@@ -268,7 +268,30 @@
/* For querying, we switch layer status ON and then back to original
value before returning. */
+
+ int queryByFilter(mapObj *map, char *string)
+ {
+ int status;
+ int retval;
+ msInitQuery(&(map->query));
+
+ map->query.type = MS_QUERY_BY_FILTER;
+
+ map->query.filter = (expressionObj *) malloc(sizeof(expressionObj));
+ map->query.filter->string = strdup(string);
+ map->query.filter->type = 2000; /* MS_EXPRESSION: lot's of conflicts in mapfile.h */
+
+ map->query.layer = self->index;
+ map->query.rect = map->extent;
+
+ status = self->status;
+ self->status = MS_ON;
+ retval = msQueryByFilter(map);
+ self->status = status;
+ return retval;
+ }
+
int queryByAttributes(mapObj *map, char *qitem, char *qstring, int mode)
{
int status;
Modified: sandbox/sdlime/common-expressions/mapserver/mapscript/swiginc/map.i
===================================================================
--- sandbox/sdlime/common-expressions/mapserver/mapscript/swiginc/map.i 2010-08-25 03:23:21 UTC (rev 10468)
+++ sandbox/sdlime/common-expressions/mapserver/mapscript/swiginc/map.i 2010-08-25 03:52:05 UTC (rev 10469)
@@ -240,6 +240,18 @@
return NULL;
}
+ int queryByFilter(char *string) {
+ msInitQuery(&(self->query));
+
+ self->query.type = MS_QUERY_BY_FILTER;
+
+ self->query.filter = (expressionObj *) malloc(sizeof(expressionObj));
+ self->query.filter->string = strdup(string);
+ self->query.filter->type = 2000; /* MS_EXPRESSION: lot's of conflicts in mapfile.h */
+
+ return msQueryByFilter(self);
+ }
+
int queryByPoint(pointObj *point, int mode, double buffer) {
msInitQuery(&(self->query));
More information about the mapserver-commits
mailing list