Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"How often are you finding a new home?"

Too often.

" Map widgets also shouldn't really be a performance concern"

Have you ever build one?

I hate those stuttering ones build by suckers and enjoy those that just run smooth GPU accelerated.

Also I frequently encounter maps on various sites.

The tracking service for my package. The shop showing me the nearest stores. A map with points of niche interest ..



I haven't built a map app and basically never touch frontend stuff, so I vibe-coded one in 20 minutes here[0] following the approach of the video I linked earlier. It's done inside of an SVG to make it so you could add map markers as another layer (and I added a dot to demo). The map marker here doesn't stay in the correct spot after a zoom change, and I didn't bother to do touch events, but that's not really the point and I don't see much purpose in spending more time. The point is smooth panning works just fine with 150 lines of simple javascript. Probably could be done with less if I were more familiar with browsers.

You can sometimes see a flash if you pan quickly and a new tile is loading in, but the embedded Google Maps on Zillow has a (much more obvious/longer) visible delay for new tiles loading in too. And actually the full, real google maps has tons of stuttering/tearing on my computer when panning, so mine seems to perform better on my computer (though to be fair theirs takes more of the screen. Mine seems to do fine when upping the page zoom level to make it bigger though). The big difference though is my (frontend portion of the) widget can be built during a lunch break, and it's easy enough to see what's going on that a high school student could figure it out with view-source.

Note that for real world use cases, it'd probably also make sense to restrict the range that the user is allowed to zoom and pan around anyway (e.g. Zillow or your delivery tracker don't need to let you scroll a world map to look at a neighborhood/get context). For something like a delivery tracker, you might not be allowed to move the map at all, in which case you're pretty much dealing with a static image where you maybe reposition a marker every minute or so. This does not require wasm or webgpu, and it's a poor use of engineering resources to add that kind of complexity.

[0] https://ndriscoll.github.io/map.html


SVG indeed also has come a long way and also with just using images in the browser you can solve it quite performant, that is right. I have done both (no map service, but having lots of images on the screen). But WebGL is still leagues ahead. And that shows on old smartphones for example. And I regret not having made the switch earlier as more performance gives much more possibilities, than being restricted to what the DOM offers.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: