This is Java version of leaflet library for rendering of mobile friendly interactive maps. The API has been designed by students of Johannes Kepler University of Linz (Andreas Grimmer, Christoph Sperl, Stefan Wurzinger) as part of their 2015 API Design course. The API has been adopted and is distributed as part of the DukeScript project. Here is a sample code to help you relalize where the Johannes Kepler University is:
// Create a map zoomed to Linz. {@link net.java.html.leaflet.MapOptions} mapOptions = new {@link net.java.html.leaflet.MapOptions}() .setCenter(new LatLng(48.336614, 14.319305)) .setZoom(15); final {@link net.java.html.leaflet.Map} map = new {@link net.java.html.leaflet.Map}("map", mapOptions); // add a tile layer to the map {@link net.java.html.leaflet.TileLayerOptions} tlo = new {@link net.java.html.leaflet.TileLayerOptions}(); tlo.setAttribution("Map data © <a href='http://www.thunderforest.com/opencyclemap/'>OpenCycleMap</a> contributors, " + "<a href='http://creativecommons.org/licenses/by-sa/2.0/'>CC-BY-SA</a>, " + "Imagery © <a href='http://www.thunderforest.com/'>Thunderforest</a>"); tlo.setMaxZoom(18); {@link net.java.html.leaflet.TileLayer} layer = new {@link net.java.html.leaflet.TileLayer}("http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png", tlo); map.addLayer(layer); // Add a polygon. When you click on the polygon a popup shows up {@link net.java.html.leaflet.Polygon} polygonLayer = new {@link net.java.html.leaflet.Polygon}(new LatLng[] { new {@link net.java.html.leaflet.LatLng}(48.335067, 14.320660), new {@link net.java.html.leaflet.LatLng}(48.337335, 14.323642), new {@link net.java.html.leaflet.LatLng}(48.335238, 14.328942), new {@link net.java.html.leaflet.LatLng}(48.333883, 14.327612) }); polygonLayer.addMouseListener({@link net.java.html.leaflet.event.MouseEvent}.Type.CLICK, new {@link net.java.html.leaflet.event.MouseListener}() { {@code @Override} public void onEvent(MouseEvent ev) { {@link net.java.html.leaflet.PopupOptions} popupOptions = new {@link net.java.html.leaflet.PopupOptions}().setMaxWidth(400); {@link net.java.html.leaflet.Popup} popup = new {@link net.java.html.leaflet.Popup}(popupOptions); popup.setLatLng(ev.getLatLng()); popup.setContent("The Leaflet API for Java has been created here!"); popup.openOn(map); } }); map.addLayer(polygonLayer);