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
Nick McNeany (6,930 XP) on

Awesome episode! Really enjoying the maps and geolocation episodes!

Thanks, Chris!


Gravatar
daniel T. on

I really love de geolocation series,

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

Gravatar
Chris Oliver (169,620 XP) on

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

Gravatar
daniel T. on

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
Mads Ellesgaard (520 XP) on

+1 Elastic Search!


Gravatar
Omar Khedr (7,280 XP) on

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


Gravatar
Nick McNeany (6,930 XP) on

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
Chris Oliver (169,620 XP) on

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
Josh Cooper (9,390 XP) on

+1 Elastic Search


Gravatar
Diogo (1,810 XP) on

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


Gravatar
Shairyar Baig (110 XP) on

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

Gravatar
Chris Oliver (169,620 XP) on

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
Shairyar Baig (110 XP) on

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
Chris Oliver (169,620 XP) on

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.