You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to zoom out and see my image on the map. But it disappears at far away zoom levels. Also the default zoom level that is set when the map opens won't show the image.
What I Did
importpystac_clientimportplanetary_computerfromshapely.geometryimportPointarea_of_interest=Point((-121.034, 36.990)) # wright solar farm lon latcatalog=pystac_client.Client.open(
"https://planetarycomputer.microsoft.com/api/stac/v1",
modifier=planetary_computer.sign_inplace,
)
range_old="2010-01-01/2013-01-01"range_new="2020-01-01/2021-01-01"search_old=catalog.search(
collections=["naip"], intersects=area_of_interest, datetime=range_old
)
search_new=catalog.search(
collections=["naip"], intersects=area_of_interest, datetime=range_new
)
items_old=search_old.item_collection()
items_new=search_new.item_collection()
print(f"{len(items_old)} Items found in the 'old' range")
print(f"{len(items_new)} Items found in the 'new' range")
map=leafmap.Map()
leafmap.stac_assets(collection="naip", item=items_old[0].id, titiler_endpoint="pc")
m=leafmap.Map()
m.add_stac_layer(
collection="naip",
item='ca_m_3612108_ne_10_1_20120622_20120904',
assets=["image"],
name="Old image 2012 before solar development",
)
m
The text was updated successfully, but these errors were encountered:
Thank you for reporting. I can confirm that I encourter the same issue with NAIP imagery. However, I suspect this is an issue with Planetary Computer rather than leafmap. Check out the example below using Landsat imagery. The layer does not disappear when zoomed out. Leafmap uses the same mechanism to display PC data. If it is indeed a leafmap issue, I would expect both NAIP and Landsat data to experience the same issue. I look into the source code of the stac_tile function, but could not identify any issues that could have caused this. https://leafmap.org/notebooks/37_planetary_computer/
Environment Information
Description
I want to zoom out and see my image on the map. But it disappears at far away zoom levels. Also the default zoom level that is set when the map opens won't show the image.
What I Did
The text was updated successfully, but these errors were encountered: