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

Allow drawing image-based base maps #7

Open
nighthawk opened this issue Dec 10, 2022 · 1 comment
Open

Allow drawing image-based base maps #7

nighthawk opened this issue Dec 10, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@nighthawk
Copy link
Member

Currently there's only support for drawing GeoJSON, i.e., lines and polygons, but it'd be great to draw images:

@nighthawk nighthawk added the enhancement New feature or request label Dec 10, 2022
@nighthawk nighthawk changed the title Allow drawing image-based basemaps Allow drawing image-based base maps Dec 10, 2022
@nighthawk
Copy link
Member Author

One way to do this (see Map-Projections repo):

  1. Go through each pixel to be drawn
  2. Use the inverse (Add inverse function to Projection protocol #6) function to get the un-projected coordinate
  3. Look-up that coordinate in the reference image and get the average colour
  4. Draw that colour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant