1

i want to add a marker on may map but i have to add pulsate class my marker like google map jsfiddle

can anyone help me? this is my code

 var vectorSource = new ol.source.Vector({
            //create empty vector
        });
        var iconFeature = new ol.Feature({
            geometry: new ol.geom.Point(ol.proj.transform([42, 28)], 'EPSG:4326', 'EPSG:3857')),
            attribute: {}
        });
        vectorSource.addFeature(iconFeature);
        //var iconStyle = isemri.turnBackDefaultMarkerStyle(data[i].isemriKaynagi.name)

        //add the feature vector to the layer vector, and apply a style to whole layer
        var vectorLayer = new ol.layer.Vector({
            source: vectorSource,
            //style: iconStyle
        });
        vectorLayer.getSource().getFeatures()[0].setStyle(iconStyle)
        vectorLayer.setProperties({ attributes: {}, type: "marker" });
        map.addLayer(vectorLayer);

1 Answer 1

3

For a few "markers" a solution can be implement them as overlays and use CSS3 or SVG to animate them. See example: http://acanimal.github.io/thebookofopenlayers3/chapter06_markers_overlays.html

Take into account overlays does not offers a great performance, as you can see in the examples, when many overlays are animated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.