fix: 适配3D渲染
This commit is contained in:
parent
c2d47afed7
commit
09b3dd2f43
@ -1706,7 +1706,7 @@
|
||||
</m>
|
||||
|
||||
<!--电子眼-->
|
||||
<m v="OMDB_ELECTRONICEYE">
|
||||
<m v="OMDB_ELECTRONICEYE" zoom-max="18">
|
||||
<caption dy="-30" fill="#000000" k="name" priority="0" size="14"
|
||||
stroke="#ffffff" stroke-width="1.0"></caption>
|
||||
<m k="type" v="angle">
|
||||
|
@ -4,6 +4,7 @@ import static org.oscim.core.MercatorProjection.latitudeToY;
|
||||
import static org.oscim.core.MercatorProjection.longitudeToX;
|
||||
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
@ -19,7 +20,6 @@ import org.locationtech.jts.geom.MultiPolygon;
|
||||
import org.locationtech.jts.geom.Point;
|
||||
import org.locationtech.jts.geom.Polygon;
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.MercatorProjection;
|
||||
import org.oscim.core.Tag;
|
||||
import org.oscim.core.Tile;
|
||||
import org.oscim.tiling.ITileDataSink;
|
||||
@ -143,9 +143,9 @@ public class OMDBDataDecoder extends TileDecoder {
|
||||
private void processCoordinateArray(Coordinate[] coordinates, boolean removeLast) {
|
||||
int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
double z = longitudeToX(MercatorProjection.pixelXToLongitudeWithScale(MercatorProjection.metersToPixelsWithScale((float) coordinates[i].z, coordinates[i].y, mTileScale), mTileScale))* mTileScale/8;
|
||||
// double z = longitudeToX(MercatorProjection.pixelXToLongitudeWithScale(MercatorProjection.metersToPixelsWithScale((float) coordinates[i].z, coordinates[i].y, mTileScale), mTileScale))* mTileScale/8;
|
||||
mMapElement.addPoint((float) ((longitudeToX(coordinates[i].x) - mTileX) * mTileScale),
|
||||
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), (float) coordinates[i].z);
|
||||
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), 0);
|
||||
}
|
||||
|
||||
// int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
||||
|
@ -143,7 +143,7 @@ public class OMDBReferenceDecoder extends TileDecoder {
|
||||
// 将Z坐标的米转换为屏幕像素坐标
|
||||
// double z = longitudeToX(MercatorProjection.pixelXToLongitudeWithScale(MercatorProjection.metersToPixelsWithScale((float) coordinates[i].z, coordinates[i].y, mTileScale), mTileScale))* mTileScale/8;
|
||||
mMapElement.addPoint((float) ((longitudeToX(coordinates[i].x) - mTileX) * mTileScale),
|
||||
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), (float)coordinates[i].z);
|
||||
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), 0);
|
||||
}
|
||||
|
||||
// int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
||||
|
2
vtm
2
vtm
@ -1 +1 @@
|
||||
Subproject commit c74bcd29c24cddf395fa9654ef0b69d0c88ac3ad
|
||||
Subproject commit 4c9926d105877fce305025e8f85651ccea947c4f
|
Loading…
x
Reference in New Issue
Block a user