miniarma Posted October 12, 2019 Report Share Posted October 12, 2019 (edited) In the old version of the site I had muiltiple airline icons showing on the live map. I've since updated to V2 and now its using different maps. Is there anyone who can help recode to have the multiple inair icons working again. Reference to this code how would it be implemented for Openstreet maps ? var pos = new google.maps.LatLng(lat, lng); flightMarkers[flightMarkers.length] = new google.maps.Marker({ position: pos, map: map, icon: url+"/lib/images/inair/"+data[i].code+"/"+data[i].heading+".png", flightdetails: data[i], infowindow_content: detailed_bubble }); I've tried just replacing the following code but hasnt worked. iconUrl: url+"/lib/images/inair/"+data.code+"/"+data.heading+".png", This is the openmaps code now /** * Get the marker for a specific heading * @param {*} heading */ const getHeadingIcon = (heading) => { if (!(heading in headingIcons)) { headingIcons[heading] = L.icon({ iconUrl: url + "/lib/images/inair/" + heading + ".png", iconSize: [35, 35] }); } return headingIcons[heading]; }; website is http://www.easyworldairlines.com/index.php/acars Any help would be appreciated. Thanks Edited October 12, 2019 by miniarma Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.