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

Support for multiple map renderers #134

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

dwoznicki
Copy link

Related: #133

This PR adds a UI control to change the map render at runtime. Here are some notes/questions for the maintainer(s):

  • I created a new style settings page and radio field to swap renderers. Let me know if you think the UI element should go elsewhere.
    image
  • To store the desired renderer, I added a property "fresco:renderer" to the metadata object. I think this is a good way to track the desired renderer, but let me know if you think it should be stored elsewhere.
    image
  • I decided modify MapMapbox.jsx to accept multiple renderers instead of creating a new map component because, as far as I can tell, maplibre-gl v2 is completely backwards compatible with mapbox-gl v1. This may not be the case with other renderers, so perhaps there should be a new map component for each renderer (e.g. MapMapbox.jsx, MapMapLibre.jsx), even if the Mapbox and MapLibre map components are redundant.
  • Running npm install seems to have automatically changed the lock file version to 2, generating a large number of changes to package-lock.json. I believe this is because I'm running node v16.15.0 and npm 8.5.5 on my machine. If this is undesirable, let me know what node version I should be working on.

@dwoznicki dwoznicki changed the title Maplibre renderer Support for multiple map renderers Aug 17, 2022
@ARolek
Copy link
Member

ARolek commented Oct 5, 2022

@dwoznicki just a quick follow up on this PR. It's not lost we have just been navigating several other things. We also had to update the package-lock.json file as the CI was timing out. If you're interested in helping with the linter errors you can see what's happening in the Netlify build on this PR: #136

Thanks again for the contribution.

@dwoznicki
Copy link
Author

@ARolek Well, it looks like the build was failing due to a .map() with a callback that wasn't returning, so I changed that to a .forEach(). Now the build is failing with an Out Of Memory Error, which is a bit harder to solve.

@ARolek
Copy link
Member

ARolek commented Nov 16, 2022

@dwoznicki can you rebase against master? @justenPalmer did some cleanup that should fix the linting errors.

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