Skip to main content

Subscribe to GoRails to get access to this episode and all other pro episodes, and new awesome content every month.

Subscribe Now
Only $19/month

Unlimited access. Cancel anytime.

16 Geo-spatial Search with Geocoder and Google Maps

Episode 206 · September 12, 2017

This episode, we'll clone Yelp / Airbnb's geosearch functionality using the Geocoder gem

Search Maps Geocoding


Transcripts

Subscribe or login to view the transcript for this episode.

Discussion


Gravatar

Awesome episode! Really enjoying the maps and geolocation episodes!

Thanks, Chris!


Gravatar

I really love de geolocation series,

Are you going to keep uploading more videos about this series?

Gravatar

Sure can, do you have any topics you're curious about?

Gravatar

hello!!
yes, I would like to know how to refresh the markers each time that the map is dragged without refresh the whole map.

that would be amazing

regards!


Gravatar

Gravatar

Love this episode!! Thanks Chris! Question though are there any disadvantage in using geocoder? And instead relying on Google Maps Javascript API?


Gravatar

Another cool idea, would be the ability to update the map with locations near a user based on their location/ip address, either automatically or with a manual reload. I know this is difficult to do in development, but would love to see this.

Gravatar

Not as difficult as you might think. The HTML5 geocoding API will get you an IP address quickly, so you can send that over as a different param and pass that into the .near() method. This will be a great screencast. :D


Gravatar

Gravatar

Would be awesome if it does the "Redo Search in this area" without clicking on the button


Gravatar

Does this series cover displaying the distance between two markers or coordinates?

Gravatar

I mentioned the geocoder gem comes with some calculations methods. One of those is for distance between two points. You can use that, just check the readme.

Gravatar

Let me rephrase my question :)

Does this series cover displaying of route between two markers? Suppose I select Marker A and then select Marker B then the route should be displayed between the two, is this feature covered in this series?

Gravatar

Not at the moment, but that's as simple as adding a couple lines of code to your JS. Check out the route examples: https://hpneo.github.io/gma...


Login or create an account to join the conversation.