Skip to content

Commit

Permalink
Release v1.3.1-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas40510 authored Jan 19, 2024
2 parents 01468d9 + babbbea commit efbe590
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group = 'com.apogee.dev'
version = '1.3.0-beta'
version = '1.3.1-beta'

repositories {
mavenCentral()
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/com/apogee/dev/CUJaS/SITACObjects/Corridor.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public class Corridor extends Figure {
public Point start_point, end_point;
private @Nullable Point center;
public double width;
private static final double DELIMITER_SIZE = 1000;
/** Taille des portes du corridor en mètre */
private static final double DELIMITER_SIZE = 2500;

/**
* Constructeur d'un {@code Corridor}
Expand Down Expand Up @@ -84,7 +85,7 @@ public String toString() {
*/
@Override
public String export_kml() {
// TODO: prévoir un style propre pour le corridor
String style = "#style_porte";
StringBuilder res = new StringBuilder();

// on s'assure que les délimiteurs ont une taille fixe
Expand All @@ -99,14 +100,14 @@ public String export_kml() {
this.start_point.longitude + delta_x);
Point ps2 = new Point(this.start_point.latitude + delta_y,
this.start_point.longitude - delta_x);
res.append((new Line("corr1", ps1, start_point, ps2)).export_kml());
res.append((new Line("corr1", ps1, start_point, ps2)).export_kml(style));

// end_point side
// second côté
Point pe1 = new Point(this.end_point.latitude - delta_y,
this.end_point.longitude + delta_x);
Point pe2 = new Point(this.end_point.latitude + delta_y,
this.end_point.longitude - delta_x);
res.append((new Line("corr2", pe1, end_point, pe2)).export_kml());
res.append((new Line("corr2", pe1, end_point, pe2)).export_kml(style));

return res.toString();
}
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/apogee/dev/CUJaS/SITACObjects/Line.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,16 @@ public Polygon asPolygon() {

@Override
public String export_kml() {
String style = (this.name.contains("corr")) ? "#style_porte" : "#style_line";
return export_kml(style);
}

public String export_kml(String style) {
StringBuilder coords = new StringBuilder();
for (Point p : this.points) {
coords.append(p.longitude).append(",").append(p.latitude).append(",0 \n");
}
return KMLUtils.kmlLine(this.name, "#style_line", coords.toString());
return KMLUtils.kmlLine(this.name, style, coords.toString());
}

}
2 changes: 1 addition & 1 deletion src/main/java/com/apogee/dev/CUJaS/UI/CUJaS_UI.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ private void checkTabs() {
/**
* <i>Cooldown</i> entre chaque étape de l'exportation, en ms.
*/
private static final long WAIT_TIME = 500;
private static final long WAIT_TIME = 50;

/**
* Exportation de la SITAC.
Expand Down
22 changes: 22 additions & 0 deletions src/main/resources/default_styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,28 @@
<BalloonStyle>
<displayMode>hide</displayMode>
</BalloonStyle>
</Style>

<Style id="style_porte">
<IconStyle>
<Icon>
<href>https://earth.google.com/earth/rpc/cc/icon?color=1976d2&amp;id=2000&amp;scale=4</href>
</Icon>
<hotSpot x="64" y="128" xunits="pixels" yunits="insetPixels"/>
</IconStyle>
<LabelStyle>
</LabelStyle>
<LineStyle>
<!--color>ff000000</color-->
<color>ef1e26c1</color>
<width>6</width>
</LineStyle>
<PolyStyle>
<color>40ffffff</color>
</PolyStyle>
<BalloonStyle>
<displayMode>hide</displayMode>
</BalloonStyle>
</Style>

<!-- Begin_Objects -->

0 comments on commit efbe590

Please sign in to comment.