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

Add a library of useful locations and allow user additions #119

Open
kateler opened this issue Oct 24, 2022 · 5 comments
Open

Add a library of useful locations and allow user additions #119

kateler opened this issue Oct 24, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@kateler
Copy link

kateler commented Oct 24, 2022

It would be great if Maperture:

  • included a larger list of useful locations for cartography
  • had a way for a user to edit and maintain their own list of bookmarked locations, either in the GUI or in a config file (either is OK)
  • included a small set of recommended locations for showing off a map style (which could be saved to document each release and/or shared with stakeholders)
@kateler kateler added the enhancement New feature or request label Oct 24, 2022
@ebrelsford
Copy link
Contributor

You can currently do this via the config file. The most likely way we'd make that easier to use would be to allow you to specify the config file to use in the URL (#41).

Otherwise if you're using this in a project-specific repo you'd want to update the config file to have the locations you want to include.

@kateler
Copy link
Author

kateler commented Oct 24, 2022

Is there a way to bookmark locations for just me? Or does it need to be for the entire project?

Is there documentation of where the config file is, and how it works (e.g., can there be subfolders)?

FWIW, part of the idea of this issue is that Stamen would curate a larger list of helpful locations and include them in Maperture by default. I can definitely help with that part.

@jsanz
Copy link

jsanz commented Oct 28, 2022

@kateler you can check how locations are defined here:

https://github.com/jsanz/maperture/blob/main/src/make-config.js#L2-L18

Just create in your config a gazetteer property with the same structure (Scenarios and Locations) and you should be good to go. I did that here and got it working nicely

image

@mulloverit
Copy link

Leaving this open for grooming - I think @kateler's questions are worth addressing.

@aparlato
Copy link
Collaborator

aparlato commented Mar 15, 2023

Is there a way to bookmark locations for just me? Or does it need to be for the entire project?

If I'm understanding this correctly: In a project implementation (where Maperture is brought in as a package), you have access to the local.js config in your project and can change these locations as mentioned above. You could change these locally to something you prefer and see the results, but if you don't want to make that the primary gazetteer in the project Github repo, then you need a place to store these, either commented out in the project config or somewhere locally on your machine.

You might set up your project config with multiple gazetteers (some commented out) you can switch out manually?:

const gazetteer = {
  Reference: [
    { Tokyo: { zoom: 12.5, center: { lng: 139.75779, lat: 35.68472 } } }
  ];

// @kateler 's gazetteer
// const gazetteer = {
//  Reference: [
//  { Seattle: { zoom: 11.5, center: { lng: -122.35, lat: 47.595 } } },
//  ]
// };

For the record, if we're talking about a list where each selection contains multiple locations, I'm hesitant to have that feature. It would open up a lot of UX questions like:

  • if I have fewer maps than the number of locations in the option I choose, what map styles should take those additional places?
  • if I have more maps than the number of locations in the option I choose, which map styles are removed or receive duplicate locations?
  • how does the multiple location option interact with the singular location option?

Is there documentation of where the config file is, and how it works (e.g., can there be subfolders)?

There is! See gazetteer under https://github.com/stamen/maperture#local-config. Please let us know if this can/should be improved though! Right now we strictly only allow one level of nesting. I'm open to further nesting if this is helpful!

FWIW, part of the idea of this issue is that Stamen would curate a larger list of helpful locations and include them in Maperture by default. I can definitely help with that part.

I'm curious how we imagine this since Maperture right now is very customizable. Could this just be documentation within the Maperture repo or were you imagining something more?

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

5 participants