Skip to content

Tyler.PlotConfig docs have broken example #151

@joshday

Description

@joshday

The docstring has this example:

  using Tyler, GLMakie
  
  config = PlotConfig(
      preprocess = (data) -> data .+ 1,
      postprocess = (plot) -> translate!(plot, 0, 0, 1),
      color = :red
  )
  lat, lon = (52.395593, 4.884704)
  delta = 0.1
  extent = Extent(; X=(lon - delta / 2, lon + delta / 2), Y=(lat - delta / 2, lat + delta / 2))
  Tyler.Map(extent; provider=Tyler.TileProviders.Esri(:WorldImagery), plot_config=config)

The last line generates many warnings and a blank plot:

┌ Warning: error while creating tile
│   exception =
│    MethodError: no method matching +(::RGB{FixedPointNumbers.N0f8}, ::Int64)
...

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