JasonThomasData / DocLink

Web app (Rails) for refugees to find bulk-billing doctors nearby
0 stars 1 forks source link

Map links for some locations don't work #22

Closed equivalentideas closed 8 years ago

equivalentideas commented 8 years ago

Try the following the “View map” links on this page http://hidden-hamlet-42593.herokuapp.com/en/doctors?q=Liverpool%2C+NSW

They don't take you to the proper address. But then on the google maps page you hit search, you get taken closer. Why is this? Can we fix it?

I think that having the name of the Doctor’s clinic in the address field might be causing this problem. Or maybe the way we link to maps is the problem—maybe there's a better url to send people to?

@JasonThomasData could you try and get to the bottom of this one?

JasonThomasData commented 8 years ago

I agree, it's definately the surgery name. I think we should drop the doctor surgery name. I think the 'find my location' button would be useful here. - actually scrap that, brain fart, unrelated issue We should alter the doctors helper to give Google the address only.

JasonThomasData commented 8 years ago

I was just looking at the schema, this might be a simple matter of putting surgery name in a different field, rather than having the doctor surgery name in the address. That way, we could leave the doctors view and doctors helper alone.

To reflect this in the design, perhaps we can put the surgery name (if we have one) in a subtext below the doctor's name? I think that could be handled in the doctors view actually.

What do you think about that?

JasonThomasData commented 8 years ago

This was partially an issue with this bug, but we should still try out the schema issue. I'll have a go now.

JasonThomasData commented 8 years ago

This should be fixed now. I've added a change to the view so the surgery name appears separate from the address. See this commit

I also added a migration to split the address field. Now, the surgery name (if there is one added), is separate from the address. See this commit Now, Google only needs to deal with the address and we're not passing in the surgery name.