Skip to content

Commit 1907776

Browse files
committed
Updated food locations and
1 parent 51adc42 commit 1907776

File tree

1 file changed

+15
-21
lines changed
  • vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo

1 file changed

+15
-21
lines changed

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

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,17 @@ public class LeafletView extends VerticalLayout
3737
private final Button btnLunch = new Button("Where do XDEV employees go for lunch?");
3838
private LMap map;
3939

40-
private LMarker markerZob;
41-
private LMarker markerRathaus;
40+
private final LMarker markerZob = new LMarker(49.673470, 12.160108, "ZoB");
41+
private final LMarker markerRathaus = new LMarker(49.675519, 12.163868, "L-22556");
4242

43-
private LCircle circleRange;
44-
private LMarker markerPizza;
45-
private LMarker markerKebab;
46-
private LMarker markerAsia;
47-
private LMarker markerGreek;
48-
private LMarker markerBakery;
49-
private LMarker markerLeberkaese;
43+
private final LCircle circleRange = new LCircle(49.675126, 12.160733, 450);
44+
private final LMarker markerPizza = new LMarker(49.674413, 12.160925);
45+
private final LMarker markerKebab = new LMarker(49.673026, 12.156278);
46+
private final LMarker markerAsia = new LMarker(49.675039, 12.162127);
47+
private final LMarker markerGreek = new LMarker(49.675126, 12.161899);
48+
private final LMarker markerBakery = new LMarker(49.674806, 12.160249);
49+
private final LMarker markerSchnitzel = new LMarker(49.673800, 12.160113);
50+
private final LMarker markerBratwurst = new LMarker(49.674907, 12.161937);
5051

5152
public LeafletView()
5253
{
@@ -90,7 +91,8 @@ private void btnLunchClick(final ClickEvent<Button> event)
9091
this.markerAsia,
9192
this.markerGreek,
9293
this.markerBakery,
93-
this.markerLeberkaese);
94+
this.markerSchnitzel,
95+
this.markerBratwurst);
9496

9597
this.map.setViewPoint(new LCenter(49.675126, 12.160733, this.viewLunch ? 16 : 17));
9698
this.map.removeLComponents(this.viewLunch ? normalComponents : lunchComponents);
@@ -101,7 +103,6 @@ private void btnLunchClick(final ClickEvent<Button> event)
101103

102104
private void initMapComponents()
103105
{
104-
this.markerZob = new LMarker(49.673470, 12.160108, "ZoB");
105106
this.markerZob.setPopup("Central bus station");
106107

107108
final LMarker markerXDev = new LMarker(49.675806677512824, 12.160990185846394);
@@ -155,28 +156,21 @@ private void initMapComponents()
155156
polylineRouteZOB.setStrokeOpacity(0.5);
156157
polylineRouteZOB.setPopup("Route to ZOB");
157158

158-
this.markerRathaus = new LMarker(49.675519, 12.163868, "L-22556");
159159
this.markerRathaus.setPopup("Old Town Hall");
160160

161-
this.circleRange = new LCircle(49.675126, 12.160733, 450);
162-
163-
this.markerPizza = new LMarker(49.674413, 12.160925);
164161
this.markerPizza.setPopup("Pizza!");
165162

166-
this.markerKebab = new LMarker(49.673026, 12.156278);
167163
this.markerKebab.setPopup("Kebab!");
168164

169-
this.markerAsia = new LMarker(49.675039, 12.162127);
170165
this.markerAsia.setPopup("Asian Food");
171166

172-
this.markerGreek = new LMarker(49.675126, 12.161899);
173167
this.markerGreek.setPopup("Greek Food");
174168

175-
this.markerBakery = new LMarker(49.674806, 12.160249);
176169
this.markerBakery.setPopup("Fresh baked stuff");
177170

178-
this.markerLeberkaese = new LMarker(49.673800, 12.160113);
179-
this.markerLeberkaese.setPopup("Fast food like Leberkäsesemmeln");
171+
this.markerSchnitzel.setPopup("Fast food like Schnitzel");
172+
173+
this.markerBratwurst.setPopup("Bratwurst");
180174

181175
this.map = new LMap(49.675126, 12.160733, 17);
182176
this.map.setTileLayer(LTileLayer.DEFAULT_OPENSTREETMAP_TILE);

0 commit comments

Comments
 (0)