Need mapping recommendations

I need to add geo location / mapping to an application such that users can be presented with and select service providers (such as dentists) in a graphical manner. The user’s selection would need to be stored in my app’s database. I am looking at google maps, yelp, foursquare, and facebook places. Can anyone provide some recent experiences with these, or other, APIs?

Thanks.

I just used the Geocoder gem again recently, reminded how awesome that is for the search side as well as coding an address into a lat/lng.

gem 'geocoder'

As far as showing the results on a map, you can use the Open Street Map for that, or Google if you like to fiddle with API keys. Either one will take an array of points and place them on the map for you as markers.

Walter

WD, Thanks for the reply. I am familiar with geocoder and use it already but it only helps for service providers already in my database. I am looking for a solution that essentially allows me to externalize the storage of heathcare provider information (anything from dentists to massage therapists). I will look at Open Street Map.

What does 'externalize the storage of ...' mean? I thought you wanted
to store it in the db.

Colin

Good question, sorry if it was not clear. I want to capture which service providers a user selects. I do not want to maintain a list of all healthcare providers in the US for the user to select from.

OK, so you are looking for an external source of all healthcare
providers in the US along with their locations. Can't help there I am
afraid.

Colin

Not true. The information is there in the form of ‘locations’ or ‘places’ via Google or some other mapping service. Suppose you wanted to show users a list of their local pizza restaurants. Instead of trying to build and maintaining a table containing every pizza restaurant in the country, just use a mapping service that allows them to select the restaurant. All I want to capture/maintain is which one the user selects.

Now take the above example and replace ‘pizza restaurant’ with ‘physician’ or ‘dentist’. That is what I want to do. The options come from the mapping service and I only capture the selection…essentially externalizing the healthcare_provider table.

Excellent feedback. Thanks Colin & Walter.

So my original question was which mapping service might work best for doing this?

>
>
>>
>> > WD, Thanks for the reply. I am familiar with geocoder and use it
>> > already
>> > but it only helps for service providers already in my database. I am
>> > looking for a solution that essentially allows me to externalize the
>> > storage
>> > of heathcare provider information (anything from dentists to massage
>> > therapists).
>>
>> What does 'externalize the storage of ...' mean? I thought you wanted
>> to store it in the db.
>>
>> Colin
>
>
> Good question, sorry if it was not clear. I want to capture which service
> providers a user selects. I do not want to maintain a list of all
> healthcare providers in the US for the user to select from.

OK, so you are looking for an external source of all healthcare
providers in the US along with their locations. Can't help there I am
afraid.

Colin

Not true. The information is there in the form of 'locations' or 'places' via Google or some other mapping service. Suppose you wanted to show users a list of their local pizza restaurants. Instead of trying to build and maintaining a table containing every pizza restaurant in the country, just use a mapping service that allows them to select the restaurant. All I want to capture/maintain is which one the user selects.

Now take the above example and replace 'pizza restaurant' with 'physician' or 'dentist'. That is what I want to do. The options come from the mapping service and I only capture the selection....essentially externalizing the healthcare_provider table.

Excellent feedback. Thanks Colin & Walter.

So my original question was which mapping service might work best for doing this?

Probably Google's, since OSM is more about location / way finding than a business listing service. That said, you're going to have to hook up some major JavaScript to hook into the Google map and extract the user's selection from their click. The map arrives at you fully populated, and hooked to the rest of the Google universe in terms of what happens when you click one of the pins. You're going to have to capture those clicks, do whatever you do to capture the content and context of the clicks, and then what happens for your user after that instant? Do they carry on to Google, or do you somehow redirect them into your application? What's the goal of your app?

Depending on what that is, you may want to consider scraping the Google map for your target locations, and build your own database anyway. In the long run it may be less complicated. You'll certainly not run out of API clicks should you get popular if you do that.

Walter

I work on an app with Geolocation and we store places in our database (Postgres with Postgis extension) and keep the corresponding Google ID in our database along with the coordinates of the place.

Making external calls from your web server to Google API mid-requrest (which isn’t necessarily what you asked for) doesn’t sound like a scalable solution to me, you really want that stuff in your DB for it to be performant.

The Google map solution where you call up a Google map and somehow interact with it client-side (via javascript) sounds promising, but yes involves a fair amount of Google API footwork to make that work.

FWIW, I’ve been working with Postgres with Postgis extension (specifically using rgeo/activerecord-postgis-adapter). Although I do find the technology powerful, I find the documentation to be weak and ultimately have found it frustrating to use.

-Jason