Permalink
Browse files

Make sure we have a scale computed before generating a vector tile (#…

  • Loading branch information...
sdlime committed Dec 3, 2018
1 parent d7fa02e commit 505539f5eb6c1d3f053c5ff68e87a0a152252bfd
Showing with 3 additions and 0 deletions.
  1. +3 −0 mapmvt.c
@@ -355,6 +355,9 @@ int msMVTWriteTile( mapObj *map, int sendheaders ) {
VectorTile__Tile mvt_tile = VECTOR_TILE__TILE__INIT;
mvt_tile.layers = msSmallCalloc(map->numlayers, sizeof(VectorTile__Tile__Layer*));
/* make sure we have a scale computed */
msCalculateScale(map->extent, map->units, map->width, map->height, map->resolution, &map->scaledenom);
/* expand the map->extent so it goes from pixel center (MapServer) to pixel edge (OWS) */
map->extent.minx -= map->cellsize * 0.5;
map->extent.maxx += map->cellsize * 0.5;

0 comments on commit 505539f

Please sign in to comment.