How to change mapbox marker, my current marker is a point? -


here code snippet script. want change car image or pin marker idea how change tried change multiple times didnt work. i want marker

map.addcontrol(new mapboxgl.navigation()); function pointoncircle(angle) { return {     "type": "point",     "coordinates": [long, lat] }; }  map.on('load', function () { // add source , layer displaying point animated in circle. map.addsource('point', {     "type": "geojson",     "data": pointoncircle(0) });  map.addlayer({     "id": "point",     "source": "point",     "type": "circle",     "paint": {         "circle-radius": 10,         "circle-color": "#ff0000"     }     "icon": "../assets/blue-marker.png" });  function animatemarker(timestamp) {     // update data new position based on animation timestamp.     // divisor in expression `timestamp / 1000` controls animation speed.     map.getsource('point').setdata(pointoncircle(timestamp /800));      // request next frame of animation.     requestanimationframe(animatemarker);  } // start animation. animatemarker(0); 


Comments