enable old server request

This commit is contained in:
afischerdev 2024-09-05 11:13:22 +02:00
parent 6b4d989868
commit 7b70cc5a6f

View File

@ -40,6 +40,8 @@ public class ServerHandler extends RequestHandler {
private RoutingContext rc;
private static boolean useOldServerFormat = System.getenv("USEOLDSERVERFORMAT") != null;
public ServerHandler(ServiceContext serviceContext, Map<String, String> params) {
super(serviceContext, params);
}
@ -107,6 +109,9 @@ public class ServerHandler extends RequestHandler {
} else if ("kml".equals(format)) {
result = "application/vnd.google-earth.kml+xml";
} else if ("geojson".equals(format)) {
if (useOldServerFormat)
result = "application/vnd.geo+json";
else
result = "application/geo+json";
} else if ("csv".equals(format)) {
result = "text/tab-separated-values";