Skip to content

Commit 5ba9bae

Browse files
author
Matt
committed
improving code quality. improving documentation.
1 parent c39ee2c commit 5ba9bae

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

src/main/java/io/github/makbn/jlmap/model/JLLatLng.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public boolean equals(Object o) {
6060
* @return Returns true if the given {{@link JLLatLng}} point is at the same position (within a small margin of error).
6161
* The margin of error can be overridden by setting maxMargin.
6262
*/
63-
public boolean equals(Object o, int maxMargin) {
63+
public boolean equals(Object o, float maxMargin) {
6464
if (this == o) return true;
6565
if (o == null || getClass() != o.getClass()) return false;
6666
JLLatLng latLng = (JLLatLng) o;

src/main/java/io/github/makbn/jlmap/model/JLMarker.java

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
package io.github.makbn.jlmap.model;
22

33

4-
import lombok.*;
4+
import io.github.makbn.jlmap.listener.OnJLObjectActionListener;
5+
import lombok.AllArgsConstructor;
6+
import lombok.Builder;
7+
import lombok.Data;
8+
import lombok.EqualsAndHashCode;
59

610
/**
711
* JLMarker is used to display clickable/draggable icons on the map!
12+
*
813
* @author Mehdi Akbarian Rastaghi (@makbn)
914
*/
10-
@Getter
11-
@Setter
12-
@AllArgsConstructor
15+
@Data
1316
@Builder
14-
@ToString
17+
@AllArgsConstructor
18+
@EqualsAndHashCode(callSuper = true)
1519
public class JLMarker extends JLObject<JLMarker> {
1620
/**
1721
* id of object! this is an internal id for JLMap Application and not related to Leaflet!
@@ -30,10 +34,10 @@ public class JLMarker extends JLObject<JLMarker> {
3034
@Override
3135
public void update(Object... params) {
3236
super.update(params);
33-
if (params != null && params.length > 0) {
34-
if (String.valueOf(params[0]).equals("moveend") && params[1] != null) {
35-
latLng = (JLLatLng) params[1];
36-
}
37+
if (params != null && params.length > 0
38+
&& String.valueOf(params[0]).equals(OnJLObjectActionListener.Action.MOVE_END.getJsEventName())
39+
&& params[1] != null) {
40+
latLng = (JLLatLng) params[1];
3741
}
3842
}
3943
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
package io.github.makbn.jlmap.model;
22

3+
import jdk.jshell.spi.ExecutionControl;
4+
35
/**
46
* @author Mehdi Akbarian Rastaghi (@makbn)
57
*/
6-
class JLSvg {
7-
8+
public class JLSvg {
9+
public JLSvg() throws ExecutionControl.NotImplementedException {
10+
throw new ExecutionControl.NotImplementedException("SVG is not implemented!");
11+
}
812
}

0 commit comments

Comments
 (0)