Skip to content

L.TileLayer.MVTSource could request tiles with invalide x an y #64

Description

@haoliangyu

I have a local vector tile server based on tilesplash and use L.TileLayer.MVTSource to load the vector tile layer at the client side:

var map = L.map('map').setView([0, 0], 2);

var layer = new L.TileLayer.MVTSource({
    url: 'http://localhost:3000/my_layer/{z}/{x}/{y}.mvt'
})

map.addLayer(layer);

I notice that the L.TileLayer.MVTSource could send request with invalid x and y parameter:

  • x or y smaller than 0
http://localhost:3000/my_layer/2/-1/1.mvt
  • x or y larger than the available number based on the zoom level
http://localhost:3000/my_layer/2/4/2.mvt

Is it a bug, or just because of incorrect layer config?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions