Animation easings - Azure Maps Web SDK Samples                 var map, point; function getMap() { //Initialize a map instance. map = new atlas.Map('myMap', { zoom: 3, pitch: 60, view: 'Auto', //Add authentication details for connecting to Azure Maps. authOptions: { //Use Microsoft Entra ID authentication. authType: 'anonymous', clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', //Your Azure Maps client id for accessing your Azure Maps account. getToken: function (resolve, reject, map) { //URL to your authentication service that retrieves an Microsoft Entra ID Token. var tokenServiceUrl = 'https://web.archive.org./web/20240714112321/https://samples.azuremaps.com/api/GetAzureMapsToken'; fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token)); } //Alternatively, use an Azure Maps key. Get an Azure Maps key at https://azure.com/maps. NOTE: The primary key should be used as the key. //authType: 'subscriptionKey', //subscriptionKey: '[YOUR_AZURE_MAPS_KEY]' } }); //Wait until the map resources are ready. map.events.add('ready', function () { point = new atlas.Shape(new atlas.data.Point([0,0])); //Create a data source and add it to the map. datasource = new atlas.source.DataSource(); map.sources.add(datasource); //Add the data to the data source. datasource.add(point); //Add a layer for rendering point data. This could be any layer that supports rendering point data. map.layers.add(new atlas.layer.SymbolLayer(datasource, null, { iconOptions: { offset: ['get', 'offset'], //For smoother animation, ignore the placement of the icon. This skips the label collision calculations and allows the icon to overlap map labels. ignorePlacement: true, //For smoother animation, allow symbol to overlap all other symbols on the map. allowOverlap: true } })); //Load the easing function dropdown //Get a list of the easing functions. var html = ['']; atlas.animations.getEasingNames().forEach(e => { html.push(``); }); document.getElementById('easingFns').innerHTML = html.join(''); //Initialize the chart. easingChart = new Chart(document.getElementById('easingChart'), { type: 'line', data: { //X-axis labels: xAxis }, options: { legend: { display: false }, elements: { line: { fill: false, borderColor: 'red', }, point:{ radius: 0 } }, responsive: true, title: { display: false }, scales: { xAxes: [{ display: true, scaleLabel: { display: true, labelString: 'Progress' } }], yAxes: [{ display: true, scaleLabel: { display: true, labelString: 'Value' } }] } } }); }); } var xAxis = [0,0.1, 0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1]; var easingChart; var easing; var animation; function easingChanged(elm){ //Chart the easing function. if(elm){ easingName = elm.value; } var easingFn = atlas.animations.getEasingFn(easingName); var data = []; if(easingFn){ for(var i = 0; i < xAxis.length; i++){ data.push(easingFn(xAxis[i])); } } easingChart.data.datasets[0] = { data: data }; easingChart.update(); //Animate the point to a new random location using the easing function. var randomPos = [Math.random() * 360 - 180, Math.random() * 170 - 85]; if(animation){ animation.dispose(); } animation = atlas.animations.drop(point, null, null, { duration: 2000, easing: easingName, autoPlay: true }); }      Easing:         Animation easings This sample demonstrates the different built in easing functions in the Azure Maps animation module. This sample uses the open source Azure Maps Animation module