Showing 1 changed files with 5 additions and 1 deletions
+5 -1
Nasal/map.nas
... ...
@@ -4,7 +4,6 @@ var MapTiles = {
4 4
     new : func (display) {
5 5
         var m = { parents: [MapTiles] };
6 6
         m.display = display;
7
-        m.group = m.display.createGroup();
8 7
         m.tile_size = 256;
9 8
         m.zoom = 10;
10 9
         m.maps_base = getprop("/sim/fg-home") ~ '/cache/maps';
... ...
@@ -18,6 +17,11 @@ var MapTiles = {
18 17
             (m.num_tiles[0] - 1) / 2,
19 18
             (m.num_tiles[1] - 1) / 2
20 19
         ];
20
+        m.group = m.display.createGroup()
21
+            .setCenter(
22
+                    m.display.get('view[0]') / 2,
23
+                    m.display.get('view[1]') / 2
24
+            );
21 25
         m.tiles = setsize([], m.num_tiles[0]);
22 26
         m.last_tile = [-1,-1];
23 27
         m.last_type = data['tiles-type'];