Skip to content

Commit 1b19e84

Browse files
committed
The deprecated JLJavaFXMapView implementation was removed, and its usages in the demo class were replaced with JLMapView to unify the map view API.
1 parent d1f9b4b commit 1b19e84

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

jlmap-fx/src/main/java/io/github/makbn/jlmap/fx/JLJavaFXMapView.java renamed to jlmap-fx/src/main/java/io/github/makbn/jlmap/fx/JLMapView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
*/
4848
@Slf4j
4949
@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE)
50-
public class JLJavaFXMapView extends AnchorPane implements JLMapController {
50+
public class JLMapView extends AnchorPane implements JLMapController {
5151
JLMapOption mapOption;
5252
JLWebEngine jlWebEngine;
5353
WebView webView;
@@ -61,8 +61,8 @@ public class JLJavaFXMapView extends AnchorPane implements JLMapController {
6161
OnJLMapViewListener mapListener;
6262

6363
@Builder
64-
public JLJavaFXMapView(@NonNull JLProperties.MapType mapType,
65-
@NonNull JLLatLng startCoordinate, boolean showZoomController) {
64+
public JLMapView(@NonNull JLProperties.MapType mapType,
65+
@NonNull JLLatLng startCoordinate, boolean showZoomController) {
6666
super();
6767
this.mapOption = JLMapOption.builder()
6868
.startCoordinate(startCoordinate)

jlmap-fx/src/main/java/io/github/makbn/jlmap/fx/demo/LeafletTestJFX.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.github.makbn.jlmap.fx.demo;
22

3+
import io.github.makbn.jlmap.fx.JLMapView;
34
import io.github.makbn.jlmap.JLMapController;
4-
import io.github.makbn.jlmap.fx.JLJavaFXMapView;
55
import io.github.makbn.jlmap.JLProperties;
66
import io.github.makbn.jlmap.geojson.JLGeoJsonObject;
77
import io.github.makbn.jlmap.listener.OnJLMapViewListener;
@@ -34,7 +34,7 @@ public class LeafletTestJFX extends Application {
3434
@Override
3535
public void start(Stage stage) {
3636
//building a new map view
37-
final JLJavaFXMapView map = JLJavaFXMapView
37+
final JLMapView map = JLMapView
3838
.builder()
3939
.mapType(JLProperties.MapType.OSM_MAPNIK)
4040
.showZoomController(true)
@@ -140,7 +140,7 @@ public void move(JLMarker object, Action action) {
140140
};
141141
}
142142

143-
private void addMultiPolyline(JLJavaFXMapView map) {
143+
private void addMultiPolyline(JLMapView map) {
144144
JLLatLng[][] verticesT = new JLLatLng[2][];
145145

146146
verticesT[0] = new JLLatLng[]{
@@ -158,7 +158,7 @@ private void addMultiPolyline(JLJavaFXMapView map) {
158158
map.getVectorLayer().addMultiPolyline(verticesT);
159159
}
160160

161-
private void addPolyline(JLJavaFXMapView map) {
161+
private void addPolyline(JLMapView map) {
162162
JLLatLng[] vertices = new JLLatLng[]{
163163
new JLLatLng(51.509, -0.08),
164164
new JLLatLng(51.503, -0.06),
@@ -168,7 +168,7 @@ private void addPolyline(JLJavaFXMapView map) {
168168
map.getVectorLayer().addPolyline(vertices);
169169
}
170170

171-
private void addPolygon(JLJavaFXMapView map) {
171+
private void addPolygon(JLMapView map) {
172172

173173
JLLatLng[][][] vertices = new JLLatLng[2][][];
174174

0 commit comments

Comments
 (0)