Class WLeafletMap


public class WLeafletMap
extends WCompositeWidget
A widget that displays a leaflet map.

This is a simple wrapper around the Leaflet JavaScript library.

Leaflet itself does not provide maps. It is a JavaScript library that enables you to use any "tile server", like OpenStreetMap. If you just create a WLeafletMap (and give it a size), then you will be presented with an empty map. You can then add tile layers to the map using addTileLayer().

WLeafletMap is not exhaustive in its support for Leaflet features. It supports a subset out of the box. One of these features is markers, which come in two flavors: standard leaflet markers (WLeafletMap.LeafletMarker) and widget markers (WLeafletMap.WidgetMarker). Using a widget marker, you can place arbitrary widgets on the map.

If you need direct access to the leaflet map in your own custom JavaScript, you can use getMapJsRef().

Leaflet itself is not bundled with JWt. Use the leafletJSURL and leafletCSSURL properties to configure where the JavaScript and CSS of Leaflet should be loaded from.