OmerAslan Posted June 15, 2017 Report Share Posted June 15, 2017 Hello, I found this website https://www.mapbox.com for making beautiful map and i did. I add on my acarsmap.php in templates folder. I add this code to top <script src='https://api.mapbox.com/mapbox-gl-js/v0.38.0/mapbox-gl.js'></script> <link href='https://api.mapbox.com/mapbox-gl-js/v0.38.0/mapbox-gl.css' rel='stylesheet' /> and change this script to their script var acars_map_defaults = { autozoom: false, zoom: 3, center: new google.maps.LatLng("<?php echo Config::Get('MAP_CENTER_LAT'); ?>", "<?php echo Config::Get('MAP_CENTER_LNG'); ?>"), mapTypeId: google.maps.MapTypeId. HYBRID, refreshTime: 10000 }; </script> Map comes to the page but didn't show flights... Any help would be very useful about this. Thanks. Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted June 15, 2017 Moderators Report Share Posted June 15, 2017 I do not know a lot because I am not that familiar with acarsmap but can you try removing the space which is inside the mapTypeId? Some like this: mapTypeId: google.maps.MapTypeId.HYBRID, What is your website url? Do you get any javascript errors? Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted June 15, 2017 Author Report Share Posted June 15, 2017 (edited) 1 hour ago, servetas said: I do not know a lot because I am not that familiar with acarsmap but can you try removing the space which is inside the mapTypeId? Some like this: mapTypeId: google.maps.MapTypeId.HYBRID, What is your website url? Do you get any javascript errors? Hi George, didn't work. I have flights all the time but seems like no flights. http://www.turkishva.com/index.php/acars Edited June 15, 2017 by OmerAslan Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted June 15, 2017 Moderators Report Share Posted June 15, 2017 If you review the javascript errors of your website, it is clear. Quote ReferenceError: acars_map_defaults is not defined Define acars_map_defaults or open lib/js/acarsmap.js and replace this: var options = $.extend({}, defaultOptions, acars_map_defaults); with this: var options = defaultOptions; Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted June 15, 2017 Author Report Share Posted June 15, 2017 4 minutes ago, servetas said: If you review the javascript errors of your website, it is clear. Define acars_map_defaults or open lib/js/acarsmap.js and replace this: var options = $.extend({}, defaultOptions, acars_map_defaults); with this: var options = defaultOptions; this is what i get uncaught exception: InvalidValueError: initMap is not a function (unknown) TypeError: a is null[Learn More] js:88:388 _.og https://maps.googleapis.com/maps/api/js:88:388 tg https://maps.googleapis.com/maps/api/js:90:74 <anonymous> Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted June 15, 2017 Moderators Report Share Posted June 15, 2017 Does it work now? Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted June 15, 2017 Author Report Share Posted June 15, 2017 no i got other error line 37 this time Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted June 15, 2017 Moderators Report Share Posted June 15, 2017 This error is known. If the map is working you can ignore it. Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted June 15, 2017 Author Report Share Posted June 15, 2017 not working George. only map shows but flights not. Seems like no flights. But there are 5-6 flights going on now... Quote Link to comment Share on other sites More sharing options...
Lebitek Posted July 27, 2020 Report Share Posted July 27, 2020 On 15/6/2017 at 15:10, OmerAslan said: No trabaja George. solo se muestran mapas pero no vuelos. Parece que no hay vuelos. Pero ahora hay entre 5 y 6 vuelos ... Good morning, I would like to know if I found the solution, I have a personalized home page, outside the phpvms installation and it does not complete see the flights online, I would appreciate help. thank you 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.