Permalink
Browse files

Enable MVT default format for WMS (retired reference to GD). Removed …

…msMVTSetup(), not necessary for WMS of mode=tile operation.
  • Loading branch information...
sdlime committed Feb 10, 2017
1 parent 47c55e0 commit c4da16b5bc6789cb5b1ac8b303ac0069d592cae5
Showing with 1 addition and 24 deletions.
  1. +0 −19 mapmvt.c
  2. +0 −1 mapserver.h
  3. +0 −1 mapservutil.c
  4. +1 −3 mapwms.c
@@ -312,20 +312,6 @@ static void freeMvtTile( VectorTile__Tile *mvt_tile ) {
free(mvt_tile->layers);
}
int msMVTSetup( mapObj *map )
{
/* Ensure all the LAYERs have a projection. */
if( msMapSetLayerProjections(map) != 0 ) return(MS_FAILURE);
/* Set output projection to spherical Mercator. */
if( msLoadProjectionString(&(map->projection), SPHEREMERC_PROJ4) != 0 ) {
msSetError(MS_MISCERR, "Unable to load projection string.", "msMVTSetup()");
return MS_FAILURE;
}
return MS_SUCCESS;
}
int msMVTWriteTile( mapObj *map, int sendheaders ) {
int iLayer,retcode=MS_SUCCESS;
unsigned len;
@@ -505,11 +491,6 @@ int msPopulateRendererVTableMVT(rendererVTableObj * renderer) {
return MS_FAILURE;
}
int msMVTSetup( mapObj *map ) {
msSetError(MS_MISCERR, "Vector Tile support is not available.", "msMVTSetup()");
return MS_FAILURE;
}
int msMVTWriteTile( mapObj *map, int sendheaders ) {
msSetError(MS_MISCERR, "Vector Tile support is not available.", "msMVTWriteTile()");
return MS_FAILURE;
@@ -3023,7 +3023,6 @@ void msPopulateTextSymbolForLabelAndString(textSymbolObj *ts, labelObj *l, char
MS_DLL_EXPORT int msPopulateRendererVTableOGR( rendererVTableObj *renderer );
MS_DLL_EXPORT int msPopulateRendererVTableMVT( rendererVTableObj *renderer );
MS_DLL_EXPORT int msMVTSetup( mapObj *map );
MS_DLL_EXPORT int msMVTWriteTile( mapObj *map, int sendheaders );
#ifdef USE_CAIRO
@@ -1515,7 +1515,6 @@ int msCGIDispatchImageRequest(mapservObj *mapserv)
msTileSetExtent(mapserv);
if(!strcmp(MS_IMAGE_MIME_TYPE(mapserv->map->outputformat), "application/x-protobuf")) {
// if((status = msMVTSetup(mapserv->map)) != MS_SUCCESS) return MS_FAILURE;
if((status = msMVTWriteTile(mapserv->map, mapserv->sendheaders)) != MS_SUCCESS) return MS_FAILURE;
return MS_SUCCESS;
}
@@ -1081,7 +1081,7 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,
} else {
format = msSelectOutputFormat( map, values[i] );
if( format == NULL ||
(strncasecmp(format->driver, "GD/", 3) != 0 &&
(strncasecmp(format->driver, "MVT", 3) != 0 &&
strncasecmp(format->driver, "GDAL/", 5) != 0 &&
strncasecmp(format->driver, "AGG/", 4) != 0 &&
strncasecmp(format->driver, "UTFGRID", 7) != 0 &&
@@ -3673,8 +3673,6 @@ int msWMSGetMap(mapObj *map, int nVersion, char **names, char **values, int nume
/* intercept requests for Mapbox vector tiles */
if(!strcmp(MS_IMAGE_MIME_TYPE(map->outputformat), "application/x-protobuf")) {
int status=0;
if((status = msMVTSetup(map)) != MS_SUCCESS) return MS_FAILURE;
if((status = msMVTWriteTile(map, MS_TRUE)) != MS_SUCCESS) return MS_FAILURE;
return MS_SUCCESS;
}

0 comments on commit c4da16b

Please sign in to comment.