Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activate GeoAxis Maps using a GeoMakie extension #114

Merged
merged 5 commits into from
Dec 23, 2024
Merged

Activate GeoAxis Maps using a GeoMakie extension #114

merged 5 commits into from
Dec 23, 2024

Conversation

asinghvi17
Copy link
Member

@asinghvi17 asinghvi17 commented Nov 27, 2024

This is all fairly generic / public ish API, so I'm happy to have this live in Tyler. The API is exactly the same as base Tyler, all the CRS handling is done internally.

Screenshot 2024-11-27 at 3 15 35 PM

This works very well for static maps. But when scrolling in and out, after some point I will always see this error:

julia> Error in callback:
StackOverflowError:
julia> ┌ Warning: Error while fetching tile on thread 1
│   exception =
│    RequestError: HTTP/1.1 302 Found (Operation timed out after 4999 milliseconds with 0 bytes received) while requesting https://map1.vis.earthdata.nasa.gov/wmts-webmerc/VIIRS_CityLights_2012/default//GoogleMapsCompatible_Level8/7/49/31.jpg
│    Stacktrace:
│      [1] (::Downloads.var"#9#19"{IOBuffer, Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, Nothing, String, Bool, Bool})(easy::Downloads.Curl.Easy)
│        @ Downloads ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/Downloads/src/Downloads.jl:452
│      [2] with_handle(f::Downloads.var"#9#19"{IOBuffer, Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, Nothing, String, Bool, Bool}, handle::Downloads.Curl.Easy)
│        @ Downloads.Curl ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/Downloads/src/Curl/Curl.jl:105
│      [3] #8
│        @ ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/Downloads/src/Downloads.jl:363 [inlined]
│      [4] arg_write(f::Downloads.var"#8#18"{Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, Nothing, String, Bool, Bool}, arg::IOBuffer)
│        @ ArgTools ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/ArgTools/src/ArgTools.jl:134
│      [5] #7
│        @ ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/Downloads/src/Downloads.jl:362 [inlined]
│      [6] arg_read
│        @ ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/ArgTools/src/ArgTools.jl:76 [inlined]
│      [7] request(url::String; input::Nothing, output::IOBuffer, method::Nothing, headers::Vector{Pair{String, String}}, timeout::Float64, progress::Nothing, verbose::Bool, debug::Nothing, throw::Bool, downloader::Downloads.Downloader, interrupt::Nothing)
│        @ Downloads ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/Downloads/src/Downloads.jl:361
│      [8] request
│        @ ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/Downloads/src/Downloads.jl:328 [inlined]
│      [9] #3
│        @ ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/Downloads/src/Downloads.jl:259 [inlined]
│     [10] arg_write(f::Downloads.var"#3#4"{Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Downloads.Downloader, String}, arg::IOBuffer)
│        @ ArgTools ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/ArgTools/src/ArgTools.jl:134
│     [11] #download#2
│        @ ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/Downloads/src/Downloads.jl:258 [inlined]
│     [12] download
│        @ ~/.julia/juliaup/julia-1.11.1+0.x64.apple.darwin14/share/julia/stdlib/v1.11/Downloads/src/Downloads.jl:247 [inlined]
│     [13] download_tile_data(dl::Tyler.ByteDownloader, provider::Provider, url::String)
│        @ Tyler ~/.julia/dev/Tyler/src/downloader.jl:20
│     [14] fetch_tile
│        @ ~/.julia/dev/Tyler/src/tiles.jl:101 [inlined]
│     [15] (::Tyler.var"#6#7"{Tyler.ByteDownloader, Provider, Tile})()
│        @ Tyler ~/.julia/dev/Tyler/src/tiles.jl:48
│     [16] get!(default::Tyler.var"#6#7"{Tyler.ByteDownloader, Provider, Tile}, lru::LRUCache.LRU{String, Union{Nothing, Matrix{RGB{FixedPointNumbers.N0f8}}}}, key::String)
│        @ LRUCache ~/.julia/packages/LRUCache/ctUcD/src/LRUCache.jl:169
│     [17] run_loop(dl::Tyler.ByteDownloader, tile_queue::Channel{Tile}, fetched_tiles::LRUCache.LRU{String, Union{Nothing, Matrix{RGB{FixedPointNumbers.N0f8}}}}, provider::Provider, downloaded_tiles::Channel{Tuple{Tile, Union{Nothing, Matrix{RGB{FixedPointNumbers.N0f8}}}}})
│        @ Tyler ~/.julia/dev/Tyler/src/tiles.jl:46
│     [18] (::Tyler.var"#10#13"{Provider, Channel{Tile}, Channel{Tuple{Tile, Union{Nothing, Matrix{RGB{FixedPointNumbers.N0f8}}}}}, LRUCache.LRU{String, Union{Nothing, Matrix{RGB{FixedPointNumbers.N0f8}}}}, Tyler.ByteDownloader})()
│        @ Tyler ~/.julia/dev/Tyler/src/tiles.jl:90
└ @ Tyler ~/.julia/dev/Tyler/src/tiles.jl:61


     [1] invokelatest(::Any, ::Any, ::Vararg{Any})
       @
