4 ms·
You're calling the google maps API with every visitor? Might get expensive.
by robga 4y ago
You're calling the google maps API with every visitor? Might get expensive.
- jorisboris 4y agoI got the impression it could be expensive because it seems I just got billed a ~100 usd. Any way to work around this?
- robga 4y agoThe geocode API converts "addresses or Place IDs to latitude/longitude coordinates and vice-versa". The results aren't going to change them anytime soon so cache them as static resources (e.g. latlong columns in your DB). Right now you are asking the API thousands of times for where Changi airport is, etc.
- jorisboris 4y agoCombined with a bug, the geocode api made costs explode. So I took it out.