Exemplo n.º 1
0
  public void setMarcador(Aulas aula) {
    String cx = String.valueOf(aula.getCoordenadaX());
    String cy = String.valueOf(aula.getCoordenadaY());
    String contenido = aula.getContenido();

    if (cx != null && cy != null && contenido != null) {
      browser.executeJavaScript(
          "var marker;"
              + "        marker = new google.maps.Marker({"
              + "          position: new google.maps.LatLng("
              + cx
              + ", "
              + cy
              + "),"
              + "          map: map"
              + "    });"
              + "     google.maps.event.addListener(marker, 'click', (function(marker) {"
              + "       return function() {"
              + "        map.setZoom(32);"
              + "        map.setCenter(marker.getPosition());"
              + "        infowindow.setContent(\""
              + contenido
              + "\");"
              + "        infowindow.open(map, marker);"
              + "      }"
              + "    })(marker));");
    }
  }
Exemplo n.º 2
0
 public void walkFolders(final Browser browser) {
   for (final String path : paths) {
     try {
       final Path rootPath = Paths.get(path);
       Files.walkFileTree(rootPath, new AudioFileVistor());
     } catch (final IOException e) {
       e.printStackTrace();
     }
   }
   browser.executeJavaScript("mediaScanner.completeScanning();");
 }