Jump to content

V2 live map icons Help Please


miniarma

Recommended Posts

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 by miniarma
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...