[HN Gopher] Serverless maps at 1/700 the cost of Google Maps API
___________________________________________________________________
Serverless maps at 1/700 the cost of Google Maps API
Author : dcre
Score : 427 points
Date : 2023-03-10 02:39 UTC (20 hours ago)
(HTM) web link (protomaps.com)
(TXT) w3m dump (protomaps.com)
| moneywoes wrote:
| What's the catch?
| bdon wrote:
| Author here - the catch is that the data you store and serve is
| usually not as rich and complete as Google's, of course.
|
| The solution as described in the post is for serving tile
| archives, and where you get the tile archive is up to you - I
| have a commercial offering (and am working on an open source
| one too), and there's various other FOSS projects for tile
| creation.
| GeorgeHoneywood wrote:
| PMTiles looks excellent, I think the range request idea will
| go far. Just wanted to let you know that the "Live Example
| Page" link on the page seems to 404.
| bdon wrote:
| Thanks, should be fixed now!
| teruakohatu wrote:
| There isn't a catch. If you only want to serve map tiles, this
| is the cheapest way to do it.
|
| If you want fancy features like being able to use a UI to make
| custom map styles, vehicle routing and satellite overlay, then
| MapBox and Google are still your friend.
| singularity2001 wrote:
| For vehicle routing you can add GraphHopper
| moneywoes wrote:
| What if I want to add custom data to the map like say a
| police crime filter on the top.
|
| Can I still use this? Or do I need felt
|
| Very knew to make sorry
| winbat wrote:
| If you have any geospatial data, you can tile it with
| tippecanoe [0], which gives you an mbtiles file. Protomaps
| lets you easily convert the mbtiles file into a protomaps
| file which you can then use.
|
| Protomaps doesn't limit you to any particular type of
| tiles, it's just a format which allows you to read tiles
| out of a single file with HTTP range requests.
|
| [0] https://github.com/mapbox/tippecanoe
| bdon wrote:
| Hi, thanks for the mention!
|
| The Mapbox repo has an older version of tippecanoe;
| there's a newer version actively being improved by Felt
| at http://github.com/felt/tippecanoe , and they've also
| funded my addition of the Protomaps format (PMTiles) as a
| direct output. No conversion step required anymore!
| bdon wrote:
| As the developer of this system, I concur with this;
| Protomaps is focused on map tiles, and can be used with other
| solutions such as http://geocode.earth for search.
|
| A small detail: I don't believe this is the absolute cheapest
| way to deliver map tiles. Renting an unmetered bandwidth
| server is always going to be the cheapest way to host
| content, but unmanaged servers don't give you SSL
| termination, infinite storage, or an edge cache.
|
| Protomaps is designed as the right compromise between self-
| hosted operational+development costs and SaaS-like delivery.
| teruakohatu wrote:
| Thank you for your hard work on this.
| severak_cz wrote:
| I have tested Protomaps in of my project and I can say this is
| good as tileset datasource. E.g. if you already have some map
| data in your app and needs basemap to display under them
| Protomaps is your solution.
|
| The catch is that you have to host it yourself (which is pain
| if you want to update it - otherwise it's just upload and
| forget).
| 867-5309 wrote:
| firstly let's predict when osm will become as universally
| acceptable as gm
| anthk wrote:
| OSM needs no data plan, just the GPS signal and updated maps
| downloaded from either Organic Maps (the easy way); or OSMand,
| if you plan to do serious tasks on mapping your town for
| instace.
| 2Gkashmiri wrote:
| look up streetcomplete and everydoor. They are much more
| targetted towards helping improve OSM than OSMAND.
| zild3d wrote:
| to be fair, doesn't google maps offer the same? Have
| downloaded offline maps of cities while traveling without a
| data plan
| anthk wrote:
| Dowlading maps it's far easier under Organic/OSMand. You
| choose the country and/or the region, and download them.
| That's it.
| chainwax wrote:
| This looks absolutely fantastic. I've been tinkering around off
| and on with the Strava API, laying my (or my bike club's) ride
| lines on top of a map to share with friends. Doing this with
| Google Maps has been more costly than I expected. I'll check this
| out after work!
| somishere wrote:
| This is great. I hadn't heard of it but currently building a
| research mapping interface for a non-profit and will use it.
| Interested to know if anyone has suggestions for public aeriel/
| satellite tiles. I use ESRI via a dev account which is largely
| great (extensive hi-res) / best value (??) I've found so far - in
| a semi exhaustive search. Also the Allen Coral Atlas basemap,
| CC'd from Planet, which is limited to reefs (and 5m) but
| fantastic for the mission, not just the licensing. But I'm sure
| there are alternative solutions. Not in need of up-to-date
| imagery, but would love to find e.g. a publically released AWS
| tileset that is updated on a biyearly basis or so ... Am I asking
| too much :))
| c0nsumer wrote:
| 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 the free tilesets.
|
| (Ideally I'd like to take a sane style, tweak some things like
| making paths clearer and offsetting the text labels, then making
| tiles. The Thunderforest maps are exactly what I want, but tiny
| and local and self-hosted.)
| jmnicolas wrote:
| I'm not sure of exactly what you need but a few years ago I
| toyed with my own OSM server. There was a tuto on a site named
| linuxbabe to install everything on Ubuntu.
|
| FWIW I generated all the tiles up to zoom 18 for France (which
| is the best mapped country as far as OSM go), it represented
| about 300 GB of data.
|
| You will need a big SSD, 16 GB ram for a big country, 32 GB for
| Europe, I think you can do the world with 64 GB but ofc more is
| always better. Count a few weeks to generate everything,
| probably less if you have a very good computer / server (mine
| was quite old, 2012ish I think).
| breunigs wrote:
| You might want to peek at
| https://github.com/headwaymaps/headway . I have never used it
| myself, but it at least shows how to integrate the different
| pieces.
|
| The individual software components often have alternative with
| a similar scope. So if you don't like a choice headwaymaps
| made, browse around.
|
| The data sources are mostly "unique", i.e. everybody downloads
| from the pages (Geofabrik, Who's On First, etc), so not much to
| gain here.
|
| Editing styles has some alternatives, but the OpenSource
| editors are far away from the quality of the Mapbox editor.
| Maputnik or editing the 1000+ SLOC JSON by hand are the way to
| go, imo.
|
| Personally I use GeoFabrik to download OSM extracts -
| osmconvert to extract the smaller bounding box I am interested
| in - tilemaker to render vector tiles to individual .pbf files
| I can serve like it's 1999. The bounding box extract is not
| necessary, but it's much faster if you need to tweak things in
| tilemaker. Both tilemaker and osmconvert are packaged for at
| least Debian out of the box, so setup is easy enough. Rendering
| a decently sized metro area takes < 30mins with this from
| scratch of compute, < 5min with the bounding box extract.
|
| Note that adding icons (sprites) or fonts is extra work that
| comes on top. And while the tools themselves are great, there's
| still a lot of gluing/plumbing/fitting things together that
| you'll need to do. If headwaymaps works for you, it's probably
| the easiest choice.
| kylebarron wrote:
| 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 few years ago that may help with that. [0]
| is a style based on the openmaptiles vector tile schema for
| outdoors purposes. I believe that readme has some overall
| instructions, plus other repos in the org are for making data.
| (Nowadays planetiler is probably the best way to make OSM
| vector tiles though)
|
| [0]: https://github.com/nst-guide/osm-liberty-topo
| caspg wrote:
| This basemap looks awesome. Need to play with this and see
| how hard is to run it on my own. It would totally fit nicely
| with my website https://travelermap.net.
| c0nsumer wrote:
| 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!
| pbronez wrote:
| 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
| c0nsumer wrote:
| 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.
| bdon wrote:
| The z0-14 tilesets from
| https://app.protomaps.com/downloads/small_map should be
| good enough for street-level mapping with overzooming. You
| can email me at brandon@protomaps.com if this doesn't fit
| your needs yet.
| c0nsumer wrote:
| Thanks, I'll give it a look, but I need a different style
| as well. This is the sort of thing I'm looking to
| completely self-host: https://trailmaps.app/ramba/
| TotempaaltJ wrote:
| The real meat of this story:
|
| > A web application with 50,000 map loads using the Google Maps
| API will cost $350 per month.
|
| > A similar amount of traffic running through a Protomaps CDN
| install on Cloudflare, with an average of 20 tiles per session,
| costs fifty cents in Cloudflare Workers request fees.
|
| $350 versus $0.50! Who's going to be the first to build a (maybe
| Google Maps-compatible?) API on top of this and sell it for a
| fraction of the cost?
|
| Edit: Looked around a bit and Protomaps already offers a hosted
| map through Github Sponsors here:
| https://github.com/sponsors/protomaps
| gniv wrote:
| > $350 versus $0.50!
|
| It's not as impressive as you make it sound. The real value of
| the Maps API is in 1) routing and 2) local business details.
| These are both hard for anybody else to provide, so Google
| prices them accordingly. The price for the tiles is just an
| extension to the overall pricing.
| DeathArrow wrote:
| >The real value of the Maps API is in 1) routing and 2) local
| business details.
|
| Google is crowdsourcing both
| johannes1234321 wrote:
| Local business details also can be the opposite of what you
| want: You don't want your competitors on the map.
|
| Not sure if there are ready use alternatives, but at least in
| theory with OSM you could fully control what is being shown.
| And what not.
| samschooler wrote:
| I will say I'm for this setup, but what you're saying is
| not exactly true. You can customize what is shown with the
| styling wizard, and completely remove types of markers from
| maps you create. https://mapstyle.withgoogle.com/
| einpoklum wrote:
| > local business details
|
| That situation is actually kind of outrageous. Municipalities
| and governmental bodies feed data into Google rather than
| publicly-accessible platforms (like OSM). And so do the
| private businesses, with no regulatory mechanism forcing
| either them to submit the same data to local / public
| databases (like yellow pages, national map site / registries,
| or OSM) or forcing Google to provide dumps of its data for
| the public to use.
|
| I hate having to access Google to find information which is
| simply not available in map for, or at all, elsewhere.
| troyvit wrote:
| Yeah I agree. As near as I can tell municipalities treat
| Alphabet like their own data utility. They consider it an
| extension of their government. I have two kids in public
| school and those schools' reliance on these closed
| platforms is almost 100% complete for everything from
| newsletters to surveys to class sign-up and bill payment.
| It is the largest thing that keeps me from de-googling my
| life.
|
| I'm not necessarily saying municipalities should build this
| stuff out themselves, only that it freaks me out when small
| governments rely on giant corporations to support their
| infrastructure.
| yunohn wrote:
| Exactly this.
|
| Google Maps isn't charging for raw bandwidth/storage. They
| spend massive amounts on R&D to make Maps the most useful and
| competitive global mapping solution. This comes at a cost,
| which is completely different than using community-maintained
| partially-complete OSM maps.
| Doctor_Fegg wrote:
| A little naughty to describe OSM as "partially complete"
| but not Google. Last time I looked, Google didn't have a
| fraction of the footpaths or cycleways around here that OSM
| has.
| flangola7 wrote:
| They could have it initially run a Google api search and
| cache that kind of local data for when the next person runs
| it
| ClumsyPilot wrote:
| > These are both hard for anybody else to provide, so Google
| prices them accordingly.
|
| I used to provide data to Google, mark missing postboxes,
| etc. Then I realised I am just helping them make money.
|
| Also they used to be quick, and got sloppy - 7 years ago my
| submission would get processed in 1 week. Recently i
| submitted nearby postbox, with GPS coordinates and pictures -
| 6 months, no responce.
|
| This is lile with social networks - the content is what
| matters, and people give it away for free
| bjelkeman-again wrote:
| Better spend that time on Open Street Map then.
| m4rtink wrote:
| I would argue its easier and quite fun to do via
| StreetComplete:
|
| https://streetcomplete.app/
|
| (Mobile app where you can fix and enhance OpenStreetMap
| data on the go.)
| danpalmer wrote:
| 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.
| wcedmisten wrote:
| Only for a static image of a map. The "slippy" map that
| supports zooming and panning isn't free.
| CharlieDigital wrote:
| It is more or less free. It's known as the Maps Embed
| API: https://developers.google.com/maps/documentation/emb
| ed/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).
| danpalmer wrote:
| 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.
| wcedmisten wrote:
| Ah yeah, I think you're right. I may have been looking at
| old documentation on pricing.
| narrowtux wrote:
| 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, but it's more than
| enough for our apps.
| iLoveOncall wrote:
| In this case you should just use Leaflet and OpenStreetMap
| for a grand total of $0 per month.
| wcedmisten wrote:
| 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/
| ohgodplsno wrote:
| Just so you know, I make it a point to report to OSM
| maintainers any relatively sizeable app using their tile
| servers, just so they can be banned.
|
| The default OSM tile server is not here to serve your
| startup.
| narrowtux wrote:
| That is usually out of the question, because raster tiles
| don't allow you to customize the map (colors, which
| features to display at which zoom levels, etc). I find
| openstreetmap way too busy as a backdrop for data.
|
| As I've said, the solutions are there, and there is an
| actual demand for cheap vector tile hosting without all
| of the other cruft that is bundled in the commercial
| solutions but isn't actually needed.
| habi wrote:
| > I find openstreetmap way too busy as a backdrop for
| data.
|
| Fortunately there's a large selection of background
| layers for leaflet: http://leaflet-
| extras.github.io/leaflet-providers/preview/ I quite like
| CartoDB Positron for as a muted background.
| narrowtux wrote:
| Thanks, but I'm really happy with our vector tileset
| solution, and don't want to downgrade to raster tiles.
| They are pretty slow compared to vector tiles with
| mapbox/maplibre gl.
| bdon wrote:
| As mentioned in the post there's a _free_ API for non-
| commercial use that I maintain, and you can make commercial use
| of it by becoming a GitHub Sponsor:
|
| http://github.com/sponsors/protomaps
|
| But being "Google Maps compatible" will never be possible as
| long as the Google Maps client library and data are
| proprietary.
| TotempaaltJ wrote:
| That's awesome, just saw that myself! This is a super cool
| project.
|
| Fwiw with "Google Maps compatible" I didn't mean showing
| Google's Maps, I was thinking more a drop-in replacement to
| (some subset of) Google's client library.
| bdon wrote:
| Hmm, I haven't heard of any open source projects re-
| implementing Google's client library, and I imagine it
| would be difficult to keep parity with a closed-source
| project.
|
| Most open source efforts have consolidated around MapLibre
| GL https://maplibre.org which is a maintained fork of
| Mapbox GL before their switch to a source-available
| license.
| londons_explore wrote:
| Most Google Maps client library users use only a few
| basic features - "display slippy map here with a pin
| centered on here" type thing.
|
| Then just stub out any other API call with "alert('Not
| implemented, but PR's welcome!')"
|
| And as far as webmasters are concerned, switching from
| google maps to your maps involves just switching out the
| <script> tag for a different one.
| [deleted]
| manv1 wrote:
| An API is an API. The code behind it being closed is
| irrelevant.
| tantalor wrote:
| I don't know about "20 tiles per session"
|
| That's like, 1 pan or 1 zoom. It might as well be a static map
| if the users don't actually interact with it.
| benburleson wrote:
| I would be that's actually a majority of usage in the wild.
| Sometimes I'll zoom out if I need more context, but I'm not
| wandering around most embedded gmaps.
| tantalor wrote:
| My point was if that's truly the dominant use case then the
| map should be a static image initially and replaced with
| tiles lazily.
| bdon wrote:
| It is the dominant use case, and a static server-rendered
| image is more computationally expensive to generate than
| a tile-based system; a static image has effectively
| infinite variation in center, bounds and map scale, so
| requires dynamic computation from a server to send a
| JPEG/PNG. A tile-based system can just pre-generate a
| couple million tiles which is exactly the strategy
| Protomaps uses.
| jasmer wrote:
| TCO = Total Cost of Ownership.
|
| The cost will likely be in developmetn and maintanance, not
| service fees.
|
| Use whichever API is clean, simple, stable and you don't have
| to think about.
|
| This might be a solution for larger operations that have some
| intrinsic relationships with maps.
| nsteel wrote:
| > Tested in production at scale: On AWS, response times average
| 100 ms for cache hits, 200 ms for misses. Cloudflare is
| significantly slower, but is improving as Cloudflare's R2
| offering matures.
|
| They are comparing the price using Cloudflare, which although
| cheap, has poor performance.
|
| I don't know anything about these services or their pricing.
| Maybe AWS costs about the same as Cloudflare, but it's cheeky
| to have inconsistent comparisons like this. Ideally, this
| post/advert would provide the equivalent AWS price also (or
| provide Cloudflare performance numbers).
| bdon wrote:
| Author here. AWS is quite a bit more expensive than
| cloudflare, mostly because of egress charges from Cloudfront.
|
| Cloudflare R2 latency is tricky to predict and can be
| anywhere from a few hundred milliseconds to 1s+ in my
| experience. This is for cache misses, only, of course; cache
| hits are comparable to AWS. Cloudflare really has every
| incentive to improve their product so I expect this to be
| much more competitive in the near future.
| orf wrote:
| I haven't really seen many R2 performance benchmarks, but
| 1s+ for retrieval is nuts. Is that time to first byte or
| total time? On what average object size?
| tiffanyh wrote:
| > Who's going to be the first to build a (maybe Google Maps-
| compatible?) API
|
| There would be some irony if a 3rd-party monetize off of Google
| shoulders a compatible-API to their Map service.
|
| Given that's what they did to Java.
| KRAKRISMOTT wrote:
| Embrace and extend :)
| yafbum wrote:
| 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 their demo, Arabic
| text renders wrong (left to right instead of right to left, it'd
| be like printing kroY weN instead of New York)
| bdon wrote:
| Hi, thanks for the pointer, the Arabic rendering should be
| fixed now on the demo.
| zeitg3ist wrote:
| In these discussions I rarely see Apple Maps mentioned, but I
| just checked and MapKit JS includes 25,000 requests per day with
| a $99 yearly Apple Developer subscription. Considering the cost
| of the alternatives, even if you don't care about iOS
| development, it might be worth it to get one just for MapKit.
| soperj wrote:
| This is double the number of requests for 50cents per month if
| they're doing their comparison properly.
| zeitg3ist wrote:
| Yeah, I was just mentioning it as an alternative since many
| companies already have Apple Developer accounts -- for them
| this option would be free.
| tuananh wrote:
| the live example url is broken :(
| bdon wrote:
| Whoops, i broke the link in the GitHub repo; but I just fixed
| it on my phone! Thanks for the heads up.
| alex_suzuki wrote:
| Unrelated to the actual product: lack of margin on the sides make
| it an uncomfortable read on mobile.
| bdon wrote:
| Thanks, this should be fixed now.
| pirsquare wrote:
| Google Map 10X their price on a single price change.
|
| Never trust Google Cloud or run any production servers with them.
| They have zero empathy for you.
|
| Just today, we got screwed by Google Cloud (as a 4 yrs customer)
| when they abruptly shutdown our production servers just because
| we didn't fill up a form on-time.
|
| My story:
| https://twitter.com/Ryan_Liao/status/1634103410525077504 (happens
| today) [Link Updated]
| kunley wrote:
| The story looks like deleted..
| pirsquare wrote:
| Thanks! Link updated to my own tweet. I don't know why my
| post got removed. It's no diff from previous gcloud horror
| stories.
| KingOfCoders wrote:
| Yes we we're caught by this some years ago and switched to
| Stadia Maps (very happy).
| dachryn wrote:
| a 400 month customer is really a tiny fish, don't expect
| special treatment without support packages. Do you even have an
| enterprise contract with them? The bronze contract can be had
| from 0 spend, and gives the option to pay through invoicing and
| have support. Or are you just going through credit card which
| is intended for hobby use?
|
| I am not defending them, but this is totally on you. What was
| the missing information? Lack of identity verification or
| credit card verification? Again that's on you. You should have
| also received a warning in the cloud console and if you hvae
| the cloud app on your phone, there as well.
| guhidalg wrote:
| > I am not defending them, but this is totally on you.
|
| You are defending them. Unless OP is disingenuous, the
| reputational loss of an unhappy customer is hard to shake.
| Customers will make mistakes, if the cloud provider doesn't
| have automated systems to catch and prevent those mistakes
| then they aren't doing well in customer service.
|
| A similar thing happened to me with my personal Azure spend,
| but I felt they handled it much better simply by
| communicating early and often when there was a problem
| processing payment. I had time to respond and fix my
| subscription, so I stayed a happy customer.
| awestroke wrote:
| If you can be banned from the platform at any time just for
| having the audacity of using your credit card, maybe they
| should have a big yellow warning box when signing up with a
| credit card
| mkup wrote:
| Fortunately traditional hosting providers like Hetzner won't
| suspend me even if I pay $10/month on average. That's why I
| avoid Google Cloud Platform, Microsoft Azure and AWS like a
| plague. I prefer to have a freedom to switch my hosting
| provider at any time, even if that sometimes means more
| infrastructure work. That kind of attitude to customers, as
| GCP usually has, is just not for me, thanks.
| rwalle wrote:
| "switch my hosting provider at any time"
|
| Sorry, obviously you are not the kind of customer that the
| three big players care about.
|
| Also, I hope you could show real data points for the
| comment regarding Hetzner instead of just putting a very
| questionable claim here.
| rcarr wrote:
| I've just coded my latest site using aws but I'm going to
| be teaching myself terraform in the coming week so I can
| rewrite the infrastructure as code so I can move providers
| easily if I ever have any problems in the future.
| rirze wrote:
| Terraform is not going to make you cloud-agnostic. If you
| switch cloud providers, you'll still use Terraform but
| you will have to rewrite much, if not all, of your TF
| code.
| rcarr wrote:
| Yeah, it is disappointing that something like this isn't
| the standard but I can code it myself if I really want
| to:
|
| https://awstip.com/how-to-make-terraform-truly-cloud-
| agnosti...
|
| And even if I don't, I imagine rewriting a terraform
| workflow is probably easier than taking cloudformation
| code and then rewriting it into whatever the equivalent
| is in google or microsoft land. Atm I'm pretty happy with
| aws and don't see myself moving but I like to have the
| option if needed.
| honeybadger1 wrote:
| I have tried to love the 3rd party maps, but I always go back to
| Google because of traffic updates. Nothing else comes even
| remotely close and when you need to get somewhere on time, it's
| just too crucial.
| kaapipo wrote:
| This is an API, not a user-facing application.
| clementmas wrote:
| I have a bunch of styles based on the OpenMapTiles schema. Is it
| possible to swap the underlying data with PMtiles?
| alexmuro wrote:
| 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 stuff is all built on
| the open source technology of mapbox, and it seems like a real
| threat to large parts of their business model. Interested to see
| how it plays out.
| bdon wrote:
| 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
| alexmuro wrote:
| Firstly, I just want to say thanks for the reply, but more so
| thanks for your work, its moving opensource mapping forward.
|
| In my work we are looking at switching from mbtiles hosted
| with tilserver-gl(https://github.com/maptiler/tileserver-gl)
| to pmtiles to remove a server process. But we were self
| hosting already and we are already using maplibre-gl 2.
|
| I can see why the implementation in the blog post would be
| better for high traffic deployments (ours isn't). It also
| points out to me I don't understand how a CDN would handle
| range request for hosting the pmtiles file directly, it
| probably doesn't?
|
| As far as the mapbox stuff,in my mind, pmtiles is a direct
| competitor (successor) to the mbtiles format, which was a
| revolution in comparison to everything that came before it. A
| successor I welcome because it makes it even easier for me as
| a developer to self host and not be dependent on a SaaS to
| run my maps.
|
| The modern opensource map stack wouldn't exist without mapbox
| and I'm personally grateful to them for that. Most people who
| use pmtiles will use mapbox's opensource style spec to style
| them, and descendants of their open source code to render
| them. But as a developer now its an obvious choice to not use
| their services after years of using them.
|
| However I'm not doing high traffic stuff and they never made
| much money off me anyway.
| bdon wrote:
| Some CDNs handle range requests; the purpose of introducing
| Lambda/Workers here is to transform normal Z/X/Y URLs into
| range requests, so you can use PMTiles with any client like
| MapLibre Native or legacy code without loading a plugin.
|
| Protomaps actually has its own vector renderer different
| from Mapbox GL or MapLibre at
| https://github.com/protomaps/protomaps.js . It does use a
| handful of low-level Mapbox JavaScript libraries, but
| otherwise was consciously developed to be 100% separate
| from existing Mapbox rendering and styling code, and has an
| objectively inferior (Leaflet) user experience.
|
| In practice, most serious uses of Protomaps are now using
| MapLibre GL, so there will be more focus going on that in
| the project going forward.
| maptime wrote:
| My guess is Mapbox would worry more about competitors in the
| routing and Addressing space than
|
| The biggest danger with Open tiles is a basemap is the gateway
| to other data services with higher costs and an easier path to
| a defendable technical moat. Swapping a basemap can literally
| be a 10 minute job
| einpoklum wrote:
| Can someone give a better description of how this initiative
| relates to OpenStreetMaps? The website says that the "tile
| dataset [is] based on OpenStreetMap data" - so, what's the added
| value in the commercial tier? And - how, if at all, does this
| initiative contribute back to OSM as a project?
| jillesvangurp wrote:
| It can use openstreetmap as a data source and probably most
| people self hosting their maps will end up using openstreetmap
| data and maybe some of their own data. IMHO this is more
| interesting for people that want bespoke maps as it gives them
| a cheap way to do that without having to rely on expensive SAAS
| solutions or a lot of operational complexity.
|
| Openstreetmap doesn't really do a lot for hosting maps for
| third party websites. You would use Mapbox, maptiler or other
| suppliers for that and libraries such as mapbox/maplibre,
| openlayers, leaflet etc. that can render either bitmap or
| vector maps.
|
| The trick with protomaps is that instead of deploying
| gazillions of tile files, you upload a huge single file with
| all the vector content inside and then use lambda functions to
| extract tiles from that file. And then you use caching and CDNs
| to to make sure you don't have a lot of compute overhead . So,
| the API looks like a normal tile server. The data deployment
| process boils down to uploading a new file and your usage data
| is a little bit of compute for the tiles your users ask for and
| a networking cost related to using a CDN.
|
| So, that adds up to a lot of savings potentially. At least, as
| long as commercial providers don't lower their cost. Obviously,
| they are free to do similar things technically.
| bdon wrote:
| 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
| einpoklum wrote:
| 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.
| bdon wrote:
| 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
| wcedmisten wrote:
| 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.
| favaq wrote:
| Serverless? Then what's this 104.26.2.120 server that I'm
| connecting to?
| underbluewaters wrote:
| This has been transformative for the project[0] I'm working on
| where I need to host a lot of ocean environment data using vector
| tiles. I've been able to build out a data upload and tiling
| pipeline similar to Felt using tippecanoe + pmtiles without a lot
| of trouble. It's so cheap to run and host we intend to provide a
| data hosting service free to our users with a reasonable soft
| limits. Using something like MapBox Tiling Service would have
| been a couple orders of magnitude more expensive and make the
| project infeasible. Really exciting stuff.
|
| [0]: https://seasketch.org
___________________________________________________________________
(page generated 2023-03-10 23:01 UTC)