altosui: Add config and pyro tabs to graph widget
[fw/altos] / altosdroid / app / src / main / java / org / altusmetrum / AltosDroid / AltosMapOffline.java
index cca958c50f873f1f0afbed954f241bebfdfd8bbb..7bd57a4ca39ebfcd19e44a130c91ef20c15db2a8 100644 (file)
@@ -223,12 +223,20 @@ public class AltosMapOffline extends View implements ScaleGestureDetector.OnScal
                MapMark(double lat, double lon, int state) {
                        super(lat, lon, state);
                }
+
+               MapMark(double lat, double lon, int state, String label) {
+                       super(lat, lon, state, label);
+               }
        }
 
        public AltosMapMark new_mark(double lat, double lon, int state) {
                return new MapMark(lat, lon, state);
        }
 
+       public AltosMapMark new_mark(double lat, double lon, int state, String label) {
+               return new MapMark(lat, lon, state, label);
+       }
+
        public int width() {
                return getWidth();
        }
@@ -352,6 +360,10 @@ public class AltosMapOffline extends View implements ScaleGestureDetector.OnScal
                        debug("MapView draw without map\n");
                        return;
                }
+               if (map.transform == null) {
+                       debug("MapView draw without transform\n");
+                       return;
+               }
                canvas = view_canvas;
                paint = new Paint(Paint.ANTI_ALIAS_FLAG);
                paint.setStrokeWidth(stroke_width);