remove useless html

This commit is contained in:
simon 2020-09-07 15:35:03 +03:00
parent aeff02d633
commit 485ee88a13
11 changed files with 9 additions and 18526 deletions

View file

@ -1,57 +0,0 @@
/*
Author: L. Voogdt
License: MIT
Version: 1.0
*/
/* Marker setup */
.awesome-marker {
margin-top:-42px;
margin-left: -17px;
position:absolute;
left:0;
top:0;
display: block;
text-align: center;
}
.awesome-marker .material-icons {
font-size: 17px;
}
.awesome-marker-shadow {
background: url('/images/markers-shadow.png') no-repeat 0 0;
width: 36px;
height: 16px;
}
/* Retina displays */
@media (min--moz-device-pixel-ratio: 1.5),(-o-min-device-pixel-ratio: 3/2),
(-webkit-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5),(min-resolution: 1.5dppx) {
.awesome-marker-shadow {
background-image: url('/images/markers-shadow@2x.png');
background-size: 35px 16px;
}
}
.awesome-marker i {
color: #333;
margin-top: 10px;
display: inline-block;
font-size: 14px;
}
.awesome-marker .icon-white {
color: #fff;
}
/* Colors */
.awesome-marker-background {
fill: #fff;
}
.awesome-marker:hover {
top: 2px;
opacity: 0.9;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 574 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 584 KiB

View file

@ -1,18 +1,15 @@
package net.osmand.plus.server.endpoints;
import android.graphics.Bitmap;
import androidx.fragment.app.FragmentActivity;
import fi.iki.elonen.NanoHTTPD;
import net.osmand.PlatformUtil;
import net.osmand.data.RotatedTileBox;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.render.MapRenderRepositories;
import net.osmand.plus.resources.AsyncLoadingThread;
import net.osmand.plus.server.ApiEndpoint;
import net.osmand.plus.server.IMapOnImageDrawn;
import net.osmand.plus.server.OsmAndHttpServer;
import net.osmand.plus.server.ServerFragment;
import org.apache.commons.logging.Log;
import java.io.ByteArrayInputStream;
@ -25,7 +22,6 @@ import java.util.Scanner;
import static fi.iki.elonen.NanoHTTPD.newFixedLengthResponse;
public class TileEndpoint implements ApiEndpoint, IMapOnImageDrawn {
private static final int RENDER_WAIT_THRESHOLD = 5000;
private static final Object lock = new Object();
private static final int TILE_SIZE_PX = 512;
private static final Log LOG = PlatformUtil.getLog(TileEndpoint.class);
@ -49,6 +45,8 @@ public class TileEndpoint implements ApiEndpoint, IMapOnImageDrawn {
@Override
public void onDraw(RotatedTileBox viewport, Bitmap bmp) {
map.put(viewport, bmp);
this.viewPort = viewport;
this.resultBitmap = bmp;
}
@Override
@ -89,36 +87,16 @@ public class TileEndpoint implements ApiEndpoint, IMapOnImageDrawn {
.setPixelDimensions(TILE_SIZE_PX, TILE_SIZE_PX, 0.5f, 0.5f).build();
final MapRenderRepositories renderer = application.getResourceManager().getRenderer();
mapActivity.getMapView().setCurrentViewport(rotatedTileBox);
// application.getResourceManager().updateRendererMap(rotatedTileBox, new AsyncLoadingThread.OnMapLoadedListener() {
// @Override
// public void onMapLoaded(boolean interrupted) {
// map.put(rotatedTileBox, renderer.getBitmap());
// }
// });
Bitmap bmp = null;
int sleepTime = 500;
int timeout = 0;
// try {
// while ((viewPort == null && !rotatedTileBox.equals(viewPort)) || timeout < 5000) {
// Thread.sleep(100);
// timeout += 100;
// }
// return resultBitmap;
// } catch (InterruptedException e) {
// LOG.error(e);
// }
while ((bmp = map.get(rotatedTileBox)) == null) {
try {
Thread.sleep(sleepTime);
} catch (InterruptedException e) {
LOG.error(e);
}
sleepTime += 500;
if (sleepTime > RENDER_WAIT_THRESHOLD) {
break;
try {
while ((viewPort == null && !rotatedTileBox.equals(viewPort)) || timeout < 5000) {
Thread.sleep(100);
timeout += 100;
}
return resultBitmap;
} catch (InterruptedException e) {
LOG.error(e);
}
return bmp;
}