15

So google maps APIs will now basically be a pay to play, like many other services of google, is there any actually good alternative for getting long+lat and distance matrix for free?

Comments
  • 2
    Never looked into it, but you might find what you want with this: https://www.openstreetmap.org/
  • 1
    @Jilano thanks, but yeah, tried already, its db seems to be very small and can't find good results for chinese cities for example
  • 1
    @JoshBent Erf, it was worth a shot, I guess
    I'll try to find something else!
  • 1
    Oh, fuck.
  • 1
    @telephantasm that summarizes it pretty well indeed
    @Jilano sure, if you find anything please tell us, I am on the hunt too 😄
  • 1
    Found this for long+lat geocoding lookups, so far it seems promising, so that's half the fun: https://locationiq.org/#demo
  • 1
    Dont worry. They said every developer account will get $200 or $300 (cant remember exactly) credits for free. Only if your usage exceeds that (lucky you) do you need to start paying. I do believe you still have to have a billing method setup (you know, so they can datamine our credit cards too now)
  • 2
    @InterferenceObj yeah, bad experienxe with that kind of payment handling, especially when it comes to API, just return a limit error then if I exceed some random filter, instead of automatically charging
  • 1
    @teganburns

    <They have billing limits you can set.>

    Well atleast something, though read on, they made the math too:

    "40,000 Directions calls" a month, that's only 1333~ calls a day, reaching that limit is very easy and they know it, though atleast embed map loads seem to be unlimited and free

    <to see my traffic>

    "Bandwidth 43.45 GiB" for just a static website? what are you hiding from us on your server? also I don't think you should expose the panel if you're not censoring things like IP, iirc there's also laws against that

    -----------------

    To everybody else who might be checking comments, I have found a way together with locationiq (which allows 10,000 requests/day) and openstreetmaps to replicate that distance lookup google did in the past, will keep you updated, since it does provide the time needed to travel, but not the distance, so that will have to be e.g. averaged.
  • 1
    @JoshBent Awesome. Thanks, man.
  • 4
    @linixxx just made a geoip thing. Check it out.
  • 0
    @ewpratten not what I am looking for, but I know he did, thanks still :)
  • 1
    @telephantasm @Jilano found something else than locationiq - "nominatim" from OSM, which resolves the names usually closer to the actual location it seems so far, it's accurate enough for me too, especially with the country added to the request, a quick throw together:

    https://codepen.io/anon/pen/...

    it doesn't give you the distance either though, so that'll have to be approximated based on the driving time, will look further and update if I find a better method
  • 2
  • 2
    @CozyPlanes @telephantasm @Jilano

    After looking at the osm devtools, I realized that osrm* has a route option (it's description when I first looked, didn't quite fit the case), which actually returns both duration and distance and also allows you to filter away all sort of unnecessary steps

    So here's the updated version which fetches both time and distance between two cities/addresses

    https://codepen.io/anon/pen/...

    * http://project-osrm.org/docs/...
  • 0
    @Floydian basically yeah, as I said, they did the math and saw mad cash that's not flowing into their pockets and basically everybody uses their map and route services, e.g. because they have live data from millions of phones on the street, mining traffic data for them
  • 1
    Isn’t google gives a quota of 2500 views? Per day?
  • 1
  • 1
    @devTea I'll also quote what I wrote above:

    "40,000 Directions calls" a month, that's only 1333~ calls a day, reaching that limit is very easy and they know it, though atleast embed map loads seem to be unlimited and free
  • 1
    @JoshBent Thanks for the heads-up, looks interesting!
Add Comment