Closed jbculbertson closed 6 years ago
Scotty Scripts led me down the right road here. My issue was that they way my app was setup, everytime I clicked away from the map, I was .emptying the div that contained it.
To fix, I moved the map HTML from handlebars to index.html. And when I click away, its just hiding it. In addition, instead of running initialize everytime the map button is clicked, after the first click, I'm just showing the map vs re-initializing.
Should be all set - thanks Scott!
I've got a bit of a unique problem - in my project, I'm integrating google maps API. I've got a big hairy function called initialize that basically starts up google maps at a predetermined point.
I had it working perfectly - you could toggle away from the map, and back, and it would re-initialize correclty.
Now I've added additional code to allow for a search box to be within the map. This code goes within the initialize function. It works fine, until you toggle away, then try to come back. It errors out, saying it cannot read property value null of undefined.
I'd love it if someone could help me debug this. I'm having trouble using my inspector to even get closer to the issue.
Big hairy function below: