skyguyt Posted January 29, 2021 Report Share Posted January 29, 2021 (edited) Completed the .htaccess/url rewrite actions tonight on my website but am running into an issue with making the icons re-appear on various pages. I did figure out the view pirep page fix by changing var url = window.location.href.split("index.php")[0]; to var url = window.location.href.split("pireps")[0]; inside of the phpvms.js file but can not quite figure out how to fix the live map in air icons with the following code written in the acarsmap.js const getHeadingIcon = (heading) => { if (!(heading in headingIcons)) { headingIcons[heading] = L.icon({ iconUrl: url + "/lib/images/inair/" + heading + ".png", iconSize: [35, 35] }); } return headingIcons[heading]; }; Any help would be much appreciated! Version: 5.5.2 (Simpilot's) php Version: 5.4 MySQL Thank you! Edited February 1, 2021 by skyguyt Quote Link to comment Share on other sites More sharing options...
Curshad Posted February 1, 2021 Report Share Posted February 1, 2021 Nothing looks wrong from what i can see. Try a hard refresh Ctrl+f5 if nothing still shows up you need to go to the acars map template file and make sure your url links in those files are reflecting your new url maybe it's still using the old url link. Quote Link to comment Share on other sites More sharing options...
skyguyt Posted February 1, 2021 Author Report Share Posted February 1, 2021 15 hours ago, Curshad said: Nothing looks wrong from what i can see. Try a hard refresh Ctrl+f5 if nothing still shows up you need to go to the acars map template file and make sure your url links in those files are reflecting your new url maybe it's still using the old url link. Thanks for pointing out actually looking at the acars map file instead of just the acars.js file. I fixed it by removing the url portion of the script; iconUrl: url + "/lib/images/inair/" + heading + ".png", to iconUrl: "/lib/images/inair/" + heading + ".png", And it works great! 1 1 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.