maperture icon indicating copy to clipboard operation
maperture copied to clipboard

Add a library of useful locations and allow user additions

Open kateler opened this issue 3 years ago • 5 comments

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 avatar Oct 24 '22 19:10 kateler

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.

ebrelsford avatar Oct 24 '22 20:10 ebrelsford

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.

kateler avatar Oct 24 '22 20:10 kateler

@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

jsanz avatar Oct 28 '22 12:10 jsanz

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

mulloverit avatar Mar 15 '23 14:03 mulloverit

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?

aparlato avatar Mar 15 '23 14:03 aparlato