Я пытаюсь написать простую программу на Java, используя GmapsFX.это код, который я скопировал из интернета для изучения основных зачатков этой библиотеки.
это файл .fxml
<?import com.lynden.gmapsfx.GoogleMapView?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1">
<children>
<GoogleMapView fx:id="mapView" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
<Label alignment="CENTER" contentDisplay="CENTER" text="Map" AnchorPane.bottomAnchor="376.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
это контроллер:
package application;
import com.lynden.gmapsfx.GoogleMapView;
import com.lynden.gmapsfx.MapComponentInitializedListener;
import com.lynden.gmapsfx.javascript.object.GoogleMap;
import com.lynden.gmapsfx.javascript.object.InfoWindow;
import com.lynden.gmapsfx.javascript.object.InfoWindowOptions;
import com.lynden.gmapsfx.javascript.object.LatLong;
import com.lynden.gmapsfx.javascript.object.MapOptions;
import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum;
import com.lynden.gmapsfx.javascript.object.Marker;
import com.lynden.gmapsfx.javascript.object.MarkerOptions;
import javafx.fxml.FXML;
public class SampleController implements MapComponentInitializedListener {
@FXML
private GoogleMapView mapView;
private GoogleMap map = null;
@Override
public void mapInitialized() {
MapOptions mapOptions = new MapOptions();
LatLong latLong = new LatLong(47.6097, -122.3331);
mapOptions.center(latLong)
.mapType(MapTypeIdEnum.ROADMAP)
.overviewMapControl(false)
.panControl(false)
.rotateControl(false)
.scaleControl(false)
.streetViewControl(false)
.zoomControl(false)
.zoom(12);
map = mapView.createMap(mapOptions);
MarkerOptions markerOptions = new MarkerOptions();
markerOptions.position(latLong);
Marker marker = new Marker(markerOptions);
map.addMarker(marker);
InfoWindowOptions infoWindowOptions = new InfoWindowOptions();
infoWindowOptions.content("<h2>ROMA</h2>Location di Roma<br>");
InfoWindow infoWindow = new InfoWindow(infoWindowOptions);
infoWindow.open(map, marker);
}
@FXML
public void initialize() {
assert mapView != null : "fx:id=\"mapView\" was not injected: check your FXML file 'Sample.fxml'.";
mapView.addMapInializedListener(this);
}
}
и ответ от eclipse: 1866 [Поток приложения JavaFX] ИНФОРМАЦИЯ com.lynden.gmapsfx.GoogleMapView - Предупреждение: Скрыть указания под названием
, есть кто-нибудь, кто может мне помочь, пожалуйста,