13 ms·
Maps.earth – free and open-source web maps
Hey everyone, a while back I posted about an open-source maps project I was working on called Headway. I just wanted to share an exciting update. I made a few architectural improvements with the help of some really awesome contributors and Headway can now run full-planet instances. I'm really excited with what we've managed to come up with.
Right now the full-planet demo server is in Germany and lives at [1]. A brief explanation is at [2]. I'm hopeful that the project will continue to improve with time and eventually end up being a real contender in the web maps space. I'm talking with folks about the potential for getting some more robust hosting options too which is very exciting.
For the moment though, Headway has some usability issues. It's missing ETAs, has no steps list for directions, or proper geocoding search results page, etc. I'm going to get to these issues with time, but please drop me a line if you're interested in helping out. Especially interested in help with web frontend, design, or internationalization. Development takes place on GitHub [3] and discussions tend to happen in the matrix room [4].
[1] https://maps.earth/ https://maps.earth/
[2] https://about.maps.earth/ https://about.maps.earth/
[3] https://github.com/headwaymaps/headway https://github.com/headwaymaps/headway
[4] https://matrix.to/#/#headway:matrix.org https://matrix.to/#/#headway:matrix.org
- whitten 4y agoIs there any support for non-earth maps ? Such as for a DnD campaign or a story set in Middle Earth ? Or even a war game on Earth but with different place names and countries borders names, etc ?
- hackernewds 4y agoWhat
- Bedon292 4y agoIt is all based on OSM data. And I haven't checked in a few months but I believe Maplibre, which is doing the rendering, require the tiles all be in Web Mercator, which is an earth based coordinate system. So you would probably need to hack together something to change the underlying data into what you want. The easiest one would be changing place names and borders on Earth.
- deleted 4y ago[deleted]
- antman 4y agoIs it a web app? A web service?
- lkbm 4y agoYou can use it as a web service by visiting https://maps.earth/ https://maps.earth/
- abetusk 4y agoI'm a little confused as to what this actually is. Is this a route planning built on top of OSM? Does this bundle OSM data "all in one" so that you can more easily host an OSM server?
- ellenhp 4y agoOSM doesn't have a server per se (other than the OSM API server). It's a dataset for the most part. Headway lets you bring up a server that will render maps tiles, allows you to search for places and get routes between places. It's trying to be a user-friendly UI for various pieces of the OSM ecosystem. There are a lot of amazing pieces of software out there that work with OSM data, but there isn't an easy way to bring them up, and there's no unified frontend for all of them other than Headway (that I know of). Edit: To the comments telling me I'm wrong about this, remember that Headway has a geocoder and routing system, along with a transit trip planner (currently disabled on maps.earth though). These are not things you could get with off-the-shelf solutions that include a GUI until now. I also want to self-host my mapping software for privacy reasons, and Headway makes that easy too. I probably need to be better about explaining what all Headway does that's different than just bringing up an OSM tileserver though. Thank you all for the feedback :)
- chess_buster 4y agoThanks. It would be great if this could be stated on the page. I kept hackernews open in order that someone would explain to me what this actually does. Your comment thankfully fullfilled this.
- ellenhp 4y agoThank you for the feedback :)
- soheil 4y agoThere no frontend to bring up an OSM? Literally you need a single line to load one up: (new map('map_div')).addLayer(new TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'))
- DonnyV 4y agoDidn't have my address in NJ.
- tuukkah 4y agoYou should be able to add it at https://openstreetmap.org https://openstreetmap.org :-)
- jmkb 4y agoBut don't expect it to show up on maps.earth right away... it looks like it's at least a month behind OSM at this point.
- ellenhp 4y agoThat's mostly because I decided to use maps from the daylight maps distribution. The current tiles were actually built last night. I think it probably makes sense to track planet.osm.pbf directly though because I want to create a virtuous cycle where users feel that contributing to OSM has a real tangible payoff. The main issue with updating regularly is going to be that long-term I can't really afford a beefy enough machine that has a fast uplink to Cloudflare where my artifacts are hosted. Getting all of the planet-sized artifacts uploaded even just this one time was a huge pain. I ended up having to generate them on my desktop, ferry the data to a friend's house on a laptop via motorcycle and upload them from there. This is one of the things that I want to help remedy if I get enough support via Liberapay or GH Sponsors.
- Aeolun 4y agoIt doesn’t pull the OSM data (from their servers)? Or you did that once and pre-processed everything now? I presume you can do something similar for the daily and minutely updates, but I imagine merging that with the existing stuff is more work.
- tuukkah 4y agoHave you explored whether it would be possible to upload only the changed parts?
- paxys 4y agoI tried the hosted app at https://maps.earth https://maps.earth but it isn't really usable at present. How do you actually search for and navigate to places?
- ellenhp 4y agoThe search box in the top left should bring up a bunch of autocomplete suggestions when you type stuff into it. Clicking on one brings up a place card view [1]. If my demo server falls over that will fail to populate. Once you have a place card you can hit "bike there" or something and then populate the "From" field that appears again in the top left to get a directions view [2]. Not ideal, the frontend was built in a few weeks by someone with very little frontend experience (me) so I did my best. [1] https://maps.earth/place/openstreetmap%3Avenue%3Away%2F12903132 https://maps.earth/place/openstreetmap%3Avenue%3Away%2F12903... [2] https://maps.earth/directions/bicycle/openstreetmap%3Avenue%3Away%2F12903132/openstreetmap%3Avenue%3Away%2F37057155 https://maps.earth/directions/bicycle/openstreetmap%3Avenue%...
- paxys 4y agoI guess it may be failing due to the request spike. Even otherwise, searching for common places like "San Francisco" or "New York" shows a dozen results all over Europe and South America, not the one place most people would be looking for. Street address search doesn't seem to work either.
- owenpalmer 4y agoNot working for me either. No results show up, even for common places like LA.
- ellenhp 4y agoYeah, I've noticed that at least the way Pelias is configured in Headway, searches for administrative areas don't seem to work, like at all. I'm not sure if that's a config issue or an issue with Pelias though. Address search should definitely work as long as there's an appropriately tagged OSM node for your address, but the server's load average is 40 on a 6 core OVH box in Germany so you might have to be (very) patient to get anything back until the load drops to a level it can deal with.
- lambda_dn 4y ago
- ElCheapo 4y agoI just asked for directions from my home to the railway station and the navigator told me to enter a roundabout in the opposite direction :/
- uneekname 4y agoThe direction of that roundabout might be mis-tagged on OpenStreetMap. Would you be comfortable sending me the location, so I can see about fixing it?
- deleted 4y ago[deleted]
- ElCheapo 4y agoForget that, I erroneously asked for walking directions my bad. Shame I can't delete the comment lol
- soheil 4y agoCan you tell us what this even is before telling us how sorry you are that it’s not perfect?
- ellenhp 4y agoIt's a self-hostable web maps stack trying to be an open-source alternative to Google Maps.
- deleted 4y ago[deleted]
- playingalong 4y agoI like the fact it uses Earthly for building. Nice pun.
- joekrill 4y agoWow this is pretty amazing. For those that haven't tried, it's really difficult to piece this sort of thing together. So the fact that this is all provided as a Docker Compose configuration is really awesome.
- tuukkah 4y agoLink to the previous post: https://news.ycombinator.com/item?id=31536217 https://news.ycombinator.com/item?id=31536217 Congrats on all the progress in 3 months!
- shafyy 4y agoHey, this looks great, thanks for working on it! I'm the creator of Mapzy[0], an open-source and self-hostable store finder. We're trying to focus on privacy as much as possible, but currently use Mapbox since it's better than Google Maps and we didn't find any other alternatives. Do you think Headway could be a replacement for us? We currently use the Mapbox JS library to create the pins etc. - could we use Headway with Leaflet JS for example? We also use the Mapbox geocoder, mainly for reverse geocoding of addresses. How does Headway's geocoder compare? 0: https://github.com/mapzy/mapzy/ https://github.com/mapzy/mapzy/
- Bedon292 4y agoHave you looked into Nominatim [1] for reverse geocoding? [1] https://wiki.openstreetmap.org/wiki/Nominatim https://wiki.openstreetmap.org/wiki/Nominatim
- ellenhp 4y agoNominatim requires a lot of resources for full planet installs. I'd recommend looking into Pelias or Photon instead. They're both amazing. Headway has used both of them at various points. Photon is definitely easier to set up for the planet, though, you can just download a pre-computed search index from GraphHopper and you're good to go.
- shafyy 4y agoI haven't. Thanks for the recommendation!
- jutaz 4y agoI’d recommend taking a look at Maplibre GL JS[0], which is a fully open source map library. It was forked from Mapbox GL JS just before licence change, therefore it’s also fully compatible with the style spec etc. It’s also actively maintained and has a strong community behind it. 0: https://github.com/maplibre/maplibre-gl-js https://github.com/maplibre/maplibre-gl-js
- twelvechairs 4y ago
- alexalx666 4y agoIs it possible to access it via less js heavy frontend? Owner of Nokia N900 here :D Would great to have Ghost in the Shell style super lightweight maps
- ellenhp 4y agoUnfortunately no. maplibre-gl-js requires webgl for vector tile rendering. That's how you get snappy zoom performance, reduce the load on the end-user's cellular connection, etc. Sick phone though I'm a little bit jealous :)
- alexalx666 4y agoI can also imagine requesting route via terminal and getting just list of directions which is many times enough
- tuukkah 4y agoI have seen (but cannot find now) a command line tool that you give two addresses, it queries OpenTripPlanner for itineraries and displays the result using walking, train etc. Unicode emojis.
- alexalx666 4y agothanks! it works via REST/GQL apis so should be easy to write a cli
- pessimizer 4y agoYou wouldn't be as jealous if you knew how hard it is to find batteries these days.
- alexalx666 4y agoI found a 1600mAh one from AkkuKing on German Amazon, I thought it will be harder,
- codethief 4y agoVery impressive! Is it just me (Firefox on Android) or does the UI really not allow tapping landmarks (shops, restaurants, subway stations)? Also, directions don't seem to work right now (infinite loading) but I suppose this is due to the server receiving the HN hug of death right now. By the way, for anyone looking for the mobile (non-web) version of this: Organic Maps is a fantastic frontend for OpenStreetMaps (and of course there's the good old OsmAnd, though I like Organic Maps better these days).
- jonas-w 4y agoThanks for Organic Maps! The website doesn't seem to work for me either on mobile.
- sorenjan 4y agoOsmAnd doesn't seem to get many updates nowadays. I get that it's open source and we can't demand anything for free and all that, but they have some monetization options that should bring in some money, but aren't really worth the price IMO. The issue tracker is full of bugs and feature requests marked as nice to have, but almost nothing happens.
- oynqr 4y agoRecently switched from Osmand to Organic and am quite impressed. Rendering and routing are much faster and there are no crashes even with very long routes.
- ssl232 4y agoAgreed, it's so much more pretty and the UI is slick. With Osmand I always seem to end up with stuff on the map from a previous search/navigation that I don't want any more, but can't figure out how to get rid of.
- throwayyy479087 4y agoA usable example would make this much more effective brochureware.
- oynqr 4y agoLike https://maps.earth https://maps.earth ?
- throwayyy479087 4y agoHuh - rendered a totally different page on my desktop
- vanous 4y agoThis is amazing, thank you very much! It is really tempting to spin up a small instance for hyper local maps.
- ellenhp 4y agoIf you do spin one up, feel free to join the matrix and share the experience or just email me with feedback. I'm trying to get this as frictionless as possible to set up because I want people to own their own location data. Headway is much much more responsive on a local scale than it is in https://maps.earth/ https://maps.earth/ and the search results are more relevant too. My own personal instance for Seattle has largely replaced Google Maps for me. :)
- c0nsumer 4y agoThis seems really neat. I have a question that I hope isn't something I'm missing, but is there an easy way to change the rendering ruleset? I ask because I've been wanting to build some custom maps for mountain bike trails in the state where I live and have them served up similarly. Whenever I've looked into other projects for this it's either focused on rendering tiles from Mapbox data (where not all the OSM tags -- especially not MTBing ones -- are available) or really old info or presumes that someone else will be generating tiles.
- ellenhp 4y agoThis is tracked here: https://github.com/headwaymaps/headway/issues/85 https://github.com/headwaymaps/headway/issues/85 It's going to be somewhat tricky because of a few mediocre decisions I made early on in the development process, but if you were up for helping out I'd love to get a bring-your-own-style experience working in Headway. Long-term, I want to add the ability to easily brand Headway and customize it for your own needs without forking it.
- c0nsumer 4y agoThanks for pointing me there. I'll give it a read and see what I might be able to do.
- sorenjan 4y agoHow do you handle map data updates? Do you regenerate everything from scratch from the full data set, or can you update it incrementally with patches? Is it possible to put the tiles on a CDN like cloudflare?
- KoftaBob 4y agoAwesome work! What are your thoughts on the feasibility/benefits of using a p2p system like IPFS to share OSM map/tile data between users, rather than serving from one centralized server?
- ellenhp 4y agoIt's... complicated. The discussion for it is here, I'd be curious if you had any thoughts in particular about this. Feel free to comment or join the headway Matrix room if you want to chat more in-depth. In principle I'm open to this but the privacy implications are a little weird. https://github.com/headwaymaps/headway/issues/50 https://github.com/headwaymaps/headway/issues/50
- deleted 4y ago[deleted]
- ajsnigrutin 4y agoHow much resources does something like this use? (full planet, few (<10) users)? Disk, RAM, cpu cores?
- ellenhp 4y agoI cover that in the readme, but the short answer is that the server running maps.earth has 64GB of RAM and 6 physical cores. It's using about 600GB of disk space, but the disk usage might change because I suspect my Pelias index is missing a lot of information. https://github.com/headwaymaps/headway#system-requirements https://github.com/headwaymaps/headway#system-requirements
- koinedad 4y agoLove the idea of freeing up map data
- abhaysrivastav 4y agoThis looks so clean.
- clementmas 4y agoIs the data shared between vector tiles, geocoding and directions? Or is each feature pulling its data from a different index?
- ellenhp 4y agoDuring data preprocessing it all comes from the same OSM extract, except for Pelias which also pulls data in from Who's On First, and Planetiler which also pulls data in from Natural Earth (and a few other sources). At runtime tiles are served over the wire but everything else happens server-side. So it's a bit of everything :D
- karussell 4y agoI don't think they share the index as all three parts are different projects.
- karussell 4y agoThanks for this. I'm curious to know: why did you include two routing engines (OTP and valhalla)? Wouldn't e.g. OTP sufficient and use much less resources compared to 2 setups? And why not reuse one of the existing open source map or directions front-ends?
- easrng 4y agoLooks like they use either mapbox gl is or maplibre gl js to render the map
- karussell 4y agoI meant there are many ready-to-use map UIs out there already, like the UI from OTP or valhalla itself. No need to reinvent the wheel. E.g. see https://valhalla.openstreetmap.de/ https://valhalla.openstreetmap.de/ Or https://github.com/Qwant/erdapfel https://github.com/Qwant/erdapfel Or https://graphhopper.com/maps2 https://graphhopper.com/maps2 & https://github.com/graphhopper/graphhopper-maps https://github.com/graphhopper/graphhopper-maps (disclaimer: I'm a contributor there)
- ellenhp 4y agoOTP is a resource hog (for good reason, it solves a harder problem than valhalla). Covering a US state is very much pushing it for OTP, and covering the planet wouldn't work at all on any hardware. I didn't use OTP's frontend because I found it unpleasant to use. Valhalla's frontend wouldn't work well with OTP and I don't find it terribly pleasant to use either. Neither work on mobile, and neither work with vector maps, it seems? I haven't tried out GraphHopper's UI though.
- ragazzina 4y agoWhat language is it in? In Italy, most of the cities have the Italian name, some of them have an English name (Florence, Naples), some have a German name (Triest). The behaviour is different than OSM, at least for me.
- habi 4y ago- Triest is mapped with several names (https://www.openstreetmap.org/relation/179180 https://www.openstreetmap.org/relation/179180), ‘Trieste’ being the standard one. - Naples is mapped with many names (https://www.openstreetmap.org/relation/40767 https://www.openstreetmap.org/relation/40767), ‘Napoli’ being the standard one. - Florence (https://www.openstreetmap.org/relation/42602 https://www.openstreetmap.org/relation/42602) has ‘Firenze’ as standard name. A renderer can choose which name to put as label on the map, usually it’s `name` or `name:locallanguage-abbreviated`.
- sandos 4y agoWow, it is fast! I could see it had my test-route drawn and ready before the scrolling animation to the start had even finished.
- ygra 4y agoA few things that I notice in the area where I'm somewhat active as an OSM contributor: - You probably shouldn't render guideposts or route markers on the map, or at least not with generic "info" icon. - Things with access=private are likely not terribly relevant to people looking at the map. This will include things like parking spots or gardens. - Lots of shots and amenities have icons, but doctors don't. Neither do fire stations. - Sports pitches are shown as nodes, but may be better shown as areas, since they often cover quite extensive swaths of ground that's otherwise empty with just an icon in the middle. Same with playgrounds, schools, and kindergartens, gardens, and parks. - For buildings and building parts, if you don't make use of the parts in any way (such as showing roofs, height, etc.) perhaps just disregard the parts and only render the building outlines. This, combined with the fact that geometries seem to be simplified, even at the highest zoom levels, results in a bit of a mess of lines at times where some outlines are simplified differently from others that should actually share parts of the same edges and thus overlap perfectly. (e.g. https://maps.earth/place/openstreetmap%3Avenue%3Away%2F111206435 https://maps.earth/place/openstreetmap%3Avenue%3Away%2F11120... or https://maps.earth/place/openstreetmap%3Avenue%3Away%2F111206435 https://maps.earth/place/openstreetmap%3Avenue%3Away%2F11120...). Same thing with the geometry simplification also happens with adjacent geometry that should actually not have gaps (e.g. semidetached houses or garages next to houses). Lots of buildings that are actually rectangular also get quite weird angles. - Tunnels are quite subtle. And while at least roads in tunnels don't overlap buildings that are actually above them (like with Carto) it's still hard to make out what's above and what's below in such cases (e.g. https://maps.earth/place/openstreetmap%3Astreet%3Apolyline%3A30081121 https://maps.earth/place/openstreetmap%3Astreet%3Apolyline%3...). Culverts for waterways are handled better than roads in tunnels in this case. Overall though, this seems like a quite nice map style. Closer to Google Maps in that it emphasizes roads, but some people like the less detailed look (and it works better with vector maps, I guess, to have fewer polygons to render).
- ellenhp 4y agoI'm using OSM Liberty [1] so as far as I know I should be just tracking upstream with most of these issues, but I think some of them might actually be introduced by planetiler [2]. Thanks for giving it such a detailed look though. [1] https://github.com/maputnik/osm-liberty https://github.com/maputnik/osm-liberty [2] https://github.com/onthegomap/planetiler/issues/324 https://github.com/onthegomap/planetiler/issues/324
- paxvinci 4y agoI have found an error in a street name. Where could I report it?
- karussell 4y agoOn https://www.openstreetmap.org https://www.openstreetmap.org See the tutorial there or https://learnosm.org/en/beginner/start-osm/ https://learnosm.org/en/beginner/start-osm/
- murphyslab 4y agoWorks surprisingly well! One note for walking directions: It doesn't seem to take elevation gain into account in choosing between alternate routes. Probably a not an easy thing to implement.
- WhyNotHugo 4y agoThis is very interesting (and impressive work). I've been thinking for quite some time that it would be very useful to have a local map server for offline use. A lot of applications need to show data related to location (e.g.: a photo app might want to show a map of where a photo was taken). Having a local service to resolve these would be superb. I know this product has a different goal, but I wonder if the backend side of it could actually fill in this role. Essentially exposing location/mapping services to local applications.