Couple of issues regarding custom tile server

In my tile server, I’m having a couple of issues that have me a bit perplexed.

First, if I enable grid lines and labels identical to what is demonstrated on the Cesium sand castle site, any requests for tiles don’t match what I’m seeing in terms of the grid lines. The level is one greater, the x is typically correct, and the y is not even close. I create the imagery provider using the code below.

Additionally, when trying to debug my code, I request the east, west, north, and south degrees to be sent in Cesium’s http request. The received values seem to be in integer form only, so 86W, 34N for my neck of the woods. Wireshark shows that the data is being sent with the desired decimal portion, but I don’t know if the decimal (period) character is throwing my web server implementation for a loop. I’m using Sameke express for the server portion of my tile server, so it may be that the decimal portion is being stripped out or incorrectly parsed. I just don’t know.

  let url = this._mapBaseUrlPreference.baseUrl +
    '/wmts/default/256/{z}/{x}/{y}/{westDegrees}/' + 
    '{northDegrees}/{eastDegrees}/{southDegrees}';
  // NOTE: defaults to web mercator tiling scheme
  let urlProvider = new Cesium.UrlTemplateImageryProvider({
    url: url,
    minimumLevel: 1,
    maximumLevel: 23
  });
  
  this._viewer.imageryLayers.addImageryProvider(urlProvider);

Figured out the decimal issue… There is a boolean for isFloat that needs to be set.

In my case, this code fixed the issue:

  @CatchAndSendError()
  @Get('/:layer/:size/:level/:x/:y/:westDegrees/:northDegrees/:eastDegrees/:southDegrees')
  public async getTile(
      @Response() res: HttpResponse,
      @Params('layer') layer: string,
      @NumParam('size') size: number,
      @NumParam('level') level: number,
      @NumParam('x') x: number,
      @NumParam('y') y: number,
      @NumParam('westDegrees', true) westDegrees: string,
      @NumParam('northDegrees', true) northDegrees: number,
      @NumParam('eastDegrees', true) eastDegrees: string,
      @NumParam('southDegrees', true) southDegrees: number
  ) {
  // The 'true' parameter of the @NumParam specifies that a float value
  // should be returned.

  // more stuff goes here...
  }

Hey Dear,
Yes, that seems like what you would need to do at this point. I’d love to hear your thoughts on how we could make this sort of scenario smoother, though!
Are you agree?