Search in sources :

Example 11 with LTileLayer

use of org.vaadin.addon.leaflet.LTileLayer in project v-leaflet by mstahv.

the class MapAntWMTSExample method getTestComponent.

@Override
public Component getTestComponent() {
    LMap leafletMap = new LMap();
    leafletMap.setCrs(Crs.EPSG3857);
    LTileLayer tileLayer = new LTileLayer("http://wmts.mapant.fi/wmts_EPSG3857.php?z={z}&x={x}&y={y}");
    tileLayer.setMaxZoom(19);
    tileLayer.setMinZoom(7);
    tileLayer.setAttributionString("<a href=\"http://www.maanmittauslaitos.fi/en/digituotteet/laser-scanning-data\" target=\"_blank\">Laser scanning</a> and <a href=\"http://www.maanmittauslaitos.fi/en/digituotteet/topographic-database\" target=\"_blank\">topographic</a> data provided by the <a href=\"http://www.maanmittauslaitos.fi/en\" target=\"_blank\">National Land Survey of Finland</a> under the <a href=\"https://creativecommons.org/licenses/by/4.0/legalcode\">Creative Commons license</a>.");
    leafletMap.addLayer(tileLayer);
    leafletMap.setCenter(61.0, 26);
    leafletMap.setZoomLevel(17);
    return leafletMap;
}
Also used : LMap(org.vaadin.addon.leaflet.LMap) LTileLayer(org.vaadin.addon.leaflet.LTileLayer)

Example 12 with LTileLayer

use of org.vaadin.addon.leaflet.LTileLayer in project v-leaflet by mstahv.

the class MapInWindowIssue19 method createTileLayer.

private AbstractLeafletLayer createTileLayer(String name, String url, boolean tms, String... servers) {
    LTileLayer layer = new LTileLayer();
    layer.setCaption(name);
    layer.setUrl(url);
    layer.setActive(false);
    layer.setTms(tms);
    layer.setSubDomains(servers);
    return layer;
}
Also used : LTileLayer(org.vaadin.addon.leaflet.LTileLayer)

Example 13 with LTileLayer

use of org.vaadin.addon.leaflet.LTileLayer in project v-leaflet by mstahv.

the class CenterAndZoomTest method getTestComponent.

@Override
public Component getTestComponent() {
    map = new LMap();
    map.setCenter(40, -105.2);
    map.setZoomLevel(6);
    LTileLayer tf = new LTileLayer();
    tf.setUrl("https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png");
    tf.setAttributionString("Tiles Courtesy of <a href=\"https://www.thunderforest.com/\" target=\"_blank\">Thunderforest</a>" + "&nbspand OpenStreetMap contributors");
    tf.setSubDomains(new String[] { "a", "b", "c" });
    tf.setActive(true);
    map.addBaseLayer(tf, "ThunderForest Transport");
    return map;
}
Also used : LMap(org.vaadin.addon.leaflet.LMap) LTileLayer(org.vaadin.addon.leaflet.LTileLayer)

Aggregations

LTileLayer (org.vaadin.addon.leaflet.LTileLayer)13 LMap (org.vaadin.addon.leaflet.LMap)7 Point (org.vaadin.addon.leaflet.shared.Point)3 ExternalResource (com.vaadin.server.ExternalResource)2 Button (com.vaadin.ui.Button)2 ClickEvent (com.vaadin.ui.Button.ClickEvent)2 Component (com.vaadin.ui.Component)2 VerticalLayout (com.vaadin.ui.VerticalLayout)2 LLayerGroup (org.vaadin.addon.leaflet.LLayerGroup)2 LMarker (org.vaadin.addon.leaflet.LMarker)2 LWmsLayer (org.vaadin.addon.leaflet.LWmsLayer)2 LeafletClickEvent (org.vaadin.addon.leaflet.LeafletClickEvent)2 LeafletClickListener (org.vaadin.addon.leaflet.LeafletClickListener)2 Bounds (org.vaadin.addon.leaflet.shared.Bounds)2 HasValue (com.vaadin.data.HasValue)1 ClickListener (com.vaadin.ui.Button.ClickListener)1 CheckBox (com.vaadin.ui.CheckBox)1 Grid (com.vaadin.ui.Grid)1 HorizontalSplitPanel (com.vaadin.ui.HorizontalSplitPanel)1 Label (com.vaadin.ui.Label)1