Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f34500743c
4 changed files with 17 additions and 2 deletions
|
@ -142,6 +142,8 @@ public class NativeLibrary {
|
||||||
protected static native NativeRouteSearchResult loadRoutingData(RouteRegion reg, String regName, int regfp, RouteSubregion subreg,
|
protected static native NativeRouteSearchResult loadRoutingData(RouteRegion reg, String regName, int regfp, RouteSubregion subreg,
|
||||||
boolean loadObjects);
|
boolean loadObjects);
|
||||||
|
|
||||||
|
protected static native void deleteRenderingContextHandle(long handle);
|
||||||
|
|
||||||
protected static native void deleteRouteSearchResult(long searchResultHandle);
|
protected static native void deleteRouteSearchResult(long searchResultHandle);
|
||||||
|
|
||||||
protected static native RouteDataObject[] getRouteDataObjects(RouteRegion reg, long rs, int x31, int y31);
|
protected static native RouteDataObject[] getRouteDataObjects(RouteRegion reg, long rs, int x31, int y31);
|
||||||
|
|
|
@ -28,7 +28,6 @@ public class RenderingContext {
|
||||||
public RenderingContext() {
|
public RenderingContext() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public double leftX;
|
public double leftX;
|
||||||
public double topY;
|
public double topY;
|
||||||
public int width;
|
public int width;
|
||||||
|
@ -53,6 +52,7 @@ public class RenderingContext {
|
||||||
public int shadowRenderingColor = 0xff969696;
|
public int shadowRenderingColor = 0xff969696;
|
||||||
public String renderingDebugInfo;
|
public String renderingDebugInfo;
|
||||||
public double polygonMinSizeToDisplay;
|
public double polygonMinSizeToDisplay;
|
||||||
|
public long renderingContextHandle;
|
||||||
|
|
||||||
private float density = 1;
|
private float density = 1;
|
||||||
|
|
||||||
|
@ -75,4 +75,12 @@ public class RenderingContext {
|
||||||
protected byte[] getIconRawData(String data) {
|
protected byte[] getIconRawData(String data) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void finalize() throws Throwable {
|
||||||
|
super.finalize();
|
||||||
|
if (renderingContextHandle != 0) {
|
||||||
|
NativeLibrary.deleteRenderingContextHandle(renderingContextHandle);
|
||||||
|
renderingContextHandle = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1679,5 +1679,8 @@ public class OpeningHoursParser {
|
||||||
String hoursString = "mo-fr 11:00-21:00; PH off";
|
String hoursString = "mo-fr 11:00-21:00; PH off";
|
||||||
hours = parseOpenedHoursHandleErrors(hoursString);
|
hours = parseOpenedHoursHandleErrors(hoursString);
|
||||||
testParsedAndAssembledCorrectly(hoursString, hours);
|
testParsedAndAssembledCorrectly(hoursString, hours);
|
||||||
|
|
||||||
|
// not properly supported
|
||||||
|
// hours = parseOpenedHours("Mo-Su (sunrise-00:30)-(sunset+00:30)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,7 @@ public class MapRenderRepositories {
|
||||||
private boolean interrupted = false;
|
private boolean interrupted = false;
|
||||||
private int renderedState = 0; // (1 (if basemap) + 2 (if normal map)
|
private int renderedState = 0; // (1 (if basemap) + 2 (if normal map)
|
||||||
private RenderingContext currentRenderingContext;
|
private RenderingContext currentRenderingContext;
|
||||||
|
private RenderingContext visibleRenderingContext;
|
||||||
private SearchRequest<BinaryMapDataObject> searchRequest;
|
private SearchRequest<BinaryMapDataObject> searchRequest;
|
||||||
private OsmandSettings prefs;
|
private OsmandSettings prefs;
|
||||||
|
|
||||||
|
@ -781,6 +782,7 @@ public class MapRenderRepositories {
|
||||||
}
|
}
|
||||||
String renderingDebugInfo = currentRenderingContext.renderingDebugInfo;
|
String renderingDebugInfo = currentRenderingContext.renderingDebugInfo;
|
||||||
currentRenderingContext.ended = true;
|
currentRenderingContext.ended = true;
|
||||||
|
visibleRenderingContext = currentRenderingContext;
|
||||||
if (checkWhetherInterrupted()) {
|
if (checkWhetherInterrupted()) {
|
||||||
// revert if it was interrupted
|
// revert if it was interrupted
|
||||||
// (be smart a bit do not revert if road already drawn)
|
// (be smart a bit do not revert if road already drawn)
|
||||||
|
|
Loading…
Reference in a new issue