Forum: Ruby on Rails Need mapping recommendations

B1994475d62550dfb65f2f802fd48e79?d=identicon&s=25 James Davis, PhD (Guest)
on 2014-06-03 17:59
(Received via mailing list)
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.
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2014-06-03 18:13
(Received via mailing list)
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
B1994475d62550dfb65f2f802fd48e79?d=identicon&s=25 James Davis, PhD (Guest)
on 2014-06-03 18:29
(Received via mailing list)
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.
4c6bde00168d595053c09aac7e487f8e?d=identicon&s=25 Colin Law (Guest)
on 2014-06-03 19:36
(Received via mailing list)
On 3 June 2014 17:28, James Davis, PhD <james.davisphd@gmail.com> wrote:
> 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
B1994475d62550dfb65f2f802fd48e79?d=identicon&s=25 James Davis, PhD (Guest)
on 2014-06-03 20:31
(Received via mailing list)
On Tuesday, June 3, 2014 12:35:51 PM UTC-5, Colin Law wrote:
>
> 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.
4c6bde00168d595053c09aac7e487f8e?d=identicon&s=25 Colin Law (Guest)
on 2014-06-03 20:37
(Received via mailing list)
On 3 June 2014 19:29, James Davis, PhD <james.davisphd@gmail.com> wrote:
>> > of heathcare provider information (anything from dentists to massage
> 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
B1994475d62550dfb65f2f802fd48e79?d=identicon&s=25 James Davis, PhD (Guest)
on 2014-06-03 21:26
(Received via mailing list)
On Tuesday, June 3, 2014 1:36:40 PM UTC-5, Colin Law wrote:
> >> > but it only helps for service providers already in my database.  I am
> >
>
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?
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2014-06-03 21:34
(Received via mailing list)
On Jun 3, 2014, at 3:24 PM, James Davis, PhD wrote:

> >> > already
> >
>
> 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
Dfc7587fd73f2efa19d6f1f9611b70ba?d=identicon&s=25 Jason Fb (jasonfb)
on 2014-06-10 17:49
(Received via mailing list)
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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.