Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Frank Drebin
Frank Drebin
8,204 Points

Do people still use image maps? Any better solutions?

Hello, I'm trying to make something similar to this demo

Ideally it would be responsive. I don't need the onclick function of the demo. I'd like it if the on hover function of the demo to be an onclick function, more suitable for touch devices. The links DO NOT need to go to a 'more info' page or modal window.

Should I jump in and figure out how to do this with image maps?

Or is there a modern way of doing this?

Any pointers in the right direction appreciated.

Cheers ;)

3 Answers

Hello, I have had to implement a map in layout map like the one in your demo link before. I too was thinking about creating a large image map, but found many online resources to get it done faster and easier. And let's face it, image maps were cool in the late 90's, and today they are just more a pain in the arse than anything.

I ended up using MapBox.com to create my map, and it turned out beautiful and full of features.

I hope this helps!

Frank Drebin
Frank Drebin
8,204 Points

Thanks for the feedback Jeremy, I appreciate the response.

MapBox looks great for geographical styled maps, but I'm not so sure it will work for my situation, as I don't want to use a world map to display just the store map.

You can use them and despite heavy opposition, have found their way into recent HTML spec, so that means they will not be deprecated. They're bad for accessibility though and likely instead of reaching for an imagemap, you should reconsider your design.

Frank Drebin
Frank Drebin
8,204 Points

Thanks for the feedback Paul, I'm trying to find other solutions. I guess I could have a static shopping mall map with a regular key/legend. I'll keep hunting for options before reverting to this tho! Thanks