Live data from Hacker News

It's 2020 and I'm using image maps

videoinu.com

1–10 of 109 posts

Re: It's 2020 and I'm using image maps

#3
I feel like I'm missing something. It seems like declare a element, associate it with an , but then use JS to iterate over the map and build a bunch of absolutely positioned elements on top of the image. Why not just have the annotations stored outside the DOM (returned by API or whatever) and just build the absolutely positioned elements? Wouldn't that avoid the fighting with funky coordinate systems, etc.?

I get why is (was?) useful in general, but if you're going to do your own annotation rendering on top anyway, it just seems odd. Fun exercise though!

Re: It's 2020 and I'm using image maps

#4
> To make matters even more exciting, the last two coordinates might not be what you'd expect; when absolutely positioning items in CSS, right and bottom indicate the distance from the right and bottom edges respectively. In image maps, this holds no water. Instead, both horizontal coordinates are counted from the left edge and vertical coordinates from the top edge.

Interesting. This order is commonly used by libraries like SDL and SFML to declare rectangular shapes.

Re: It's 2020 and I'm using image maps

#7

I still use tables for layouting because divs and messing with positioning/floating never really clicked for me.

I’ve built a layout back-end that rapidly prototypes the web-page with custom metal type, quickly hammers it into a wooden frame, and then runs it through a printing press and scans the result, which is then saved as a PDF, compressed, and sent to the user’s gopher client.

Re: It's 2020 and I'm using image maps

#8

I still use tables for layouting because divs and messing with positioning/floating never really clicked for me.

Flexbox (for one-dimensional layout) and Grid (for 2-dimensional layout) really improved the situation and finally made floating and positioning obsolete.

There are plenty gamified learning tutorials like https://cssgridgarden.com/

Re: It's 2020 and I'm using image maps

#9

I have considered recently I should make some things with imagemaps again, like there is untapped potential there I'm not clear of but that when I start working with it years of experience and new technologies will clarify.

Make a web framework that renders the UI entirely as mapped images. A PNG would probably be faster to load and render than most of today's multi-megabyte JS monstrosities.

Re: It's 2020 and I'm using image maps

#10
post #9

I have considered recently I should make some things with imagemaps again, like there is untapped potential there I'm not clear of but that when I start working with it years of experience and new technologies will clarify.

Make a web framework that renders the UI entirely as mapped images. A PNG would probably be faster to load and render than most of today's multi-megabyte JS monstrosities.

Aaaaand it's 1996 again!
Post reply on HN