Google maps API is expensive. If you have map heavy app and find success you will be in for a real disappointment to find your ‘profits’ going into googles pockets. The cost of showing a map 1,000 times is $5…imagine having a successful app with 100,000 monthly visitors, who each see a map…that is $500, then if you are geocoding, double it, and if you are geocoding for two address, again add $500…so $1500 a month to show a map with two geocoded address from coordinates.
You could use the leafy map plugin.
It uses coordinates to show the map marker.
You can also use one input to get the coordinates into the system by adding the entire coordinates string and using extract with regex to separate the latitude and longitude.
Using this method you won’t get the actual address value, but at least can show a map with markers and draw a route and then probably utilize the uber plugin for the time estimates ( I’m not familiar with Uber app ).
If you are expecting repeat users, you can geocode their coordinates and save them for future use so you can get the actual address value and only hit the google api once for it. Probably set up ‘favorite destinations’ so they can store multiple locations they travel to and from frequently.
And for the search box, using the google places API is expensive as well.
Try the Algolia places search by zeroqode
Instead of paying google $283 for the first 100,000 searches, you pay nothing to Algolia. Then for every 1,000 after that its only $0.40 for Algolia compared to google $2.27.
Algolia places provides some good data like zip codes, county etc. that you can use for search results if you are inclined to do distance based results for locations or listings of some kind. I am letting a user search a city, I grab the zip code list and set my search to show ‘things’ that have a zip code in that list.
When result is not available for that, I let them expand their search by using the county…last ditch is to set up a distance based by using google geocoding API. Of course, when getting a new ‘thing’ into the database I am having to use the google api to get the geographic address, but in search for the most part google is no longer in my pocket.