面数据增加纹理
This commit is contained in:
parent
13089fe6f2
commit
3f173aa86f
@ -153,6 +153,9 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
if (list != null) {
|
if (list != null) {
|
||||||
// 将list数据转换为map
|
// 将list数据转换为map
|
||||||
for ((index, line) in list.withIndex()) {
|
for ((index, line) in list.withIndex()) {
|
||||||
|
if (line == null || line.trim() == "") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
Log.d("ImportOMDBHelper", "解析第:${index+1}行")
|
Log.d("ImportOMDBHelper", "解析第:${index+1}行")
|
||||||
val map = gson.fromJson<Map<String, Any>>(line, object:TypeToken<Map<String, Any>>(){}.getType())
|
val map = gson.fromJson<Map<String, Any>>(line, object:TypeToken<Map<String, Any>>(){}.getType())
|
||||||
.toMutableMap()
|
.toMutableMap()
|
||||||
|
@ -164,6 +164,7 @@ class MainActivity : BaseActivity() {
|
|||||||
// 在mapController初始化前获取当前OMDB图层显隐
|
// 在mapController初始化前获取当前OMDB图层显隐
|
||||||
viewModel.refreshOMDBLayer(LayerConfigUtils.getLayerConfigList())
|
viewModel.refreshOMDBLayer(LayerConfigUtils.getLayerConfigList())
|
||||||
mapController.mMapView.vtmMap.viewport().maxZoomLevel = 25
|
mapController.mMapView.vtmMap.viewport().maxZoomLevel = 25
|
||||||
|
mapController.mMapView.vtmMap.viewport().maxTilt = 85f
|
||||||
//关联生命周期
|
//关联生命周期
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
//给xml转递对象
|
//给xml转递对象
|
||||||
|
@ -115,7 +115,7 @@ class PersonalCenterFragment(private var backListener: (() -> Unit?)? = null) :
|
|||||||
viewModel.readRealmData()
|
viewModel.readRealmData()
|
||||||
// 定位到指定位置
|
// 定位到指定位置
|
||||||
niMapController.mMapView.vtmMap.animator()
|
niMapController.mMapView.vtmMap.animator()
|
||||||
.animateTo(GeoPoint( 39.79440941020727, 116.51302718503038 ))
|
.animateTo(GeoPoint( 39.7991980627346, 116.50936676873703 ))
|
||||||
}
|
}
|
||||||
// R.id.personal_center_menu_task_list -> {
|
// R.id.personal_center_menu_task_list -> {
|
||||||
// findNavController().navigate(R.id.TaskManagerFragment)
|
// findNavController().navigate(R.id.TaskManagerFragment)
|
||||||
|
@ -144,6 +144,7 @@
|
|||||||
<xs:attribute name="blend" default="-1" type="xs:integer" use="optional"/>
|
<xs:attribute name="blend" default="-1" type="xs:integer" use="optional"/>
|
||||||
<xs:attribute name="blend-fill" default="#000000" type="tns:color" use="optional"/>
|
<xs:attribute name="blend-fill" default="#000000" type="tns:color" use="optional"/>
|
||||||
<xs:attribute name="mesh" default="false" type="xs:boolean" use="optional"/>
|
<xs:attribute name="mesh" default="false" type="xs:boolean" use="optional"/>
|
||||||
|
<xs:attribute name="repeat" default="true" type="xs:boolean" use="optional"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
<xs:complexType name="caption">
|
<xs:complexType name="caption">
|
||||||
|
@ -1600,7 +1600,7 @@
|
|||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<!-- 道路线 -->
|
<!-- 道路线 -->
|
||||||
<m k="qi_table" v="OMDB_RD_LINK">
|
<m v="OMDB_RD_LINK">
|
||||||
<line stroke="#9c9c9c" width="1" />
|
<line stroke="#9c9c9c" width="1" />
|
||||||
</m>
|
</m>
|
||||||
<!--道路种别-->
|
<!--道路种别-->
|
||||||
@ -1835,10 +1835,6 @@
|
|||||||
<!-- 车信 -->
|
<!-- 车信 -->
|
||||||
<m v="OMDB_LANEINFO">
|
<m v="OMDB_LANEINFO">
|
||||||
<m k="currentType" v="0">
|
<m k="currentType" v="0">
|
||||||
<m k="currentDirect" v="0">
|
|
||||||
<symbol repeat="false" repeat-start="0" repeat-gap="2000"
|
|
||||||
src="assets:omdb/4601/normal/1301_0.svg" symbol-height="29" symbol-width="29"></symbol>
|
|
||||||
</m>
|
|
||||||
<m k="currentDirect" v="1">
|
<m k="currentDirect" v="1">
|
||||||
<symbol repeat="false" repeat-start="0" repeat-gap="2000"
|
<symbol repeat="false" repeat-start="0" repeat-gap="2000"
|
||||||
src="assets:omdb/4601/normal/1301_1.svg" symbol-height="29" symbol-width="29"></symbol>
|
src="assets:omdb/4601/normal/1301_1.svg" symbol-height="29" symbol-width="29"></symbol>
|
||||||
@ -2237,6 +2233,9 @@
|
|||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
<m v="OMDB_AREA">
|
||||||
|
<area use="water"></area>
|
||||||
|
</m>
|
||||||
<m k="type" v="s_2_e">
|
<m k="type" v="s_2_e">
|
||||||
<line use="s2e" />
|
<line use="s2e" />
|
||||||
</m>
|
</m>
|
||||||
|
BIN
collect-library/src/main/assets/omdb/test.jpeg
Normal file
BIN
collect-library/src/main/assets/omdb/test.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
@ -4,11 +4,9 @@ import static org.oscim.core.MercatorProjection.latitudeToY;
|
|||||||
import static org.oscim.core.MercatorProjection.longitudeToX;
|
import static org.oscim.core.MercatorProjection.longitudeToX;
|
||||||
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
import com.navinfo.collect.library.data.entity.GeometryFeatureEntity;
|
|
||||||
import com.navinfo.collect.library.data.entity.RenderEntity;
|
import com.navinfo.collect.library.data.entity.RenderEntity;
|
||||||
|
|
||||||
import org.locationtech.jts.geom.Coordinate;
|
import org.locationtech.jts.geom.Coordinate;
|
||||||
@ -20,8 +18,6 @@ import org.locationtech.jts.geom.MultiPoint;
|
|||||||
import org.locationtech.jts.geom.MultiPolygon;
|
import org.locationtech.jts.geom.MultiPolygon;
|
||||||
import org.locationtech.jts.geom.Point;
|
import org.locationtech.jts.geom.Point;
|
||||||
import org.locationtech.jts.geom.Polygon;
|
import org.locationtech.jts.geom.Polygon;
|
||||||
import org.locationtech.jts.io.ParseException;
|
|
||||||
import org.locationtech.jts.io.WKBReader;
|
|
||||||
import org.oscim.core.MapElement;
|
import org.oscim.core.MapElement;
|
||||||
import org.oscim.core.Tag;
|
import org.oscim.core.Tag;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
@ -144,7 +140,7 @@ public class OMDBDataDecoder extends TileDecoder {
|
|||||||
int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
mMapElement.addPoint((float) ((longitudeToX(coordinates[i].x) - mTileX) * mTileScale),
|
mMapElement.addPoint((float) ((longitudeToX(coordinates[i].x) - mTileX) * mTileScale),
|
||||||
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale));
|
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), (float)coordinates[i].z);
|
||||||
}
|
}
|
||||||
|
|
||||||
// int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
// int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
||||||
|
@ -140,7 +140,7 @@ public class OMDBReferenceDecoder extends TileDecoder {
|
|||||||
int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
mMapElement.addPoint((float) ((longitudeToX(coordinates[i].x) - mTileX) * mTileScale),
|
mMapElement.addPoint((float) ((longitudeToX(coordinates[i].x) - mTileX) * mTileScale),
|
||||||
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale));
|
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), (float)coordinates[i].z);
|
||||||
}
|
}
|
||||||
|
|
||||||
// int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
// int length = removeLast ? coordinates.length - 1 : coordinates.length;
|
||||||
|
@ -222,9 +222,7 @@ public class GeometryTools {
|
|||||||
|
|
||||||
Geometry geometry;
|
Geometry geometry;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
geometry = reader.read(wkt);
|
geometry = reader.read(wkt);
|
||||||
|
|
||||||
if (geometry != null) {
|
if (geometry != null) {
|
||||||
return geometry;
|
return geometry;
|
||||||
}
|
}
|
||||||
|
2
vtm
2
vtm
@ -1 +1 @@
|
|||||||
Subproject commit c6ba77aa0eb90a84fb19377706eb6792ec4a42b6
|
Subproject commit 24467eb56e3a4eafe8a5747bec7590ab234569fb
|
Loading…
x
Reference in New Issue
Block a user