Open samtux opened 5 years ago
Hmm, there seems to be a bug in the synchronized SynchronizedOverlay. setPosition should only be called after the initial setup is done.
you could circumvent the problem by only setting the position after creating of the overlay like this:
var marker = new ol.Overlay({
positioning: 'center-center',
element: document.getElementById('marker'),
stopEvent: false
});
ol2d.addOverlay(marker);
marker.setPosition([-8253399.592624033, 520451.1540516437]);
Thank you @jbo023 for the explanation, it works correctly with the instructions.
no problem, but you should leave the issue open, this is a valid bug, its just easy to circumvent :)
I want to create an animated marker from an SVG icon. According to the recommendations in openLayers, this should be done through an overlay element. In OpenLayers it works correctly, but with olcs it fails to create the marker:
showing the following error:
I provide a test with the latest versions of OLCS. https://olcs.netlify.com/
Thanks.