Hi, If you use Label then you should do: label.setEscapeModelStrings(true).
But for your case I'd recommend using OnDomReadyHeaderItem.forScript() Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Sun, Feb 1, 2015 at 11:44 PM, Chris <[email protected]> wrote: > Hi all, > > I would like to use Leaflet JS library in order to display open street > maps. According to this library, certain JS code has to be placed in the > body element of the html underneath a div element, e.g.: > > <body> > <div id="map"></div> > <script> > var map = L.map('map').setView([51.505, -0.09], 13); > L.tileLayer('https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png', { > maxZoom: 18, > attribution: 'Map data © <a > href="http://openstreetmap.org">OpenStreetMap</a> > contributors, ' + > '<a > href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, > ' + > 'Imagery © <a href="http://mapbox.com">Mapbox</a>', > id: 'examples.map-i875mjb7' > }).addTo(map); > L.marker([51.5, -0.09]).addTo(map) > .bindPopup("<b>Hello world!</b><br />I am a > popup.").openPopup(); > L.circle([51.508, -0.11], 500, { > color: 'red', > fillColor: '#f03', > fillOpacity: 0.5 > }).addTo(map).bindPopup("I am a circle."); > </script> > </body> > > What is the best way to generate this code in wicket so that map makers > can be set dynamically? > I tried to insert it via add(new Label("script“,“...“) but in this case, > all the quotation marks are escaped in a wrong way (using \). > > Thanks a lot, Chris
