Reputation: 37
UPDATE
I tried adding the files into a Snippet or JSFiddle to make it available to people to edit, but JSFiddle is banned and I cannot upload text files into a Snippet. Unless there's a better way to do it, here's the public repo for the files.
Hi, everyone!
I'm working on switching from OpenLayers 2 to OpenLayers 3 and supplementing my reading of by trying some things out on my own. There's a project that I'm building here that should be fairly simple: take form inputs and use them as parameters for building a vector layer. The interface works as intended, save for one problem.
Whenever I pan the map or zoom it, the vector layer seems to disappear. I can't for the life of me imagine what's going on. Anyone able to help me figure out what I can do to keep the layer in place?
Thanks!
Dheeraj
Upvotes: 1
Views: 149
Reputation: 37
The answer was in line 77 here. It turns out that for whatever reason, I misunderstood falsiness in JavaScript and my style-builder function was erring on undefined styles. Who knew? The rest of the code works, though!!!
Big thanks to @ahocevar for being willing to help!
Upvotes: 0