Exemplo n.º 1
0
 public OsmBugsUtil getOsmbugsUtil(OpenStreetNote bug) {
   OsmandSettings settings = ((OsmandApplication) activity.getApplication()).getSettings();
   if ((bug != null && bug.isLocal())
       || settings.OFFLINE_EDITION.get()
       || !settings.isInternetConnectionAvailable(true)) {
     return local;
   } else {
     return remote;
   }
 }
Exemplo n.º 2
0
 @Override
 public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
   if (tileBox.getZoom() >= startZoom) {
     // request to load
     data.queryNewData(tileBox);
     List<OpenStreetNote> objects = data.getResults();
     if (objects != null) {
       for (OpenStreetNote o : objects) {
         int x = tileBox.getPixXFromLonNoRot(o.getLongitude());
         int y = tileBox.getPixYFromLatNoRot(o.getLatitude());
         canvas.drawCircle(
             x,
             y,
             getRadiusBug(tileBox),
             o.isLocal() ? pointNotSubmitedUI : (o.isOpened() ? pointOpenedUI : pointClosedUI));
       }
     }
   }
 }