-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Excluded transitive commercial vaadin deps
- Loading branch information
Showing
13 changed files
with
132 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...facete3-app-vaadin/src/main/java/org/aksw/facete3/app/vaadin/components/MapComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.aksw.facete3.app.vaadin.components; | ||
|
||
import com.vaadin.addon.leaflet4vaadin.LeafletMap; | ||
import com.vaadin.addon.leaflet4vaadin.layer.map.options.DefaultMapOptions; | ||
import com.vaadin.addon.leaflet4vaadin.layer.map.options.MapOptions; | ||
import com.vaadin.addon.leaflet4vaadin.types.LatLng; | ||
import com.vaadin.flow.component.orderedlayout.VerticalLayout; | ||
|
||
public class MapComponent | ||
extends VerticalLayout | ||
{ | ||
public MapComponent() { | ||
setSizeFull(); | ||
// // Create the registry which is needed so that components can be reused and their methods invoked | ||
// // Note: You normally don't need to invoke any methods of the registry and just hand it over to the components | ||
// final LComponentManagementRegistry reg = new LDefaultComponentManagementRegistry(this); | ||
// | ||
// // Create and add the MapContainer (which contains the map) to the UI | ||
// final MapContainer mapContainer = new MapContainer(reg); | ||
// mapContainer.setSizeFull(); | ||
// this.add(mapContainer); | ||
// | ||
// final LMap map = mapContainer.getlMap(); | ||
// | ||
// // Add a (default) TileLayer so that we can see something on the map | ||
// map.addLayer(LTileLayer.createDefaultForOpenStreetMapTileServer(reg)); | ||
// | ||
// // Set what part of the world should be shown | ||
// map.setView(new LLatLng(reg, 49.6751, 12.1607), 17); | ||
// | ||
// // Create a new marker | ||
// new LMarker(reg, new LLatLng(reg, 49.6756, 12.1610)) | ||
// // Bind a popup which is displayed when clicking the marker | ||
// .bindPopup("XDEV Software") | ||
// // Add it to the map | ||
// .addTo(map); | ||
|
||
MapOptions options = new DefaultMapOptions(); | ||
options.setCenter(new LatLng(47.070121823, 19.204101562500004)); | ||
options.setZoom(7); | ||
LeafletMap leafletMap = new LeafletMap(options); | ||
leafletMap.setBaseUrl("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"); | ||
|
||
this.add(leafletMap); | ||
// tabs.newTab("map", "Map", new ManagedComponentSimple(leafletMap)); | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.