Live data from Hacker News

Serverless maps at 1/700 the cost of Google Maps API

protomaps.com

61–70 of 118 posts

Re: Serverless maps at 1/700 the cost of Google Maps API

#61

Earlier quoted context omitted.

There are lots of usecases for apps that don't need these advanced features, and just want a nice backdrop for their geo data. The current offerings of google, mapbox, bing, etc are prohibitively expensive when you just need a small subset of their features. The company I work for is a happy customer of maptiler.com which even offers routing and reverse geocoding. It might not be as great and up to date as google's,…

In this case you should just use Leaflet and OpenStreetMap for a grand total of $0 per month.

OpenStreetMap tile servers aren't really meant to be used for this. They do allow some use, but are also subject to throttling if your application puts too much load on their servers.

> However, OpenStreetMap’s own servers are run entirely on donated resources. They have strictly limited capacity. Heavy use of OSM tiles adversely affects people’s ability to edit the map, and is an abuse of the individual donations and sponsorship which provide hardware and bandwidth. As a result, we require that users of the tiles abide by this tile usage policy.

https://operations.osmfoundation.org/policies/tiles/

Re: Serverless maps at 1/700 the cost of Google Maps API

#62
post #41

Can any of you suggest a nice tutorial or something for rendering maps for self-hosting at much higher zoom levels? Many of these examples are for larger areas where zoom level 10 is sufficient, but I make hobby maps of mountain bike / hiking trails where the displayed area is only ~10km wide at the most with lots of fine detail. Thus, my maps tend to be shown at zoom levels 12-18, which is much higher than any of th…

This might be what you’re looking for: https://protomaps.com/docs/pmtiles Looks like protomaps supports up to zoom level 14 for free: https://app.protomaps.com/downloads/small_map

Thanks, but that's the problem, the data downloads they offer are not zoomed enough. So I want to know how to go closer. This presumes you already have tiles.

Re: Serverless maps at 1/700 the cost of Google Maps API

#63

Can any of you suggest a nice tutorial or something for rendering maps for self-hosting at much higher zoom levels? Many of these examples are for larger areas where zoom level 10 is sufficient, but I make hobby maps of mountain bike / hiking trails where the displayed area is only ~10km wide at the most with lots of fine detail. Thus, my maps tend to be shown at zoom levels 12-18, which is much higher than any of th…

Most of these examples go up to zoom 10 or so because they cover a wide area. It's not prohibitive to increase that zoom in a small area because the total number of tiles will still be low. Also keep in mind that for vector data it's possible to "overzoom" and allow the client zoom levels to be higher than the physical data levels. In terms of self hosted maps for outdoors use, I have some open source repos from a fe…

Thanks! I'll give that a look.

I agree it's very reasonable to have highly zoomed small area stuff, I just seem to be missing the gap between the OSM data and the tiles. I'll give that a read, thank you!

Re: Serverless maps at 1/700 the cost of Google Maps API

#64
post #31

Earlier quoted context omitted.

Hi, the value add in the commercial offering on top of raw OSM is described here: https://protomaps.com/docs/faq#openstreetmap I also maintain open source tooling for anyone to replicate and extract OSM on-demand, as well as a free download portal: https://github.com/protomaps/OSMExpress https://app.protomaps.com/downloads

Interesting! I note that: > OpenStreetMap ... standard tile layer ... openstreetmap-carto ... is based on dynamic rendering of raster images, instead of vector tiles that can be customized on the client. so, does OSM really not make vector tiles available? That's too bad.

OSM is really a dataset. They do offer a raster tile server, but it's intended to support community mapping (improving the dataset), and not necessarily for end users using a map for other purposes.

Basically they want you to host your own tile server using the OSM dataset. There are also commercial offerings that do this for you, but not for free.

Re: Serverless maps at 1/700 the cost of Google Maps API

#65

Earlier quoted context omitted.

Additionally, embedding maps in websites, the thing that most small businesses are wanting to do, is free. The pricing looks to me like it's centered around features that companies might be integrating into their products in order to monetise, which seems fair.

