@@ -37,16 +37,17 @@ public class LeafletView extends VerticalLayout
37
37
private final Button btnLunch = new Button ("Where do XDEV employees go for lunch?" );
38
38
private LMap map ;
39
39
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" ) ;
42
42
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 );
50
51
51
52
public LeafletView ()
52
53
{
@@ -90,7 +91,8 @@ private void btnLunchClick(final ClickEvent<Button> event)
90
91
this .markerAsia ,
91
92
this .markerGreek ,
92
93
this .markerBakery ,
93
- this .markerLeberkaese );
94
+ this .markerSchnitzel ,
95
+ this .markerBratwurst );
94
96
95
97
this .map .setViewPoint (new LCenter (49.675126 , 12.160733 , this .viewLunch ? 16 : 17 ));
96
98
this .map .removeLComponents (this .viewLunch ? normalComponents : lunchComponents );
@@ -101,7 +103,6 @@ private void btnLunchClick(final ClickEvent<Button> event)
101
103
102
104
private void initMapComponents ()
103
105
{
104
- this .markerZob = new LMarker (49.673470 , 12.160108 , "ZoB" );
105
106
this .markerZob .setPopup ("Central bus station" );
106
107
107
108
final LMarker markerXDev = new LMarker (49.675806677512824 , 12.160990185846394 );
@@ -155,28 +156,21 @@ private void initMapComponents()
155
156
polylineRouteZOB .setStrokeOpacity (0.5 );
156
157
polylineRouteZOB .setPopup ("Route to ZOB" );
157
158
158
- this .markerRathaus = new LMarker (49.675519 , 12.163868 , "L-22556" );
159
159
this .markerRathaus .setPopup ("Old Town Hall" );
160
160
161
- this .circleRange = new LCircle (49.675126 , 12.160733 , 450 );
162
-
163
- this .markerPizza = new LMarker (49.674413 , 12.160925 );
164
161
this .markerPizza .setPopup ("Pizza!" );
165
162
166
- this .markerKebab = new LMarker (49.673026 , 12.156278 );
167
163
this .markerKebab .setPopup ("Kebab!" );
168
164
169
- this .markerAsia = new LMarker (49.675039 , 12.162127 );
170
165
this .markerAsia .setPopup ("Asian Food" );
171
166
172
- this .markerGreek = new LMarker (49.675126 , 12.161899 );
173
167
this .markerGreek .setPopup ("Greek Food" );
174
168
175
- this .markerBakery = new LMarker (49.674806 , 12.160249 );
176
169
this .markerBakery .setPopup ("Fresh baked stuff" );
177
170
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" );
180
174
181
175
this .map = new LMap (49.675126 , 12.160733 , 17 );
182
176
this .map .setTileLayer (LTileLayer .DEFAULT_OPENSTREETMAP_TILE );
0 commit comments