Skip to content

Commit f19b1a0

Browse files
Merge pull request #201 from xdev-software/127-settilelayer-does-not-remove-the-previous-layer
Added LMap Constructor for tileLayer
2 parents 19fcdae + 26871e1 commit f19b1a0

File tree

1 file changed

+12
-0
lines changed
  • vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/flow

1 file changed

+12
-0
lines changed

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/flow/LMap.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ public LMap(final double lat, final double lon, final int zoom)
8585
this.setViewPoint(this.center);
8686
}
8787

88+
public LMap(final double lat, final double lon, final int zoom, final LTileLayer tileLayer)
89+
{
90+
this(lat, lon, zoom);
91+
this.setTileLayer(tileLayer);
92+
}
93+
94+
public LMap(final LTileLayer tileLayer)
95+
{
96+
this();
97+
this.setTileLayer(tileLayer);
98+
}
99+
88100
public void setZoom(final int zoom)
89101
{
90102
this.getElement().executeJs(CLIENT_MAP + ".setZoom(" + zoom + ");");

0 commit comments

Comments
 (0)