Solved! Go to Solution.
With the upcoming release of 10.2.4 of the Java SDK for Runtime, we are introducing a JavaFX Map component (Beta). This release should be available in early October! Stay tuned!
Is there an elegant way to add the FXMap node to Scene Builder so that one can drag and drop the FXMap onto the UI e.g. existing BorderPane.
With the Swing Map and Window-builder Pro I was able to get this to work.
Right now Scene Builder complains a lot about the run time JAR having too many non-node classes
Rob
JavaFX introduces the SwingNode class; this class generally enables developers to add swing content in JavaFX applications. You can find the class in the JavaFX API at javafx.embed.swing. This makes it very easy to embed Esri Java Runtime SDK content such as JMap (a swing class) in JavaFX application. Please find the below code snippet.
package com.esri.support.javafxeg;
import javafx.application.Application;
import javafx.embed.swing.SwingNode;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import com.esri.map.JMap;
import com.esri.map.MapOptions;
import com.esri.map.MapOptions.MapType;
public class JavaRuntimeJavaFXExample extends Application {
@Override
public void start(Stage primaryStage) {
final SwingNode swingNode = new SwingNode();
MapOptions mapOptions = new MapOptions(MapType.TOPO);
JMap map = new JMap(mapOptions);
swingNode.setContent(map);
StackPane pane = new StackPane();
pane.getChildren().add(swingNode);
primaryStage.setTitle("Esri Java Runtime and JavaFX: a match made in Heaven!");
primaryStage.setScene(new Scene(pane, 600, 350));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}