Only for a static image of a map. The "slippy" map that supports zooming and panning isn't free.

Actually as far as I can tell it's the other way around: if you embed the JS map it's free, but static tiles are charged API requests. I suspect this is because the JS map allows Google to create onwards journeys into Google Maps, and has limited utility outside embedding maps, whereas the static map tiles could be used in all sorts of products. I could be wrong though.

Re: Serverless maps at 1/700 the cost of Google Maps API

#66

Earlier quoted context omitted.

Only for a static image of a map. The "slippy" map that supports zooming and panning isn't free.

Actually as far as I can tell it's the other way around: if you embed the JS map it's free, but static tiles are charged API requests. I suspect this is because the JS map allows Google to create onwards journeys into Google Maps, and has limited utility outside embedding maps, whereas the static map tiles could be used in all sorts of products. I could be wrong though.

Ah yeah, I think you're right. I may have been looking at old documentation on pricing.

Re: Serverless maps at 1/700 the cost of Google Maps API

#67

The thing this article doesn't say is that maplibre-gl v2 supports directly querying pmtiles with http range requests so you don't even need lambda or cloud flare workers to make x/y/z routes in front of the file. So instead of 50c, this is essentially free. If you are going to to set up that infrastructure you could just use an mbtiles file which has been around for years. The interesting thing to me is that this st…

The solution I described in the blog post is an optional layer on top designed for high traffic deployments, see here: https://protomaps.com/docs/cdn

As most storage systems like S3 aren't free and have per-request fees, the price is pretty comparable to this CDN deployment.

Protomaps is very intentionally built with little in common with Mapbox; the main shared parts are using the same Protocol Buffers vector tile format, because there's no reason to write another one; and compatibility with the fork of Mapbox GL 1 (MapLibre GL). See https://protomaps.com/docs/faq#mapbox

Re: Serverless maps at 1/700 the cost of Google Maps API

#68
post #60

Pretty cool demo, what I wonder about is how the quality is and how long they can keep updating their tiles. My experience last time I did something similar was that the OSM data grows fast, the import and rendering takes longer and longer, and something tends to break in the process or create rendering problems in some random countries if you don't spend time checking. A more obvious quality issue for example: on th…

Hi, thanks for the pointer, the Arabic rendering should be fixed now on the demo.

Re: Serverless maps at 1/700 the cost of Google Maps API

#69

Earlier quoted context omitted.

Additionally, embedding maps in websites, the thing that most small businesses are wanting to do, is free. The pricing looks to me like it's centered around features that companies might be integrating into their products in order to monetise, which seems fair.

Only for a static image of a map. The "slippy" map that supports zooming and panning isn't free.

It is more or less free. It's known as the Maps Embed API: https://developers.google.com/maps/documentation/embed/get-s...

    > All Maps Embed API requests are available at no charge with unlimited usage. 
I used it for my app (https://turas.app) and it is very, very capable for a free product (cross my fingers that they don't jack it up like they did Maps API proper).

Re: Serverless maps at 1/700 the cost of Google Maps API

#70
post #31

Earlier quoted context omitted.

Hi, the value add in the commercial offering on top of raw OSM is described here: https://protomaps.com/docs/faq#openstreetmap I also maintain open source tooling for anyone to replicate and extract OSM on-demand, as well as a free download portal: https://github.com/protomaps/OSMExpress https://app.protomaps.com/downloads

Interesting! I note that: > OpenStreetMap ... standard tile layer ... openstreetmap-carto ... is based on dynamic rendering of raster images, instead of vector tiles that can be customized on the client. so, does OSM really not make vector tiles available? That's too bad.

Tiles, vector or raster, to be consumed for general use are not really in the scope of the OpenStreetMap project. This is surprising to many because it's the first thing you see on OSM.org; the tiles there are for the explicit purpose of feedback to data editors, and make a best-effort to synchronize the instantaneous state of the database in the tiles, unlike Protomaps which delivers a snapshot.

Paul Norman has a project called Tilekiln to adapt vector rendering for this use case on OSM.org: https://github.com/pnorman/tilekiln

Post reply on HN