shannonturner / metro-map-maker Goto Github PK
View Code? Open in Web Editor NEWBuild the Metro system of your dreams: create your own metro maps, save them, and share with friends!
Home Page: https://metromapmaker.com/
Build the Metro system of your dreams: create your own metro maps, save them, and share with friends!
Home Page: https://metromapmaker.com/
I'm in problems
Right now maps have a transparent background which displays as white during editing.
You could flood fill to get a different color if you wanted, but being able to set a background color instead would make maps load a lot faster.
From Youtube:
Nice update! Can you make an option to change the background to any color? It would be more convenient than having to use the fill tool and select a color on the draw rail line thing.
When reviewing maps in the gallery, it can be difficult to tell similar maps apart especially when the changes are small.
Was it just a new station added? Or a change in the orientation of a station label?
Or were the changes more sweeping?
Which version of a similar map should be kept? It's probably a safe assumption that the most recent version should be kept, but I should make sure.
A Map Diff feature in the gallery would help with this.
From Youtube:
As someone who has been obsessed with making maps in your site the past three months, it's very exciting to see the new changes! Just a suggestion: Is it possible to add a measure line feature? The only downside for me is having to count the squares so everything is well distributed :p
Thematically feels related to #34, and maybe will be part of the select feature, telling you how many squares you get w/h.
Currently, the public gallery loads a lot of <img>
tags with base64-encoded maps.
This caches and compresses well, so it loads extremely quickly even though it's not the most obvious implementation.
With .png
and .svg
thumbnails being stored on disk, it may be worth exploring alternative loading strategies like lazy loading images.
Related to #55
The admin gallery needs an update, it's only barely v6 compatible and has a lot of newly-unused code than can be deleted.
While here, should probably change how the public gallery is generated. Will open a separate issue.
I've gotten by this far without it, but it would be really useful to have better admin tooling, like being able to search for maps by station name within a nice, easy-to-use form.
I'd be so curious to see how maps have evolved over time -- maybe I can put together a way to animate two or more SVGs to see the progression of a metro system?
I bet this would be really cool looking!
At WMATA HQ, one of the planners suggested adding a feature to select a portion of the map, which could then be moved or expanded independently from the rest of the map.
This would be especially useful when re-spacing certain sections of the map without having to delete and re-do the whole section.
From Youtube:
When two or more lines are drawn on top of each other, (Example: Using the fill tool to make water) it creates this weird lumpy effect on the lines. Not a huge big deal, but it can definitely make the map look a bit weird, or unintentionally displeasing to look at. If you change make it so that the lines didn’t look lumpy when over lapping each other in the update, that’d be great!
This is especially noticeable when using flood fill.
First, there's a purple line:
After flood fill, it's very difficult to see at all:
Reducing the line width to 12.5% makes it clearer what's happening here:
Here, you can see that the water is connecting across the purple line.
To avoid accidental deletion of work! :)
The tags "real", "speculative", and "unknown" are fine, but are a bit broad.
Is this the best way to layout these maps? Now there's /calendar/
which is great, but how else might be good to view maps?
Consider:
What else?
Adding several validator tests for valid and invalid map json blobs will help me feel more confident that I'm not introducing new bugs when I expand available grid sizes
Currently, the station orientations Above 90º and Below 90º exist, but having labels appearing above or below a station without any rotation has also been requested.
Centering seems like the only snag, though in JS this seems fairly easy since I can .measureText()
; I'll have to see if there's a similar option for SVG.
Being able to set an image of the city you want to design a map for would probably make it easier to get an approximate layout for the plan done. To avoid copyright stuff (and since it wouldn't fit with the idea of the metro plan anyway) it would just need to be there in the editing phase and not in the export.
For all the night owls making maps into the small hours, add a toggleable option.
Best if it applies site-wide, including on the calendar and gallery.
A frequently-requested feature on both reddit and youtube is to be able to mix and match line widths similar to how you can mix and match station styles.
This would have the benefit of allowing all 28 possible station shapes to be used within the same map, and give a great deal of flexibility to map styles.
From email:
it might be possible to benefit from the option to broaden your 90° upward vertical and 90° downward vertical station name labeling options: namely, giving the text of both vertical options a "facing left" or "facing right" choice
Kinda similar to the London style; distinguishable from the current "Rectangle" style by not always being centered / possibly adapting based on the line direction and/or the station orientation.
Would want to figure out the specifics here first; the main drawback of the London style is that the station markers are fairly small.
London-style also requested on reddit.
Kind of a weird feature but I'm kinda curious: what are the most popular user-chosen colors?
Maybe this would be a good offering for #41.
From email:
Can there be a feature where I can search up a map name? For example, if I want to search up “Minecraft”, all maps labeled Minecraft will pop up.
Some users have requested the ability to add free text onto a map, without a station involved.
Probably the easiest way to add this without major changes to the data model or rendering engine would bet o create a new station style that has no rendered appearance and only displays the text. The main challenge here would be in displauing/selecting the hidden stations, or having them clickable while not rendering them during editing.
A more complex implementation would add true free text as an option. Worth considering which option is better, because I probably won't add both!
If you're here and would like to vote:
🎉 : Use the existing stations to add free text, just add an option to make the station marker hidden
❤️ : Add a free text button that isn't part of the stations
This would be a really good feature as me and other people share maps on apps like discord regularly and it would be very convenient if it could show an images of the map we are sharing with the link.
Requested by users on reddit and youtube.
Probably most useful for lines that are under construction.
Should make it a separate setting from the line widths, not a different type of line width.
Options: Solid (default), dashed, dotted
For SVG implentation: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray
For JS implementation: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash
The admin view "Similar Maps" is really useful, and it would be nice to add this as an option to the rating view to see whether there are other versions of the same map.
Important: before I release this more broadly, I'd need to significantly improve the performance of this view.
Expanding the available grid size would allow larger maps to be created and cities like NYC and Chicago to have maps of their metro systems.
While adding more squares to the grid is trivial, careful attention will need to be paid to the validator script and most importantly to the grid-to-canvas-image converter.
The current (original) size of the grid is 80x80 (6400 squares)
I think maybe creating a Resize Grid button / feature would be good to do.
The Resize Grid button should expand with options when clicked, and have an option to hide the Resize options. It should have a warning like "Careful: if you resize a larger map onto a smaller grid, you'll lose your work!" similar to how I warn on the "Move map" feature.
Sizes that I think might make sense include:
Maybe extra large is overkill, but I wonder what people might do with all that extra space?
If a singleton square station is replaced with a non-singleton square station (which is smaller), there's an overlap until the next drawCanvas()
call:
One potential solution would be to check for a station in the neighboring 8 points of the just-drawn point; if so, call drawCanvas()
for stations only.
Depending on how I address #46, that may address this too.
To reproduce:
With a single given map:
Calculate levenstein or other similarity score to all other maps
Show most similar maps on a single page
This could be useful as an enhancement to the existing Gallery View. Sometimes similar maps are distributed across several pages, which makes it difficult to know which one(s) to hide.
Hi,
I would like to programmatically create a map and generate the image offline.
Do you think it's possible?
I know Python but not Django and I have difficulty to found where the map format is implemented.
Any guidance?
Thanks
This can wait until after users have rated (liked, disliked) maps for a while, but I'm really curious to see what the highest-rated maps are, and I think others would be interested too!
Probably will link to this in the top navbar and from /gallery/
From Youtube:
Hello! I have been using metro map maker for so long now and it's been really cool because it brings my head cannon into reality! The line width adjustability is SO COOL and I literally jumped in excitement (not even joking). I currently have 3 huge metro systems and they look kind of plain. This new update will bring SO MUCH MORE. I cannot express how excited I am. I know this is really hard to do, but for a suggestion in the future, you can make a google doc like system, where there is a home screen that contains all of the saved maps on your account (which is the hard part), and then it would be so convenient. I know this is difficult so if that's not possible, I don't care, this website is already INSANE as it is. KEEP UP THE GOOD WORK!!!!
Some of my thoughts about a potential login system are detailed at https://metromapmaker.com/help/#faqs-autosave, but the most important idea here should be that a login system should be 100% optional and you should be able to create maps without a login.
I think being able to save maps whether or not you made them yourself seems useful and in line with this request.
Right now you can add emoji to a station name, but what if there was a bank of "stickers" or symbols that could be added?
These could be added to the canvas via .drawImage()
(https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage), and inclusion in SVGs would be trivial (assuming the stickers/symbols were SVGs as well).
These could be especially useful for insets, legends, the Metro "M", etc.
It is not a real issue, but it would be useful to have it (and it might be easy to implement)
When maps can mix and match line widths (dependent on #30) and/or styles (dependent on #31), it may be useful to be able to have flood fill also change the line widths and/or styles.
(By default, flood fill would likely only set flood-filled portion to the active color.)
This might get confusing quickly, and it might be good to have multiple modes, though this would require a lot of options. Worth thinking through this carefully and identifying the simplest implementation.
Clicking and dragging fills (or erases) all cells except the first one. Reproduce: drag orange line from (1,1) to (1,4). Only (1,2), (1,3), (1,4) are filled. Expected behavior is inclusive filling, i.e. also fill the starting cell (1,1).
It seems to me like trying to make a metro map on mobile / tablet would be pretty time-consuming and potentially annoying compared to on desktop (especially since it would be hard to see the finished product in total), but maybe there's demand for it?
Explore whether it's easy to add better support for mobile. Sam in #13 correctly identified the problem is that the drawing features expect a single touch, so clicking and dragging doesn't translate well to mobile.
Rather than showing a blank slate, it might be more intuitive if the default map were the Metro.
(But only for first-time visitors with no localstorage / not using a loaded MapURL)
Being able to undo is useful, but being able to redo if you undo too far would also be useful.
While here, undo and redo should maybe get their own buttons?
Some color choices look visually very nice together; it might be helpful to offer a handful of different options to choose from or quickly add to your map.
There's already some precedent for this, since the WMATA colors are offered if you don't have any.
As requested on Youtube, it would be nice to have a bank of additional fonts besides the default Helvetica.
Note that any additional fonts should be widely-accessible and preferably have a useful fallback.
I'll also need to figure out whether this has any impact on my SVG maps, or the PNG maps generated from the SVGs.
Currently my process to view newly-created maps is slower than I would like.
I would like to create a new admin page that lets me view canvas images of every map saved with the Save & Share Map feature.
The "eraser marks" you see when you draw a line and then erase it are because erasing works by drawing an equally-sized white line or circle above the existing color. This is especially noticeable when zoomed in by a lot.
I quite like the charming look of the eraser marks, and they'll go away on the next call to drawCanvas()
, but I could probably either call drawCanvas()
more often than I do now that it's so much faster than before, or find another way to handle erasing.
From Youtube:
When you start drawing lines, for some reason there this weird effect where there’s these thin little white semi circle outlines along the line. It’s hard to see and you might not notice it, but if you look closely it’s not hard to see. Also, when you use the eraser tool to erase a line, there’s this weird ghost effect where there’s a thin outline of where the line used to be. There also a weird effect when lines are drawn on top of lines. It’s this weird bumpy unsmooth effect when they’re place on top of each other. All of these things make it a bit difficult to see how the final map is going to be without having to export, or reload it every time.
Right now, maps at /calendar/2024/04/14/
are displayed from newest to oldest, but maps created early in the day won't be seen as readily due to pagination.
If performant, consider removing the pagination (or raising the limit to be higher).
Alternatively, consider sorting by maps with the most likes.
This may help highlight the most advanced version of a map when a day has multiple versions of a map in progress, but doesn't help much if a map is created over multiple days.
Having different font sizes for station text, including being able to mix and match sizes.
For instance, being able to display station names in the primary and secondary languages.
From Youtube:
I would love a feature that allowed us to be able to manually split into lines very long several-word names like "Vichuquen Huapí–Western Terminal" so it does not take so much space it end up clashing with other names no matter in which direction you put it if the station is in a very transit dense area. I also think public transit maps should reflect their users and part of that is multilingual station names, and so I would like a feature that allows for the display of secondary names (to write in romanizations or translations underneath, so I can, for example, put Hospital General under 病院一般 instead of it all being on a single line)
Frequently-requested feature on both reddit and youtube has been to increase the maximum map size.
The main constraints:
Size | Grid Squares |
---|---|
80 | 6,400 |
120 | 14,400 |
160 | 25,600 |
200 | 40,000 |
240 | 57,600 |
320 | 102,400 |
360 | 129,600 |
480 | 230,400 |
640 | 409,600 |
Compared to: | 80 | 120 | 160 | 200 | 240 | 320 | 360 | 480 | 640 |
---|---|---|---|---|---|---|---|---|---|
80 | 1 | 0.44 | 0.25 | 0.16 | 0.11 | 0.06 | 0.05 | 0.03 | 0.02 |
120 | 2.25 | 1 | 0.56 | 0.36 | 0.25 | 0.14 | 0.11 | 0.06 | 0.04 |
160 | 4 | 1.78 | 1 | 0.64 | 0.44 | 0.25 | 0.20 | 0.11 | 0.06 |
200 | 6.25 | 2.78 | 1.56 | 1 | 0.69 | 0.39 | 0.31 | 0.17 | 0.10 |
240 | 9 | 4 | 2.25 | 1.44 | 1 | 0.56 | 0.44 | 0.25 | 0.14 |
320 | 16 | 7.11 | 4 | 2.56 | 1.78 | 1 | 0.79 | 0.44 | 0.25 |
360 | 20.25 | 9 | 5.06 | 3.24 | 2.25 | 1.27 | 1 | 0.56 | 0.32 |
480 | 36 | 16 | 9 | 5.76 | 4 | 2.25 | 1.78 | 1 | 0.56 |
640 | 64 | 28.44 | 16 | 10.24 | 7.11 | 4 | 3.16 | 1.78 | 1 |
Only English supported?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.