Jump to content

Custom Acars Map


OmerAslan

Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

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?

Link to comment
Share on other sites

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

  • Moderators

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;

 

Link to comment
Share on other sites

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>

 

Link to comment
Share on other sites

  • 3 years later...
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

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...