mapbox-gl-leaflet
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -53,2 +53,4 @@ (function (root, factory) { | ||
} | ||
map._addZoomLimit(this); | ||
}, | ||
@@ -158,2 +160,5 @@ | ||
_update: function (e) { | ||
if (!this._map) { | ||
return; | ||
} | ||
// update the offset so we can correct for it later when we zoom | ||
@@ -176,5 +181,7 @@ this._offset = this._map.containerPointToLayerPoint([0, 0]); | ||
if (gl.transform.width !== size.x || gl.transform.height !== size.y) { | ||
container.style.width = size.x + 'px'; | ||
container.style.height = size.y + 'px'; | ||
var x_round = Math.round(size.x), y_round = Math.round(size.y); | ||
if (Math.round(gl.transform.width) !== x_round || Math.round(gl.transform.height) !== y_round) { | ||
container.style.width = x_round + 'px'; | ||
container.style.height = y_round + 'px'; | ||
if (gl._resize !== null && gl._resize !== undefined){ | ||
@@ -181,0 +188,0 @@ gl._resize(); |
{ | ||
"name": "mapbox-gl-leaflet", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "binding from mapbox gl to the leaflet api", | ||
@@ -5,0 +5,0 @@ "main": "leaflet-mapbox-gl.js", |
@@ -12,3 +12,4 @@ **Note: this tool is experimental and is not actively supported by Mapbox. For support, please open an issue in this repository.** | ||
```javascript | ||
var token ="pk.XXXX"; // replace with your Mapbox API Access token. Create a Mapbox account and find it on https://account.mapbox.com/ | ||
// replace with your Mapbox API Access token. Only include a token if you will be using Mapbox tiles. | ||
var token ="pk.XXXX"; | ||
@@ -15,0 +16,0 @@ var map = L.map('map').setView([38.912753, -77.032194], 15); |
240
88
16022
4