Using OpenLayers, I want to display multiple markers over an OSM map by creating them from an array within a while
loop.
The code works when I hard-code a single coordinate, but not when reading the coordinates from the array.
What can be done to construct the markers?
JSFiddle: http://jsfiddle.net/qmxrtnfo/9/
You can test it via:
ol.proj.fromLonLat([lonlatarray[i]])
// ol.proj.fromLonLat([16.332253, 48.503684])