OpenUpSA/wazimap

Upgrade to authenticated Google Maps API

longhotsummer opened this issue · 5 comments

The keyless Google Maps API is no longer permitted. We need to get an API key and change how we call Google Maps.

We use the geocoding API and can get 40,000 monthly requests within Google's $200 free tier.

Motivation

How about we use this opportunity to liberate wazimap from Google hegemony? This post is particularly relevant, here's the kicker:

Sudden change of policy by Google, which is directed specifically at startups (as smaller web sites should largely remain below even the new lower thresholds), is surely an unpleasant surprise for us and does not create much trust in Google as a vendor. In the future we would therefore keep our distance from Google Cloud and avoid deep integration with any Google services on which it can pull a similar trick. For example we would be wary on taking free Google Analytics for granted.

Are we willing to bet the future of wazimap on remaining within the $200 free tier? Even so, we're still subject to the whims and fancies of Big Bro.

Two options come to mind:

  1. Run an OSM tile server, which should not be too demanding for ZA alone
  2. Use another 3rd party service like Mapbox

OSM Tile Server

What this might need

One approach here might be to audit a prepackaged docker image built for this task. If there are "blessed" images, we could schedule audits based on risk tolerance and leave the hard work to upstream. Otherwise, fork and maintain. See notes about a plugin interface in the 3rd Party Provider section below.

Pros

  • Truly "open" (can't stress this enough)
  • Liberation from 3rd party dependence
  • Lower TCO in the long term

Cons

  • Increased operational overheads (time & money)
  • Deployment is more complex
  • More maintenance
  • Probably more expensive than free tiers of 3rd party providers in the short term

Another 3rd Party Provider

What this might need

Here we could avail of the opportunity to abstract the mapping provider away by providing a plugin interface which would also mitigate risk and alleviate some pain if the rug gets pulled out from under this project again.

Pros

  • Quick integration
  • Almost 0 maintenance overhead
  • Cheaper than an OSM tile server in the short term

Cons

  • Dependence, dependence, dependence. Not great for an open source application.
  • Risk that the current scenario will be repeated with a less favourable outlook

Caveat

I haven't looked much at how wazimap implements mapping, so if the interface is already pluggable please accept apologies. Also, these lists are not exhaustive.

Some Links

Scraped these from HN

@nsomaru
We use the Google Maps API to look up places, so if a user types in a place, eg: town name, we use the response from the places API to determine in which geography that town is in.

So, we don't use the maps from google. those are provided by osm.

@longhotsummer

Can we close this?

Yes, this has been resolved.