Skip to content
Matt Akbarian edited this page Oct 4, 2025 · 1 revision

Java Leaflet (JLeaflet) Wiki

Welcome to the comprehensive wiki for Java Leaflet - a powerful Java library for integrating Leaflet maps into Java applications with full support for JavaFX and Vaadin frameworks.

Java Leaflet

πŸ“š Table of Contents

Getting Started

Core Concepts

Features

Examples & Tutorials

Testing & Development


πŸš€ Quick Links

For JavaFX Developers

JLMapView map = JLMapView.builder()
    .jlMapProvider(JLMapProvider.OSM_MAPNIK.build())
    .startCoordinate(new JLLatLng(51.505, -0.09))
    .showZoomController(true)
    .build();

For Vaadin Developers

JLMapView map = JLMapView.builder()
    .jlMapProvider(JLMapProvider.OSM_MAPNIK.build())
    .startCoordinate(new JLLatLng(48.864716, 2.349014))
    .showZoomController(true)
    .build();

πŸ“¦ What is Java Leaflet?

Java Leaflet is a comprehensive Java library that brings the power of Leaflet.js - the leading open-source JavaScript library for mobile-friendly interactive maps - to Java applications.

Key Features

  • βœ… Multi-Framework Support - JavaFX and Vaadin implementations with unified API
  • βœ… Java 17+ & JPMS - Full Java Platform Module System support
  • βœ… Type-Safe API - Fluent builder pattern with compile-time safety
  • βœ… Rich Interactions - Markers, polygons, polylines, circles, context menus
  • βœ… Event System - Comprehensive event handling for user interactions
  • βœ… GeoJSON Support - Load and style GeoJSON data with custom filters
  • βœ… Animation Support - Create animated journeys and transitions
  • βœ… Multiple Providers - OpenStreetMap, MapTiler, and custom tile providers

πŸ—οΈ Project Structure

java_leaflet/
β”œβ”€β”€ jlmap-parent/          # Parent POM configuration
β”œβ”€β”€ jlmap-api/             # Core API and abstractions
β”œβ”€β”€ jlmap-fx/              # JavaFX implementation
β”œβ”€β”€ jlmap-vaadin/          # Vaadin component implementation
└── jlmap-vaadin-demo/     # Vaadin demo application

Module Overview

Module Description Use Case
jlmap-api Core abstractions, interfaces, and models Required by all implementations
jlmap-fx JavaFX-specific implementation using WebView Desktop applications
jlmap-vaadin Vaadin component for web applications Web applications
jlmap-vaadin-demo Complete demo showcasing features Learning and reference

πŸ“– Documentation Structure

This wiki is organized into the following sections:

1. Getting Started

Perfect for newcomers to get up and running quickly.

  • Installation instructions
  • First map creation
  • Basic concepts

2. Architecture

Deep dive into the technical architecture.

  • Multi-module design
  • Layer system
  • Transport layer
  • Design patterns

3. API Reference

Complete reference documentation.

  • All classes and interfaces
  • Method signatures
  • Usage examples
  • Parameters and return types

4. Feature Guides

In-depth guides for specific features.

  • Context menus
  • Journey animations
  • GeoJSON handling
  • Event handling

5. Examples & Tutorials

Learn by example.

  • Simple examples
  • Complex use cases
  • Best practices
  • Common patterns

6. Testing & Contributing

For developers and contributors.

  • Testing guide
  • Coverage reports
  • CI/CD pipeline
  • Contribution guidelines

🌟 Version 2.0.0 Highlights

Version 2.0.0 represents a major overhaul of the library:

New Features

  • Vaadin Support - Brand new Vaadin component implementation
  • Multi-Module Architecture - Clean separation of concerns
  • Unified API - Consistent interface across frameworks
  • Context Menus - Rich context menu support on all objects
  • Journey System - Declarative animated journeys
  • Enhanced Documentation - Comprehensive JavaDoc and wiki

Improvements

  • Better Modularity - JPMS support for better encapsulation
  • Type Safety - Enhanced builder pattern with generics
  • Event System - More comprehensive event types
  • Performance - Optimized transport layer
  • Testing - 74% instruction coverage with 120+ tests

πŸ“‹ Requirements

  • Java: 17 or higher
  • Maven: 3.6+ (for building)
  • JavaFX: 19.0.2.1+ (for JavaFX implementation)
  • Vaadin: 24.8.6+ (for Vaadin implementation)

🀝 Getting Help


πŸ“„ License

This project is licensed under the GNU Lesser General Public License (LGPL) Version 2.1 or later.

See the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Matt Akbarian (@makbn)


πŸ”— External Resources


πŸ—ΊοΈ Navigation

Next: Getting Started Guide β†’

Start your journey with Java Leaflet by creating your first interactive map!