Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Hi! I appriciate you answer! Thought I would be doing something like that, but as I am a beginner in OL3, as well in a JS, I ran into some problems. Please take a look at EDIT part I ve provided in the main question. Commented Sep 1, 2016 at 20:10
  • @vayacondios2015 I've edited the answer, added a source to the temporary layer Commented Sep 1, 2016 at 20:15
  • Thanks! Wouldnt thought that would be it in a million of years. It doesnt throw me an error now if I run code over a console and it creates vector file (which I still need to check). However, it does not write any kind of outcome to console and it doesnt create new vector layer if I write code in a script. Where do I need to place code in a script? Commented Sep 1, 2016 at 21:10
  • @vayacondios2015 the code should go inside map.on('moveend', ...); I tried it in your plunker and it worked. sorry for the delay of the reply Commented Sep 2, 2016 at 8:11
  • 1
    thank you for helping me out! I really appriciate it! it wasnt working in the beginning because I had to change tmpLayer.getSource().length>0 to tmpLayer.getSource().getFeatures().length>0, but as far I can see, its working properly now! I have edited your code above and accepted it as agood answer! thanks again! Commented Sep 2, 2016 at 20:20