Replies: 1 comment
-
Hi @flor14! I'm so sorry for the very slow response on this one; I'd composed a reply and then inadvertently not sent it 😮💨 If your code is running locally but not when deployed, then I agree that a missing file is the most likely culprit. You can confirm this by navigating to a deployed version with the offending TIF file, opening the browser tools (the method varies by browser and OS, but you can usually right-click the page and choose Inspect to open it up), then going to the Network tab. You might need to reload the page once that tab's open if there's nothing there. If you scroll through this table to find the TIF file, it should be visually marked if there's a problem loading it. If you then click on it and check the Headers tab in the pop-up, under Response you should see a code. A three-digit code starting with 2 or 3 usually indicates a success, while a code starting 4 or 5 indicates failure (for example, 404 means the file wasn't found). If the TIF file indeed isn't loading, one reason could be that Quarto didn't realise it needs to be copied when you rendered the project. I often have this problem when working with OJS code — Quarto's very good at noticing things like images in Markdown, but I find if often misses things like datasets used in OJS. You can manually add the TIF file in the document metadata using Try adding the path to the TIF file in one (or both) of those places — it should appear in the same place in Let me know how you go! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have been trying to get a Leaflet map to add raster layers based on
crTriggerIndex
. My code works perfectly locally 🎉, but the raster layers disappear once I deploy it.Based on my understanding, there are two potential areas for debugging:
From testing, I think the most likely issue is that the
.tif
file isn't being included in the deployment. I tried adding it in different ways, but it didn't work.I believe that since the issue is with the deployment, the guidance you can provide is more conceptual. It is probably my lack of understanding of how deployment works that prevents me from capturing the error. If you think something like this should work, I can create a shorter reproducible example.
For now, I resolved this by using images (https://florencia.quarto.pub/mobility-matters-beta/), but I would like to be able to use code. Do you have any idea what the error might be, even if you can't provide a working version? Thank you!
Nevertheless, here is the
.tif
file mentioned in the code and here is the code:Beta Was this translation helpful? Give feedback.
All reactions