0
votes

var map = L.mapbox.map('map', 'wmarci.i6n42nl5',

{ center: new L.LatLng(38.8929,-100.0252), zoom: 4, minZoom: 0, maxZoom: 18, layers: [ L.tileLayer('wmarci.k300ifal', { maxZoom: 13, minZoom: 5, }) ] });

This doesn't seem to be working.... ideas? Am I calling the tilelayer wrong?

1
try L.mapbox.tileLayerAlex Filatov
@AlexFilatov that worked, I saw the tile set for split second, but now I think the basemap is screwing it up... var layers = [{ name: 'basemap', layer: L.layerGroup([ L.mapbox.tileLayer('wmarci.i6n42nl5'), L.mapbox.gridLayer('')]) }wayne-m

1 Answers

0
votes

something like this, use a tileLayer (defined earlier) and turn it off and on based on zoom level...

map.on('zoomend load ready', function() {
    if (map.getZoom() < 16) {
        map.removeLayer(zoomedinmap);
    } else {
        map.addLayer(zoomedinmap);
    }
});