glenrobertson / leaflet-tilelayer-geojson

Leaflet TileLayer for GeoJSON tiles
Other
250 stars 79 forks source link

Uncaught Error: No value provided for variable {z} #5

Closed alasarr closed 11 years ago

alasarr commented 11 years ago

Hi!

Nice library, It's really useful!

I've detected an issue when the function loadTile is called, because tilePoint.z is not defined (at least it happens to me), in order to fix that I've modified the loadTile function to adjust the tile Point:

_loadTile: function (tile, tilePoint) {

this._adjustTilePoint(tilePoint);
    var layer = this;
    var req = new XMLHttpRequest();
    this._requests.push(req);
    req.onreadystatechange = this._xhrHandler(req, layer, tile);
    req.open('GET', this.getTileUrl(tilePoint), true);
    req.send();
},

It happens with the latest version of the code ofLeaflet 0.6-dev, with 0.5 it works fine.

Do you want I upload this changes to the trunk?

glenrobertson commented 11 years ago

Ah I see what's happened. Yeah that fix looks good. submit a pull request. thanks for picking up on that!

NelsonMinar commented 11 years ago

oops this was my bug; I didn't encounter this problem in my testing. Thanks for fixing it!