Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into remove-attributio…
Browse files Browse the repository at this point in the history
…n-issue
  • Loading branch information
BrunoCaimar committed Nov 27, 2023
2 parents e6b129d + 4fae9f2 commit dbe3ba8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body:
id: reproduction
attributes:
label: Reproduction
description: A link to a public repository or jsbin (you can start with https://jsbin.com/zutofox/edit) that reproduces the issue, along with a step by step explanation of how to see the issue. If no reproduction case is provided within a reasonable time-frame, the issue will be closed.
description: A link to a public repository or jsbin (you can start with https://jsbin.com/jexevoy/edit) that reproduces the issue, along with a step by step explanation of how to see the issue. If no reproduction case is provided within a reasonable time-frame, the issue will be closed.
placeholder: Reproduction
validations:
required: true
Expand Down
81 changes: 24 additions & 57 deletions examples/gallery-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,71 +49,38 @@
var map = L.map("map", {}).setView([34.0522, -118.2437], 15);

var vectorTiles = {};
var allEnums = [
"ArcGIS:Imagery",
"ArcGIS:Imagery:Standard",
"ArcGIS:Imagery:Labels",
"ArcGIS:LightGray",
"ArcGIS:LightGray:Base",
"ArcGIS:LightGray:Labels",
"ArcGIS:DarkGray",
"ArcGIS:DarkGray:Base",
"ArcGIS:DarkGray:Labels",
"ArcGIS:Navigation",
"ArcGIS:NavigationNight",
"ArcGIS:Streets",
"ArcGIS:StreetsNight",
"ArcGIS:StreetsRelief",
"ArcGIS:Topographic",
"ArcGIS:Oceans",
"ArcGIS:Oceans:Base",
"ArcGIS:Oceans:Labels",
"OSM:Standard",
"OSM:StandardRelief",
"OSM:StandardRelief:Base",
"OSM:Streets",
"OSM:StreetsRelief",
"OSM:LightGray",
"OSM:LightGray:Base",
"OSM:LightGray:Labels",
"OSM:DarkGray",
"OSM:DarkGray:Base",
"OSM:DarkGray:Labels",
"ArcGIS:Terrain",
"ArcGIS:Terrain:Base",
"ArcGIS:Terrain:Detail",
"ArcGIS:Community",
"ArcGIS:ChartedTerritory",
"ArcGIS:ColoredPencil",
"ArcGIS:Nova",
"ArcGIS:ModernAntique",
"ArcGIS:Midcentury",
"ArcGIS:Newspaper",
"ArcGIS:Hillshade:Light",
"ArcGIS:Hillshade:Dark",
];

var apiKey = "< YOUR VALID API KEY HERE >";

vectorTiles[
"Default"
] = L.esri.Vector.vectorBasemapLayer(null, {
] = L.esri.Vector.vectorBasemapLayer("", {
apiKey
});
allEnums.forEach((enumString) => {
vectorTiles[
enumString
] = L.esri.Vector.vectorBasemapLayer(enumString, {
apiKey
})
})

var layerControl = L.control
.layers(vectorTiles, null, {
collapsed: false
})
.addTo(map);

L.esri.get('https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/self', {}, function (error, response) {
if (error) {
console.error('Error getting the available styles. See the error details:', error);
return;
}

response.styles.forEach((style) => {
vectorTiles[style.name] = L.esri.Vector.vectorBasemapLayer(
style.path,
{
apiKey
}
);
});

L.control
.layers(vectorTiles, null, {
collapsed: false,
})
.addTo(map);

});

vectorTiles["Default"].addTo(map);
</script>
</body>
Expand Down

0 comments on commit dbe3ba8

Please sign in to comment.