Skip to content

Tyler throws error when using CairoMakie #24

Open

Description

@alex-s-gardner

When using CairoMakie I get this error

ERROR: please load either GLMakie, WGLMakie or CairoMakie
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] Tyler.Map(rect::GeometryBasics.HyperRectangle{2, Float32}, zoom::Int64, input_cs::MapTiles.WGS84; figure::Figure, coordinate_system::MapTiles.WebMercator, provider::Provider, min_tiles::Int64, max_tiles::Int64, max_parallel_downloads::Int64, cache_size_gb::Int64)
   @ Tyler ~/.julia/packages/Tyler/eajCg/src/Tyler.jl:79
 [3] top-level scope
   @ ~/Documents/GitHub/Altim.jl/src/geolocate_dev.jl:88

I suspect that Tyler only works with GLMakie ?

If that's the case the the Error message needs updating.

Activity

  1. SimonDanisch commented on Feb 3, 2023

    @SimonDanisch
    Member

    Uh, it's a bit unfortunate, but, yeah cairomakie doesn't work right now, but should be easy to fix...
    WGLMakie definitely works though!

  2. asinghvi17 commented on Apr 24, 2024

    @asinghvi17
    Member

    Why exactly does Tyler require access to the screen? Is it just to know when not to run the download task?

  3. lazarusA commented on Apr 24, 2024

    @lazarusA
    Collaborator

    Latest release doesn't require a window open. However, cairomakie is still failing, somehow...

  4. asinghvi17 commented on Apr 24, 2024

    @asinghvi17
    Member

    Ah, I forgot that Tyler can't work with CairoMakie as long as it plots meshes, because Cairo's mesh handling only interpolates colors between vertices (it can't handle UVs).

  5. asinghvi17 commented on Dec 31, 2024

    @asinghvi17
    Member

    Since Tyler has switched to image plots for web mercator axes, and meshimage for GeoAxis, it should work pretty smoothly with CairoMakie now. One last issue to iron out is MakieOrg/Makie.jl#4694. But otherwise you do not need a GL backend at all for Tyler.

  6. lazarusA commented on Jul 28, 2025

    @lazarusA
    Collaborator

    On notebooks (in this case Quarto), any hints on how to avoid the double display figure? Also, this works now, we should close this issue.

  7. SimonDanisch commented on Jul 28, 2025

    @SimonDanisch
    Member

    I thought i did remove the double display in the update for Makie@0.24:
    https://github.com/MakieOrg/Tyler.jl/blob/master/src/map.jl#L260-L293

  8. asinghvi17 commented on Jul 28, 2025

    @asinghvi17
    Member

    Only if it has been displayed before

    screen = display(m.figure.scene)

  9. lazarusA commented on Jul 28, 2025

    @lazarusA
    Collaborator

    I only observe this with this sequence (and again, this is in Quarto, I haven't checked on Jupyter notebooks):

    using CairoMakie
    CairoMakie.activate!()
    # For maps
    using Tyler
    using Tyler.TileProviders
    
    # london
    provider = Tyler.TileProviders.Esri(:WorldImagery)
    london = Rect2f(-0.0921, 51.5, 0.04, 0.025)
    
    with_theme(theme_dark()) do
        fig = Figure(; size =(650,400))
        ax = Axis(fig[1,1]) # aspect = DataAspect()
        m = Tyler.Map(london; provider, figure=fig, axis=ax)
        wait(m)
        hidedecorations!(ax)
        hidespines!(ax)
        fig
    end
  10. asinghvi17 commented on Jul 28, 2025

    @asinghvi17
    Member

    Ah yeah. If you return the map from there you might be OK and don't call wait on the map? Not sure if that will help.

  11. lazarusA commented on Jul 28, 2025

    @lazarusA
    Collaborator

    no, even without the wait, we still show 2 plots.

  12. asinghvi17 commented on Jul 28, 2025

    @asinghvi17
    Member

    ah that is unfortunate. Then it's probably tied to the architecture that the tyler process keeps running only if there is an active screen...

  13. lazarusA commented on Jul 28, 2025

    @lazarusA
    Collaborator

    however, the following gives me what I want, only one plot 😄, passing that new axis seems to be the issue 🤔

    with_theme(theme_dark()) do
      m=Tyler.Map(london; provider, figure=Figure(; size=(650,400)))
      m.axis.aspect=650/400
      hidedecorations!(m.axis)
      hidespines!(m.axis)
      m
    end

    note: an extra image is displayed on my screen, but not capture in the notebook, the notebook only contains the last one.

  14. alex-s-gardner commented on Nov 22, 2025

    @alex-s-gardner
    ContributorAuthor

    Tyler now produces empty map with CairoMakie

    using CairoMakie 
    using Tyler
    
    tyler = Tyler.Map(Rect2f(-0.0921, 51.5, 0.04, 0.025))
    
    Image

    vs.

    using GLMakie
    tyler = Tyler.Map(Rect2f(-0.0921, 51.5, 0.04, 0.025))
    
    Image
  15. SimonDanisch commented on Nov 25, 2025

    @SimonDanisch
    Member

    I'm guessing its not waiting correctly to load all tiles

  16. dmetivie commented on Jul 4, 2026

    @dmetivie

    It still does not work for me. It would be amazing to have CairoMakie support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions