codeforamerica / cityvoice

A place-based call-in system for gathering and sharing community feedback
MIT License
47 stars 35 forks source link

Map only works after clicking a location #221

Closed jmadans closed 9 years ago

jmadans commented 9 years ago

The map is grayed out until the user clicks on a location.

screen shot 2015-07-08 at 5 34 40 pm
daguar commented 9 years ago

Was this resolved? I didn't see a fix so just wanted to check in on whether we were just considering this wont-fix.

jmadans commented 9 years ago

Oops, no. Was confused by Mike closing related issue in builder. THIS IS STILL A THING.

migurski commented 9 years ago

Very confused. This one works fine: http://fierce-brook-5461.herokuapp.com, but this one does not: https://ancient-thicket-9575.herokuapp.com. They appear to have identical code.

daguar commented 9 years ago

I did a quick fix to make sure the tiles load on a branch — the commit is here: https://github.com/codeforamerica/cityvoice/commit/bf0f5564b62f313cce5050da095a7a84bde9b649

So the visual of the map will be loaded, but this quick fix does not address other interactions (map slipping, zoom) which still require a click on a marker.

migurski commented 9 years ago

Ooh, thanks. This will go a long way to alleviating the feeling of brokenness.

daguar commented 9 years ago

:+1: Yeah, this is probably a passable patch. I'm fairly sure the issue is something like just-in-time evaluation of stuff in the Backbone code.

migurski commented 9 years ago

Stupid DOM tricks.

migurski commented 9 years ago

It helps a little: https://ancient-thicket-9575.herokuapp.com

The map draws, but it’s wrong. Interestingly, I think it demonstrates what you were talking about with the bounds needing to be adjusted.

daguar commented 9 years ago

Oh wow how weird. Yeah, I think yanking Backbone out of this will make it easier to debug and will likely alone solve the issue.

migurski commented 9 years ago

I agree—I’ll take this approach when I work on the project with @jmadans on Monday.

migurski commented 9 years ago

I heard React was good, so I may try that.