package sk.drunkenpanda.leaflet.example.pages;

import javax.inject.Inject;

import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.request.mapper.parameter.PageParameters;

import sk.drunkenpanda.leaflet.components.map.Map;
import sk.drunkenpanda.leaflet.components.map.MapOptions;
import sk.drunkenpanda.leaflet.example.config.MapboxConfiguration;
import sk.drunkenpanda.leaflet.models.LatLng;
import sk.drunkenpanda.leaflet.models.TileLayer;
import sk.drunkenpanda.leaflet.models.TileLayerOptions;

public class HomePage extends AbstractLeafletExamplePage {
    private static final long serialVersionUID = 1L;

    @Inject
    private MapboxConfiguration mapboxConfiguration;

    public HomePage(final PageParameters parameters) {
        super(parameters);

        final IModel<LatLng> center = new Model<LatLng>(new LatLng(51.505, -0.09));

        final TileLayerOptions tilesOptions = new TileLayerOptions()
                .setAttribution("Map data &copy;...")
                .setMaxZoom(18)
                .addExtraParameter("id", mapboxConfiguration.getMapId())
                .addExtraParameter("accessToken", mapboxConfiguration.getAccessToken());
        final TileLayer tileLayer = new TileLayer(mapboxConfiguration.getUrlTemplate(), tilesOptions);

        final MapOptions options = new MapOptions()
                .setZoom(13)
                .setDoubleClickZoom(false)
                .addLayer(tileLayer);
        add(new Map("map", center, options));
    }
}

@@ -864,18 +864,17 @@
 ng%3E(
-new 
 LatLng
+.of
 (51.
@@ -933,20 +933,16 @@
 ptions =
- new
  TileLay
@@ -946,24 +946,32 @@
 LayerOptions
+.builder
 ()%0A         
@@ -982,12 +982,9 @@
    .
-setA
+a
 ttri
@@ -1033,12 +1033,9 @@
    .
-setM
+m
 axZo
@@ -1050,35 +1050,35 @@
                .
-add
+put
 ExtraParameter(%22
@@ -1075,16 +1075,17 @@
 arameter
+s
 (%22id%22, m
@@ -1132,19 +1132,19 @@
        .
-add
+put
 ExtraPar
@@ -1149,16 +1149,17 @@
 arameter
+s
 (%22access
@@ -1203,16 +1203,41 @@
 Token())
+%0A                .build()
 ;%0A      
@@ -1265,20 +1265,16 @@
 eLayer =
- new
  TileLay
@@ -1275,16 +1275,19 @@
 ileLayer
+.of
 (mapboxC

Fix HomePage example