org.vaadin.addons.maplibre.GeoJsonHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maplibre Show documentation
Show all versions of maplibre Show documentation
An extension to Vaadin that provides a Java API for MapLibreGL slippy map component with modern vector layer support.
package org.vaadin.addons.maplibre;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.io.geojson.GeoJsonWriter;
public class GeoJsonHelper {
static GeoJsonWriter writer = new GeoJsonWriter();
static {
writer.setEncodeCRS(false);
}
public static String toJs(Coordinate coord) {
return "[" + coord.getX() + "," + coord.getY() + "]";
}
public static String toJs(org.locationtech.jts.geom.Geometry geometry) {
return writer.write(geometry);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy