Permalink
Browse files

setup correct map scale and units for WFS queries if using vector til…

…e driver
  • Loading branch information...
tbonfort committed Sep 14, 2015
1 parent e837275 commit 50c3a44ddd3c182ca0e1a16a6e5a1c5c20675768
Showing with 10 additions and 1 deletion.
  1. +1 −1 mapserver.h
  2. +9 −0 mapwfs.c
View
@@ -374,7 +374,7 @@ extern "C" {
#define MS_DRIVER_GDAL(format) (strncasecmp((format)->driver,"gdal/",5)==0)
#define MS_DRIVER_IMAGEMAP(format) (strncasecmp((format)->driver,"imagemap",8)==0)
#define MS_DRIVER_AGG(format) (strncasecmp((format)->driver,"agg/",4)==0)
#define MS_DRIVER_MVT(format) (strncasecmp((format)->driver,"mvt/",4)==0)
#define MS_DRIVER_MVT(format) (strncasecmp((format)->driver,"mvt",3)==0)
#define MS_DRIVER_CAIRO(format) (strncasecmp((format)->driver,"cairo/",6)==0)
#define MS_DRIVER_OGL(format) (strncasecmp((format)->driver,"ogl/",4)==0)
#define MS_DRIVER_TEMPLATE(format) (strncasecmp((format)->driver,"template",8)==0)
View
@@ -479,6 +479,11 @@ static int msWFSGetFeatureApplySRS(mapObj *map, const char *srs, int nWFSVersion
} else {
msLoadProjectionString(&(map->projection), pszOutputSRS);
}
nTmp = GetMapserverUnitUsingProj(&(map->projection));
if( nTmp != -1 ) {
map->units = nTmp;
}
}
if (pszOutputSRS)
@@ -2610,6 +2615,10 @@ this request. Check wfs/ows_enable_request settings.", "msWFSGetFeature()",
map->query.mode = MS_QUERY_MULTIPLE;
map->query.rect = bbox;
if(map->outputformat && MS_DRIVER_MVT(map->outputformat)) {
msCalculateScale(bbox,map->units,map->width,map->height, map->resolution, &map->scaledenom);
}
if(msQueryByRect(map) != MS_SUCCESS) {
errorObj *ms_error;
ms_error = msGetErrorObj();

0 comments on commit 50c3a44

Please sign in to comment.