• Stars
    star
    138
  • Rank 264,456 (Top 6 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created about 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Gluon

Build Maven Central License javadoc

Gluon Maps

Gluon Maps provides an easy way to integrate OpenStreetMaps into a JavaFX application. It is blazing fast and offers layer overlays, multiple tile-sets, and much more.

API Overview

MapPoint

Represents a set of latitude and longitude values.

MapPoint point = new MapPoint(latitude, longitude);

MapLayer

Shows the map tiles along with any user defined nodes. This class can be extended by overloading the layoutLayer method.

The following code snippet shows how to create a custom layer that displays red circles at the given map points:

public class CustomMapLayer extends MapLayer {

    @Override
    protected void layoutLayer() {
        for (Pair<MapPoint, Node> candidate : points) {
            MapPoint point = new MapPoint(lat, long);
            Node icon = new Circle(5, Color.RED);
            Point2D mapPoint = getMapPoint(point.getLatitude(), point.getLongitude());
            icon.setVisible(true);
            icon.setTranslateX(mapPoint.getX());
            icon.setTranslateY(mapPoint.getY());
        }
    }
}

MapView

Top level map component which supports multiple MapLayer. The section of viewable map can be changed using input events (mouse/touch/gestures), or by calling the methods setCenter and setZoom directly.

MapView mapView = new MapView();
mapView.addLayer(new CustomMapLayer());
mapView.setZoom(3);

Usage

Map can be added to a JavaFX project by using the artifact published in Maven Central:

Maven:

<dependency>
    <groupId>com.gluonhq</groupId>
    <artifactId>maps</artifactId>
    <version>${version}</version>
</dependency>

Gradle:

dependencies {
    implementation 'com.gluonhq:maps:${version}'
}

The project can be also be installed in the local Maven repository:

mvn install

Sample

A sample is provided in the repository to get started with the library.

To run the sample:

mvn javafx:run -f samples

Contribution

All contributions are welcome!

There are two common ways to contribute:

Follow contributing rules for this repository.

Commercial License

Commercial licences available at: http://gluonhq.com/labs/maps/buy/

More Repositories

1

scenebuilder

Scene Builder is a visual, drag 'n' drop, layout tool for designing JavaFX application user interfaces.
Java
740
star
2

substrate

Create native Java(FX) apps for desktop, mobile and embedded
Java
383
star
3

gluon-samples

Gluon sample projects
Java
296
star
4

gluonfx-maven-plugin

Plugin that simplifies creating native images for Java/JavaFX maven projects
Java
186
star
5

client-samples

Client samples to run with Gluon Client plugins for Maven and Gradle
114
star
6

rich-text-area

Java
106
star
7

gluonfx-gradle-plugin

Plugin that simplifies using Gluon Client for Java/JavaFX gradle projects
Java
99
star
8

attach

Java
48
star
9

hello-gluon-ci

HelloGluon sample including Github actions for automating builds and releases
Java
31
star
10

ignite

Gluon Ignite creates a common abstraction over several popular dependency injection frameworks. With this library, developers can use popular dependency injection frameworks in their JavaFX applications, including inside their FXML controllers.
Java
28
star
11

wave-app

The Gluon Wave App that runs with Gluon Mobile, OpenJFX, OpenJDK 11 and GraalVM
Java
23
star
12

promise

JavaScript
23
star
13

ide-plugins

Gluon integration with Java IDEs
Java
20
star
14

connect

Java
15
star
15

emoji

Emoji support
Java
12
star
16

hello-world

Contains a simple Gluon Mobile hello world application
Java
8
star
17

gluonfx

GluonFX is an integrated suite of components that enhances JavaFX with essential features, including Rich Text Area, Maps, Emoji, and more.
8
star
18

gluon-build-license

7
star
19

javaone2016

JavaOne 2016 mobile application
Java
6
star
20

uongl

Java
5
star
21

gluon-samples-gradle

Java
4
star
22

AttachExtended

An extension of Gluon Attach, showing how to create custom Attach services
Java
3
star
23

projavafx9

Samples for Pro JavaFX 9
Java
3
star
24

gluon-build

3
star
25

otnarticle1

Java
3
star
26

TelematicsPOC

POC of vehicle telematics on Embedded
Java
2
star
27

picluster

Java
2
star
28

gradle-sass-vaadin

Gradle plugin for preprocessing SASS with support for JavaFX CSS
Groovy
2
star
29

gluonfx-maven-archetypes

Maven archetypes for creating Gluon Client maven projects
Java
2
star
30

AttachPrinter

Attach Extended with PrinterService
Java
1
star
31

8u-dev-rt

C++
1
star
32

knowledge-base

Knowledge base for JavaFX and Gluon related technologies
CSS
1
star
33

equation

The library part of the Wave Equation
Java
1
star
34

DevoxxBadges

Java
1
star