metamaps icon indicating copy to clipboard operation
metamaps copied to clipboard

Enable maps to have unplaced topics (no set coordinates)

Open devvmh opened this issue 9 years ago • 7 comments

the issue as framed for design: https://trello.com/c/xzi8X8s2/55-enable-maps-to-have-unplaced-topics-no-set-coordinates

the issue as framed from the users perspective: https://trello.com/c/YJN6UKGt/30-enable-maps-to-have-unplaced-topics-no-set-position

Currently if you import topics they can be auto laid-out, but if you use the API you can't.

It would be great to have two systems available to API users. They could specify topic "position" as "auto-layout" or "prompt-user"

Auto layout would use the current algorithm to automatically add the topics to the map.

Prompt user would prompt the next user to visit the map to place the topics

devvmh avatar Oct 26 '16 04:10 devvmh

so potentially this means implementing an 'auto-layout' algo in the backend yeah? Exploring that...

Simplest and still useful thing I can think of is

  1. deciding the amount of space between topics in any given direction we'd like the new topic to have
  2. start at the origin and spiral outward looking for the first coordinate that fulfills those space requirements, and save the xloc and yloc of the mapping as that

Connoropolous avatar Oct 28 '16 19:10 Connoropolous

I am reallllly interested in this one. There are a LOT of scenarios that I can think of where topics are being added to the map without knowing where precisely to position it.

Later we could also develop the 'let me decide when I view the map' option

Connoropolous avatar Oct 28 '16 19:10 Connoropolous

I think we should use the exact same algorithm as the frontend, and uodate both algoritms to check if a topic already exists at a given location

On Sat, Oct 29, 2016, 3:42 AM Connor Turland [email protected] wrote:

I am reallllly interested in this one. There are a LOT of scenarios that I can think of where topics are being added to the map without knowing where precisely to position it.

Later we could also develop the 'let me decide when I view the map' option

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/metamaps/metamaps/issues/847#issuecomment-257010532, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVELEUGGeX8_uaN3TLZJG-wukXdPl6qks5q4lAQgaJpZM4Kgwge .

devvmh avatar Oct 29 '16 01:10 devvmh

I think the definition of 'topic exists at a given location' should include a certain amount of spacing in between the topics too :)

Connoropolous avatar Oct 29 '16 01:10 Connoropolous

That would be ideal, but even checking the pixel perfect location solves the major problem (which is - if I auto layout a bunch of topics, wait 5 minutes, then auto layout more, it works smoothly). Currently our JS version will drop them on top of each other if you import some, reload the page, and import more.

But yeah, if we made a 5x5 pixel square that would help a lot too. We could get as intelligent as we wanted I guess

devvmh avatar Oct 29 '16 01:10 devvmh

Actually, I do have it so that it looks for ones in the exact locations, and recurses until it finds the first empty spot, according to how the algo places them

Connoropolous avatar Oct 29 '16 01:10 Connoropolous

@harlantwood made another issue previously about 'algorithmic layouts' which I am going to close, but only because we are actively working on that issue, and this issue will be the primary one for that work.

he said: "I'm interested in creating maps from an external app, using the emerging token based API. I don't want to specify layout; ideally I'd like the map laid out in a sensible and pleasing way." https://github.com/metamaps/metamaps/issues/485

Connoropolous avatar Jan 14 '17 08:01 Connoropolous