feat: 杆状物、交通面板3D化测试
This commit is contained in:
parent
3f173aa86f
commit
1a19dc1cfa
@ -275,6 +275,16 @@
|
||||
"table": "OMDB_AREA",
|
||||
"code": 5002,
|
||||
"name": "面测试"
|
||||
},
|
||||
"3005":{
|
||||
"table": "OMDB_TRAFFIC_SIGN",
|
||||
"code": 3005,
|
||||
"name": "交通标牌"
|
||||
},
|
||||
"3006":{
|
||||
"table": "OMDB_POLE",
|
||||
"code": 3006,
|
||||
"name": "杆状物"
|
||||
}
|
||||
}
|
||||
}
|
@ -115,7 +115,7 @@ class PersonalCenterFragment(private var backListener: (() -> Unit?)? = null) :
|
||||
viewModel.readRealmData()
|
||||
// 定位到指定位置
|
||||
niMapController.mMapView.vtmMap.animator()
|
||||
.animateTo(GeoPoint( 39.7991980627346, 116.50936676873703 ))
|
||||
.animateTo(GeoPoint( 39.7991980627346,116.50936676873703 ))
|
||||
}
|
||||
// R.id.personal_center_menu_task_list -> {
|
||||
// findNavController().navigate(R.id.TaskManagerFragment)
|
||||
|
@ -2234,10 +2234,18 @@
|
||||
</m>
|
||||
</m>
|
||||
<m v="OMDB_AREA">
|
||||
<area use="water"></area>
|
||||
<area use="water" repeat="true" src="assets:omdb/area_test.jpg" stroke="#ff0000" stroke-width="2"></area>
|
||||
</m>
|
||||
<m k="type" v="s_2_e">
|
||||
<line use="s2e" />
|
||||
</m>
|
||||
|
||||
<m v="OMDB_POLE">
|
||||
<line stroke="#0000ff" width="0.1" cap="butt"></line>
|
||||
</m>
|
||||
|
||||
<m v="OMDB_TRAFFIC_SIGN">
|
||||
<area use="water" repeat="false" stroke="#ff0000" stroke-width="2"></area>
|
||||
</m>
|
||||
</m>
|
||||
</rendertheme>
|
@ -19,6 +19,7 @@ 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;
|
||||
@ -139,8 +140,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;
|
||||
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), (float) coordinates[i].z);
|
||||
}
|
||||
|
||||
// int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
||||
|
@ -139,6 +139,8 @@ public class OMDBReferenceDecoder extends TileDecoder {
|
||||
private void processCoordinateArray(Coordinate[] coordinates, boolean removeLast) {
|
||||
int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
// 将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);
|
||||
}
|
||||
|
2
vtm
2
vtm
@ -1 +1 @@
|
||||
Subproject commit 24467eb56e3a4eafe8a5747bec7590ab234569fb
|
||||
Subproject commit ee9314039e20ccdec4c126353e6136903ba01d08
|
Loading…
x
Reference in New Issue
Block a user