Skip to content

Commit

Permalink
remove USE_PROJ check for mode=tile
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 7, 2020
1 parent a88bacc commit 335e8a0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
3 changes: 3 additions & 0 deletions maptemplate.c
Expand Up @@ -4612,6 +4612,7 @@ mapservObj *msAllocMapServObj()
mapserv->ShapeIndex=-1;
mapserv->TileIndex=-1;
mapserv->TileMode=TILE_GMAP;
mapserv->TileCoords=NULL;
mapserv->QueryCoordSource=NONE;
mapserv->ZoomSize=0; /* zoom absolute magnitude (i.e. > 0) */

Expand Down Expand Up @@ -4651,6 +4652,8 @@ void msFreeMapServObj(mapservObj* mapserv)
msFree(mapserv->SelectLayer);
msFree(mapserv->QueryFile);

msFree(mapserv->TileCoords);

msFree(mapserv);
}
}
Expand Down
2 changes: 0 additions & 2 deletions maptile.h
Expand Up @@ -30,9 +30,7 @@
#include "mapserver.h"
#include "maptemplate.h"

#ifdef USE_PROJ
#define USE_TILE_API 1
#endif

#define SPHEREMERC_PROJ4 "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +units=m +k=1.0 +nadgrids=@null"
#define SPHEREMERC_GROUND_SIZE (20037508.34*2)
Expand Down
Binary file added msautotest/misc/expected/mode_tile_output.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions msautotest/misc/mode_tile.map
@@ -0,0 +1,36 @@
#
# Test of mode=tile (CGI "tile mode"). A 256x256 tile should be generated
# in the "gmap" tilemode, reprojected to the Google Mercator (EPSG:3857)
# and displayed at the global extent.
#
# REQUIRES: INPUT=OGR OUTPUT=PNG SUPPORTS=PROJ
#
# RUN_PARMS: mode_tile_output.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&MODE=tile&TILEMODE=gmap&TILE=0+0+0&LAYERS=canada-poly" > [RESULT_DEMIME]
#
MAP
NAME "MODE_TILE_TEST"
IMAGETYPE PNG
EXTENT -140.992892 41.976786 -55.630945 71.990315
SIZE 400 400

PROJECTION
"init=epsg:4326"
END #projection

LAYER
NAME "canada-poly"
TYPE POLYGON
STATUS DEFAULT
CONNECTIONTYPE OGR
CONNECTION "data/canada.dgn"
DATA "elements"
PROJECTION
"init=epsg:4326"
END #projection
CLASS
OUTLINECOLOR 0 0 0
COLOR 120 120 120
END #class
END #layer

END #map

0 comments on commit 335e8a0

Please sign in to comment.