MapsForgeFX is the Android implementation of MapsForge (https://github.com/mapsforge/mapsforge) ported to JavaFX in mid 2013.
Some minor changes have been applied to the pom.xml and general structure for publication purpose in early 2017.
See the MapsForgeFX_demo for an example usage.
import de.itd.maps.mapsforge.MapsforgeMap;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.File;
public class Main extends Application {
public static void main(String args[]) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
MapsforgeMap map = new MapsforgeMap();
map.setPrefSize(1024, 768);
map.loadMap(new File("/tmp/baden-wuerttemberg.map"));
map.getMapView().set(48.718299, 9.363812);
map.updateMapLater(false);
primaryStage.setScene(new Scene(map));
primaryStage.show();
}
}
The JavaDoc is located here.
The source code of the modules 'mapsforge-map' and 'mapsforge-core' from the time of porting is included at 'src/java/mapsforge'. This is for the uncertain case the the maven artifacts (version 0.3.1-MSM-0.3) are no longer available through the boundlessgeo.com maven repository,
This project is licensed under the LGPL v3.
The port was done as a detached student project at IT-Designers GmbH in Esslingen, Germany.