switched from system to java variable
This commit is contained in:
parent
7ead35e3f8
commit
48d474d34c
@ -40,7 +40,7 @@ public class ServerHandler extends RequestHandler {
|
|||||||
|
|
||||||
private RoutingContext rc;
|
private RoutingContext rc;
|
||||||
|
|
||||||
private static boolean useOldServerFormat = System.getenv("USEOLDSERVERFORMAT") != null;
|
private static boolean useRFCMimeType = Boolean.getBoolean("useRFCMimeType");
|
||||||
|
|
||||||
public ServerHandler(ServiceContext serviceContext, Map<String, String> params) {
|
public ServerHandler(ServiceContext serviceContext, Map<String, String> params) {
|
||||||
super(serviceContext, params);
|
super(serviceContext, params);
|
||||||
@ -109,10 +109,10 @@ public class ServerHandler extends RequestHandler {
|
|||||||
} else if ("kml".equals(format)) {
|
} else if ("kml".equals(format)) {
|
||||||
result = "application/vnd.google-earth.kml+xml";
|
result = "application/vnd.google-earth.kml+xml";
|
||||||
} else if ("geojson".equals(format)) {
|
} else if ("geojson".equals(format)) {
|
||||||
if (useOldServerFormat)
|
if (useRFCMimeType)
|
||||||
result = "application/vnd.geo+json";
|
|
||||||
else
|
|
||||||
result = "application/geo+json";
|
result = "application/geo+json";
|
||||||
|
else
|
||||||
|
result = "application/vnd.geo+json";
|
||||||
} else if ("csv".equals(format)) {
|
} else if ("csv".equals(format)) {
|
||||||
result = "text/tab-separated-values";
|
result = "text/tab-separated-values";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ REM java -cp brouter.jar btools.brouter.RouteServer <segmentdir> <profile-map> <
|
|||||||
pushd %~dp0
|
pushd %~dp0
|
||||||
|
|
||||||
REM maxRunningTime is the request timeout in seconds, set to 0 to disable timeout
|
REM maxRunningTime is the request timeout in seconds, set to 0 to disable timeout
|
||||||
set JAVA_OPTS=-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300
|
set JAVA_OPTS=-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300 -DuseRFCMimeType=false
|
||||||
|
|
||||||
REM First search in locations matching the directory structure as found in the official BRouter zip archive
|
REM First search in locations matching the directory structure as found in the official BRouter zip archive
|
||||||
set CLASSPATH=../brouter.jar
|
set CLASSPATH=../brouter.jar
|
||||||
|
|||||||
@ -5,7 +5,7 @@ cd "$(dirname "$0")"
|
|||||||
# java -cp brouter.jar btools.brouter.RouteServer <segmentdir> <profile-map> <customprofiledir> <port> <maxthreads> [bindaddress]
|
# java -cp brouter.jar btools.brouter.RouteServer <segmentdir> <profile-map> <customprofiledir> <port> <maxthreads> [bindaddress]
|
||||||
|
|
||||||
# maxRunningTime is the request timeout in seconds, set to 0 to disable timeout
|
# maxRunningTime is the request timeout in seconds, set to 0 to disable timeout
|
||||||
JAVA_OPTS="-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300"
|
JAVA_OPTS="-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300 -DuseRFCMimeType=false"
|
||||||
|
|
||||||
# If paths are unset, first search in locations matching the directory structure
|
# If paths are unset, first search in locations matching the directory structure
|
||||||
# as found in the official BRouter zip archive
|
# as found in the official BRouter zip archive
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user