A simple 3D GPS instrument (aka tablet) for FlightGear Flight Simulator
Just include the file GPS.xml as a model in the aircraft's model xml, example:
<model>
<path>Aircraft/737/Models/FlightGearSimpleGPSMap/GPS.xml</path>
<offsets>
<x-m>0.0</x-m>
<y-m>0.0</y-m>
<z-m>0.0</z-m>
</offsets>
</model>
and then include the nasal script at the aircraft's -set file, example:
<nasal>
<gps>
<file>Aircraft/737/Models/FlightGearSimpleGPSMap/GPS.nas</file>
</gps>
</nasal>
Make sure to include it inside a <gps>
tag or the buttons wont work.
2 current providers:
and
you can add more providers by adding em to the 'types' array inside the GPS.nas
file, you just need to know the correct url pattern
var types = [
...other types,
{
minmaxzoom : [2,14],
type : "example-type",
urlTemplate : "http://example-url.com/{type}/{z}/{x}/{y}.png",
urlPath : "/{type}/{z}/{x}/{y}.png"
}
];
You can easily change the 3D model, just make sure to keep all button names and the screen name as they are, do not change them.