Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
peterqliu committed Mar 7, 2019
2 parents 6b20f71 + c4a22bf commit 06cd19c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
12 changes: 8 additions & 4 deletions debug/zoomrange.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@

var map = window.map = new mapboxgl.Map({
container: 'map',
zoom: 2.1,
center: [-77.01866, 38.888],
style: 'mapbox://styles/mapbox/empty-v9'
zoom: 3,
style: 'mapbox://styles/mapbox/satellite-v9'
});

map.on('load', function() {

map.addLayer({
"id": "circle",
"type": "circle",
Expand All @@ -46,7 +46,11 @@
'circle-color': 'red'
}
});
map.setLayerZoomRange('circle', 0, 3);

map.on('click', function() {
map.setLayerZoomRange('satellite', 0, 5);
map.setLayerZoomRange('circle', 0, 5);
});
});
</script>
</body>
Expand Down
1 change: 1 addition & 0 deletions src/style-spec/reference/v8.json
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,7 @@
"text-radial-offset": {
"type": "number",
"units": "ems",
"default": 0,
"doc": "Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which doesn't support the two-dimensional `text-offset`.",
"requires": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/style/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ class Style extends Evented {
if (maxzoom != null) {
layer.maxzoom = maxzoom;
}
this._updateLayer(layer);
if (layer.type !== 'raster') this._updateLayer(layer);
}

setFilter(layerId: string, filter: ?FilterSpecification, options: StyleSetterOptions = {}) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Actor {
if (cancelable && this.callbacks[data.id] === null) {
// Only add the cancelable callback if the done callback wasn't already called.
// Otherwise we will never be able to delete it.
this.callbacks[data.id] = cancelable;
this.callbacks[data.id] = cancelable.cancel;
}
} else if (typeof data.id !== 'undefined' && this.parent.getWorkerSource) {
// data.type == sourcetype.method
Expand Down

0 comments on commit 06cd19c

Please sign in to comment.