I'm trying to show BLM land areas overlayed on a map.
I'm not sure how to define it though:
const map = L.map("map", {
center: [9.082, 8.6753],
zoom: 8,
});
const osm = L.tileLayer(
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
{
attribution:
'© <a href="https://skatespot.com">SkateSpot, Inc.</a>',
}
).addTo(map);
const mqi = L.tileLayer(
"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
{
id: "mapbox.streets",
attribution:
'© <a href="https://skatespot.com">SkateSpot, Inc.</a>',
}
);
const baseMaps = {
Street: osm,
Satellite: mqi,
};
const overlays = {
BLM: L.tileLayer(
"https://gis.blm.gov/arcgis/rest/services/lands/BLM_Natl_SMA_Cached_without_PriUnk/MapServer/tile/%7Bz%7D/%7By%7D/%7Bx%7D"
),
//add any overlays here
};
L.control
.layers(baseMaps, overlays, { position: "bottomleft" })
.addTo(map);
L.Control.geocoder().addTo(map);
The specific overlay is:
const overlays = {
BLM: L.tileLayer(
"https://gis.blm.gov/arcgis/rest/services/lands/BLM_Natl_SMA_Cached_without_PriUnk/MapServer/tile/%7Bz%7D/%7By%7D/%7Bx%7D"
),
//add any overlays here
};