julia> 

     [2] (::Observables.OnAny)(value::Any)

julia> Observables.jl:420

     [3] #invokelatest#2

julia> ./essentials.jl:1055 [inlined]
     [4] invokelatest
       @ ./essentials.jl:1052 [inlined]
     [5] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
     [6] setindex!(observable::Observable, val::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123
     [7] (::Observables.SetindexCallback)(x::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:148
     [8] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
     [9] invokelatest
       @ ./essentials.jl:1052 [inlined]
    [10] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
    [11] (::GeoMakie.var"#38#53"{Observable{Vector{GeometryBasics.Point{2, Float64}}}, Observable{Vector{String}}})(spine::Vector{@NamedTuple{input::GeometryBasics.Point{2, Float64}, projected::GeometryBasics.Point{2, Float64}, dir::GeometryBasics.Point{2, Float64}, intersect_dir::GeometryBasics.Point{2, Float64}}}, offset::Float64, size::Float64)
       @ GeoMakie ~/.julia/dev/GeoMakie/src/geoaxis.jl:670
    [12] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
       @ Base ./essentials.jl:1055
    [13] invokelatest(::Any, ::Any, ::Vararg{Any})
       @ Base ./essentials.jl:1052
    [14] (::Observables.OnAny)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:420
    [15] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
    [16] invokelatest
       @ ./essentials.jl:1052 [inlined]
    [17] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
    [18] setindex!
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123 [inlined]
    [19] (::GeoMakie.var"#34#46"{Observable{Vector{@NamedTuple{input::GeometryBasics.Point{2, Float64}, projected::GeometryBasics.Point{2, Float64}, dir::GeometryBasics.Point{2, Float64}, intersect_dir::GeometryBasics.Point{2, Float64}}}}, Observable{Vector{@NamedTuple{input::GeometryBasics.Point{2, Float64}, projected::GeometryBasics.Point{2, Float64}, dir::GeometryBasics.Point{2, Float64}, intersect_dir::GeometryBasics.Point{2, Float64}}}}, Camera})(spines::GeoMakie.Spines, pv::StaticArraysCore.SMatrix{4, 4, Float64, 16}, area::GeometryBasics.HyperRectangle{2, Int64})
       @ GeoMakie ~/.julia/dev/GeoMakie/src/geoaxis.jl:652
    [20] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
       @ Base ./essentials.jl:1055
    [21] invokelatest(::Any, ::Any, ::Vararg{Any})
       @ Base ./essentials.jl:1052
    [22] (::Observables.OnAny)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:420
    [23] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
    [24] invokelatest
       @ ./essentials.jl:1052 [inlined]
    [25] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
    [26] (::GeoMakie.var"#33#45"{GeoAxis, Observable{GeoMakie.Spines}, Observable{Vector{GeometryBasics.Point{2, Float64}}}, Observable{Vector{GeometryBasics.Point{2, Float64}}}, Observable{Any}})(user_xticks::MakieCore.Automatic, user_yticks::MakieCore.Automatic, trans::Proj.Transformation, fl::GeometryBasics.HyperRectangle{2, Float64}, vp::GeometryBasics.HyperRectangle{2, Int64})
       @ GeoMakie ~/.julia/dev/GeoMakie/src/geoaxis.jl:603
    [27] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
       @ Base ./essentials.jl:1055
    [28] invokelatest(::Any, ::Any, ::Vararg{Any})
       @ Base ./essentials.jl:1052
    [29] (::Observables.OnAny)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:420
    [30] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
    [31] invokelatest
       @ ./essentials.jl:1052 [inlined]
    [32] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
    [33] setindex!(observable::Observable, val::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123
    [34] (::Observables.MapCallback)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:436
--- the above 5 lines are repeated 1 more time ---
    [40] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
    [41] invokelatest
       @ ./essentials.jl:1052 [inlined]
    [42] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
    [43] setindex!(observable::Observable, val::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123
    [44] update_computedbbox!(computedbbox::Observable{GeometryBasics.HyperRectangle{2, Float32}}, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32}, alignment::Tuple{Float32, Float32}, reporteddimensions::GridLayoutBase.Dimensions, alignmode::Inside, protrusions::GridLayoutBase.RectSides{Float32}, sizeattrs::Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, autosizeobservable::Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}})
       @ GridLayoutBase ~/.julia/packages/GridLayoutBase/xvxWi/src/layoutobservables.jl:356
    [45] (::GridLayoutBase.var"#106#108"{Observable{GridLayoutBase.Dimensions}, Observable{Tuple{Union{Nothing, Float32, Auto, Fixed, Relative}, Union{Nothing, Float32, Auto, Fixed, Relative}}}, Observable{Tuple{Union{Nothing, Float32}, Union{Nothing, Float32}}}, Observable{Any}, Observable{GridLayoutBase.RectSides{Float32}}, Observable{GeometryBasics.HyperRectangle{2, Float32}}})(sbbox::GeometryBasics.HyperRectangle{2, Float32}, ali::Tuple{Float32, Float32})
       @ GridLayoutBase ~/.julia/packages/GridLayoutBase/xvxWi/src/layoutobservables.jl:218
    [46] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
       @ Base ./essentials.jl:1055
    [47] invokelatest(::Any, ::Any, ::Vararg{Any})
       @ Base ./essentials.jl:1052
    [48] (::Observables.OnAny)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:420
    [49] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
    [50] invokelatest
       @ ./essentials.jl:1052 [inlined]
    [51] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
    [52] setindex!(observable::Observable, val::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123
    [53] align_to_bbox!(gl::GridLayout, suggestedbbox::GeometryBasics.HyperRectangle{2, Float32})
       @ GridLayoutBase ~/.julia/packages/GridLayoutBase/xvxWi/src/gridlayout.jl:1096
    [54] (::GridLayoutBase.var"#11#12"{GridLayout})(bbox::GeometryBasics.HyperRectangle{2, Float32})
       @ GridLayoutBase ~/.julia/packages/GridLayoutBase/xvxWi/src/gridlayout.jl:158
    [55] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
    [56] invokelatest
       @ ./essentials.jl:1052 [inlined]
    [57] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
    [58] update!(gl::GridLayout)
       @ GridLayoutBase ~/.julia/packages/GridLayoutBase/xvxWi/src/gridlayout.jl:193
    [59] update!
       @ ~/.julia/packages/GridLayoutBase/xvxWi/src/gridlayout.jl:1525 [inlined]
    [60] (::GridLayoutBase.var"#14#15"{GridLayoutBase.GridContent{GridLayout}, GeoAxis})(c::GridLayoutBase.Dimensions)
       @ GridLayoutBase ~/.julia/packages/GridLayoutBase/xvxWi/src/gridlayout.jl:261
    [61] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
    [62] invokelatest
       @ ./essentials.jl:1052 [inlined]
    [63] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
    [64] setindex!(observable::Observable, val::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123
    [65] (::Observables.MapCallback)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:436
--- the above 5 lines are repeated 2 more times ---
--- the above 68 lines are repeated 366 more times ---
 [24964] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
 [24965] invokelatest
       @ ./essentials.jl:1052 [inlined]
 [24966] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
 [24967] (::GeoMakie.var"#38#53"{Observable{Vector{GeometryBasics.Point{2, Float64}}}, Observable{Vector{String}}})(spine::Vector{@NamedTuple{input::GeometryBasics.Point{2, Float64}, projected::GeometryBasics.Point{2, Float64}, dir::GeometryBasics.Point{2, Float64}, intersect_dir::GeometryBasics.Point{2, Float64}}}, offset::Float64, size::Float64)
       @ GeoMakie ~/.julia/dev/GeoMakie/src/geoaxis.jl:670
 [24968] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
       @ Base ./essentials.jl:1055
 [24969] invokelatest(::Any, ::Any, ::Vararg{Any})
       @ Base ./essentials.jl:1052
 [24970] (::Observables.OnAny)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:420
 [24971] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
 [24972] invokelatest
       @ ./essentials.jl:1052 [inlined]
 [24973] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
 [24974] setindex!
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123 [inlined]
 [24975] (::GeoMakie.var"#34#46"{Observable{Vector{@NamedTuple{input::GeometryBasics.Point{2, Float64}, projected::GeometryBasics.Point{2, Float64}, dir::GeometryBasics.Point{2, Float64}, intersect_dir::GeometryBasics.Point{2, Float64}}}}, Observable{Vector{@NamedTuple{input::GeometryBasics.Point{2, Float64}, projected::GeometryBasics.Point{2, Float64}, dir::GeometryBasics.Point{2, Float64}, intersect_dir::GeometryBasics.Point{2, Float64}}}}, Camera})(spines::GeoMakie.Spines, pv::StaticArraysCore.SMatrix{4, 4, Float64, 16}, area::GeometryBasics.HyperRectangle{2, Int64})
       @ GeoMakie ~/.julia/dev/GeoMakie/src/geoaxis.jl:652
 [24976] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
       @ Base ./essentials.jl:1055
 [24977] invokelatest(::Any, ::Any, ::Vararg{Any})
       @ Base ./essentials.jl:1052
 [24978] (::Observables.OnAny)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:420
 [24979] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
 [24980] invokelatest
       @ ./essentials.jl:1052 [inlined]
 [24981] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
 [24982] (::GeoMakie.var"#33#45"{GeoAxis, Observable{GeoMakie.Spines}, Observable{Vector{GeometryBasics.Point{2, Float64}}}, Observable{Vector{GeometryBasics.Point{2, Float64}}}, Observable{Any}})(user_xticks::MakieCore.Automatic, user_yticks::MakieCore.Automatic, trans::Proj.Transformation, fl::GeometryBasics.HyperRectangle{2, Float64}, vp::GeometryBasics.HyperRectangle{2, Int64})
       @ GeoMakie ~/.julia/dev/GeoMakie/src/geoaxis.jl:603
 [24983] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
       @ Base ./essentials.jl:1055
 [24984] invokelatest(::Any, ::Any, ::Vararg{Any})
       @ Base ./essentials.jl:1052
 [24985] (::Observables.OnAny)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:420
 [24986] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
 [24987] invokelatest
       @ ./essentials.jl:1052 [inlined]
 [24988] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
 [24989] setindex!(observable::Observable, val::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123
 [24990] (::Observables.MapCallback)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:436
 [24991] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
 [24992] invokelatest
       @ ./essentials.jl:1052 [inlined]
 [24993] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
 [24994] setindex!(observable::Observable, val::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123
 [24995] adjustlimits!(la::GeoAxis)
       @ Makie ~/.julia/dev/Makie/src/makielayout/blocks/axis.jl:990
 [24996] (::GeoMakie.var"#60#63"{GeoAxis})(::GeometryBasics.HyperRectangle{2, Int64}, ::GeometryBasics.HyperRectangle{2, Float64})
       @ GeoMakie ~/.julia/dev/GeoMakie/src/makie-axis.jl:32
 [24997] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
       @ Base ./essentials.jl:1055
 [24998] invokelatest(::Any, ::Any, ::Vararg{Any})
       @ Base ./essentials.jl:1052
 [24999] (::Observables.OnAny)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:420
 [25000] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
 [25001] invokelatest
       @ ./essentials.jl:1052 [inlined]
 [25002] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
 [25003] setindex!(observable::Observable, val::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123
 [25004] process_interaction(s::Makie.ScrollZoom, event::ScrollEvent, ax::GeoAxis)
       @ GeoMakie ~/.julia/dev/GeoMakie/src/makie-axis.jl:456
 [25005] process_axis_event(ax::GeoAxis, event::ScrollEvent)
       @ Makie ~/.julia/dev/Makie/src/makielayout/blocks/axis.jl:15
 [25006] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
       @ Base ./essentials.jl:1055
 [25007] invokelatest(::Any, ::Any, ::Vararg{Any})
       @ Base ./essentials.jl:1052
 [25008] (::Observables.OnAny)(value::Any)
       @ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:420
 [25009] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
 [25010] invokelatest
       @ ./essentials.jl:1052 [inlined]
 [25011] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
 [25012] setindex!
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123 [inlined]
 [25013] (::Makie.var"#1640#1642"{Scene, Observable{ScrollEvent}})(s::Tuple{Float64, Float64})
       @ Makie ~/.julia/dev/Makie/src/makielayout/blocks/axis.jl:33
 [25014] #invokelatest#2
       @ ./essentials.jl:1055 [inlined]
 [25015] invokelatest
       @ ./essentials.jl:1052 [inlined]
 [25016] notify
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
 [25017] setindex!
       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123 [inlined]
 [25018] (::GLMakie.ScrollUpdater)(window::GLFW.Window, w::Float64, h::Float64)
       @ GLMakie ~/.julia/dev/Makie/GLMakie/src/events.jl:241
 [25019] _ScrollCallbackWrapper(window::GLFW.Window, xoffset::Float64, yoffset::Float64)
       @ GLFW ~/.julia/packages/GLFW/wmoTL/src/callback.jl:43
 [25020] PollEvents
       @ ~/.julia/packages/GLFW/wmoTL/src/glfw3.jl:702 [inlined]
 [25021] pollevents(screen::GLMakie.Screen{GLFW.Window}, frame_state::Makie.TickState)
       @ GLMakie ~/.julia/dev/Makie/GLMakie/src/screen.jl:485
 [25022] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
       @ GLMakie ~/.julia/dev/Makie/GLMakie/src/screen.jl:935
 [25023] renderloop(screen::GLMakie.Screen{GLFW.Window})
       @ GLMakie ~/.julia/dev/Makie/GLMakie/src/screen.jl:963

@rafaqz
Copy link
Collaborator

rafaqz commented Nov 27, 2024

Got an MWE for that so I can have a look?

@asinghvi17
Copy link
Member Author

Oops I didn't comment earlier - any example from the readme/docs will work but pass a GeoAxis to axis. The extension handles the rest.



# Here, the `area` has already been transformed to the tile CRS
function Tyler.get_tiles_for_area(m::Map{GeoAxis}, scheme::Halo2DTiling, area::Union{Rect,Extent})
Copy link
Member Author

@asinghvi17 asinghvi17 Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only has to be replicated because the mouseposition has to be inverse-transformed. I don't like the code duplication but that seems like the easiest thing to me...

@rafaqz
Copy link
Collaborator

rafaqz commented Dec 21, 2024

Oops I didn't comment earlier - any example from the readme/docs will work but pass a GeoAxis to axis. The extension handles the rest.

MWE would really help though, this seems a long way from generally working and things I'm trying the tiles don't load at all.

What code made the plot you have above?

@asinghvi17
Copy link
Member Author

asinghvi17 commented Dec 22, 2024

mwe:

fig = Figure()
ax = GeoAxis(fig[1, 1])

# plot
b = Rect2f(-20.0, -20.0, 40.0, 40.0)
m = Tyler.Map(b, figure = fig, axis = ax)

It's somehow very blurry in WGLMakie, I'm not sure why though.

@asinghvi17 asinghvi17 changed the title [WIP] Activate GeoAxis Maps using a GeoMakie extension Activate GeoAxis Maps using a GeoMakie extension Dec 23, 2024
@asinghvi17
Copy link
Member Author

Needs docs and tests now, but seems to work.

@rafaqz
Copy link
Collaborator

rafaqz commented Dec 23, 2024

Ok this is working great. The only bug I'm seeing is the selected area zoom selects an area in the wrong spot. But mouse scroll zooming goes to the right spot.

I'm happy to merge without docs and tests for now so we can get it working with other PRs

@lazarusA lazarusA merged commit 27dc936 into master Dec 23, 2024
3 checks passed
@lazarusA lazarusA deleted the geomakie branch December 23, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants