MakieOrg / GeoMakie.jl

Geographical plotting utilities for Makie.jl
https://geo.makie.org
MIT License
170 stars 25 forks source link

Package not working with julia 1.10 #192

Open Wissotsky opened 9 months ago

Wissotsky commented 9 months ago

The package seems to be broken when using Julia 1.10 Trying with example code Code:

using GLMakie
using GeoMakie
fig = Figure()
ga = GeoAxis(
    fig[1, 1]; # any cell of the figure's layout
    dest = "+proj=wintri", # the CRS in which you want to plot
    coastlines = true # plot coastlines from Natural Earth, as a reference.
)
scatter!(ga, -120:15:120, -60:7.5:60; color = -60:7.5:60, strokecolor = (:black, 0.2))

Output:

MethodError: no method matching initialize_block!(::GeoAxis; coastlines::Bool)

Closest candidates are:
  initialize_block!(::GeoAxis) got unsupported keyword argument "coastlines"
   @ GeoMakie [C:\Users\Wissotsky\.julia\packages\GeoMakie\zPSZg\src\geoaxis.jl:543](file:///C:/Users/Wissotsky/.julia/packages/GeoMakie/zPSZg/src/geoaxis.jl:543)
  initialize_block!(!Matched::Colorbar) got unsupported keyword argument "coastlines"
   @ Makie [C:\Users\Wissotsky\.julia\packages\Makie\fyNiH\src\makielayout\blocks\colorbar.jl:123](file:///C:/Users/Wissotsky/.julia/packages/Makie/fyNiH/src/makielayout/blocks/colorbar.jl:123)
  initialize_block!(!Matched::IntervalSlider) got unsupported keyword argument "coastlines"
   @ Makie [C:\Users\Wissotsky\.julia\packages\Makie\fyNiH\src\makielayout\blocks\intervalslider.jl:1](file:///C:/Users/Wissotsky/.julia/packages/Makie/fyNiH/src/makielayout/blocks/intervalslider.jl:1)
  ...

Stacktrace:
 [1] _block(T::Type{GeoAxis}, fig_or_scene::Figure, args::Vector{Any}, kwdict::Dict{Symbol, Any}, bbox::Nothing; kwdict_complete::Bool)
   @ Makie [C:\Users\Wissotsky\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:388](file:///C:/Users/Wissotsky/.julia/packages/Makie/fyNiH/src/makielayout/blocks.jl:388)
 [2] _block
   @ Makie [C:\Users\Wissotsky\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:308](file:///C:/Users/Wissotsky/.julia/packages/Makie/fyNiH/src/makielayout/blocks.jl:308) [inlined]
 [3] #_block#1343
   @ Makie [C:\Users\Wissotsky\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:276](file:///C:/Users/Wissotsky/.julia/packages/Makie/fyNiH/src/makielayout/blocks.jl:276) [inlined]
 [4] _block(::Type{GeoAxis}, ::GridPosition; kwargs::@Kwargs{dest::String, coastlines::Bool})
   @ Makie [C:\Users\Wissotsky\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:270](file:///C:/Users/Wissotsky/.julia/packages/Makie/fyNiH/src/makielayout/blocks.jl:270)
 [5] _block
   @ Makie [C:\Users\Wissotsky\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:263](file:///C:/Users/Wissotsky/.julia/packages/Makie/fyNiH/src/makielayout/blocks.jl:263) [inlined]
 [6] #_#1341
   @ Makie [C:\Users\Wissotsky\.julia\packages\Makie\fyNiH\src\makielayout\blocks.jl:254](file:///C:/Users/Wissotsky/.julia/packages/Makie/fyNiH/src/makielayout/blocks.jl:254) [inlined]
 [7] top-level scope
   @ [c:\Users\Wissotsky\Desktop\camcompute\groceryfinder\main.ipynb:4](file:///C:/Users/Wissotsky/Desktop/camcompute/groceryfinder/main.ipynb:4)

It does seem like the tests pass. But I suspect these dont cover the problem.

     Testing Running tests...
Test Summary: | Pass  Total   Time
GeoMakie      |    3      3  33.3s
     Testing GeoMakie tests passed
Ethan-Russell commented 9 months ago

The API changed in v0.6.0. I had to update a couple of things in my usage of GeoAxis as well. Check out the docs for the new API here: https://geo.makie.org/stable/new/

It looks like you need to remove the coastlines argument from the GeoAxis call, and plot them with lines!.