Skip to content

Commit

Permalink
Merge pull request Esri#1100 from pmacMaps/firefly-imagery-basemap
Browse files Browse the repository at this point in the history
add support for Firefly Imagery Basemap
  • Loading branch information
jgravois committed Jun 29, 2018
2 parents f2b6a34 + 0710c75 commit ef42e5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/Layers/BasemapLayerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('L.esri.BasemapLayer', function () {
});

it('can return valid basemaps', function () {
var testmaps = ['Streets', 'Topographic', 'NationalGeographic', 'Oceans', 'OceansLabels', 'DarkGray', 'DarkGrayLabels', 'Gray', 'GrayLabels', 'Imagery', 'ImageryLabels', 'ImageryTransportation', 'ShadedRelief', 'ShadedReliefLabels', 'Terrain', 'TerrainLabels', 'USATopo', 'ImageryClarity'];
var testmaps = ['Streets', 'Topographic', 'NationalGeographic', 'Oceans', 'OceansLabels', 'DarkGray', 'DarkGrayLabels', 'Gray', 'GrayLabels', 'Imagery', 'ImageryLabels', 'ImageryTransportation', 'ShadedRelief', 'ShadedReliefLabels', 'Terrain', 'TerrainLabels', 'USATopo', 'ImageryClarity', 'ImageryFirefly'];
for (var i = 0, len = testmaps.length; i < len; i++) {
var name = testmaps[i];
expect(L.esri.basemapLayer(name)).to.be.instanceof(L.esri.BasemapLayer);
Expand Down
11 changes: 10 additions & 1 deletion src/Layers/BasemapLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ export var BasemapLayer = TileLayer.extend({
maxZoom: 19,
attribution: 'Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community'
}
},
ImageryFirefly: {
urlTemplate: tileProtocol + '//fly.maptiles.arcgis.com/arcgis/rest/services/World_Imagery_Firefly/MapServer/tile/{z}/{y}/{x}',
options: {
minZoom: 1,
maxZoom: 19,
attribution: 'Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community',
attributionUrl: 'https://static.arcgis.com/attribution/World_Imagery'
}
}
}
},
Expand All @@ -196,7 +205,7 @@ export var BasemapLayer = TileLayer.extend({
} else if (typeof key === 'string' && BasemapLayer.TILES[key]) {
config = BasemapLayer.TILES[key];
} else {
throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of "Streets", "Topographic", "Oceans", "OceansLabels", "NationalGeographic", "Gray", "GrayLabels", "DarkGray", "DarkGrayLabels", "Imagery", "ImageryLabels", "ImageryTransportation", "ImageryClarity", "ShadedRelief", "ShadedReliefLabels", "Terrain", "TerrainLabels" or "USATopo"');
throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of "Streets", "Topographic", "Oceans", "OceansLabels", "NationalGeographic", "Gray", "GrayLabels", "DarkGray", "DarkGrayLabels", "Imagery", "ImageryLabels", "ImageryTransportation", "ImageryClarity", "ImageryFirefly", "ShadedRelief", "ShadedReliefLabels", "Terrain", "TerrainLabels" or "USATopo"');
}

// merge passed options into the config options
Expand Down

0 comments on commit ef42e5e

Please sign in to comment.