fix: 增加omdb图层管理
@@ -249,7 +249,7 @@ public final class NIMapView extends RelativeLayout {
|
||||
|
||||
// 增加比例尺图层
|
||||
NaviMapScaleBar naviMapScaleBar = new NaviMapScaleBar(getVtmMap());
|
||||
naviMapScaleBar.initScaleBarLayer(GLViewport.Position.BOTTOM_LEFT, 25, 60);
|
||||
naviMapScaleBar.initScaleBarLayer(GLViewport.Position.BOTTOM_LEFT, 20, 84);
|
||||
|
||||
// if (gridLayer == null) {
|
||||
// gridLayer = new TileGridLayer(getVtmMap());
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.oscim.layers.vector.VectorLayer
|
||||
import org.oscim.layers.vector.geometries.Style
|
||||
import org.oscim.map.Map
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(context, mapView),
|
||||
Map.UpdateListener {
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public class OMDBDataDecoder extends TileDecoder {
|
||||
listResult.stream().iterator().forEachRemaining(new Consumer<RenderEntity>() {
|
||||
@Override
|
||||
public void accept(RenderEntity renderEntity) {
|
||||
Log.d("RealmDBTileDataSource", renderEntity.getGeometry());
|
||||
// Log.d("RealmDBTileDataSource", renderEntity.getGeometry());
|
||||
Map<String, Object> properties= new HashMap<>(renderEntity.getProperties().size());
|
||||
properties.putAll(renderEntity.getProperties());
|
||||
parseGeometry(renderEntity.getTable(), renderEntity.getWkt(), properties);
|
||||
|
||||
@@ -54,7 +54,7 @@ public class OMDBTileDataSource implements ITileDataSource {
|
||||
mThreadLocalDecoders.get().decode(tile, mapDataSink, listResult);
|
||||
}
|
||||
mapDataSink.completed(QueryResult.SUCCESS);
|
||||
Log.d("RealmDBTileDataSource", "tile:"+tile.getBoundingBox().toString());
|
||||
// Log.d("RealmDBTileDataSource", "tile:"+tile.getBoundingBox().toString());
|
||||
} else {
|
||||
mapDataSink.completed(QueryResult.SUCCESS);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class RealmDBTileDataSource implements ITileDataSource {
|
||||
List<GeometryFeatureEntity> listResult = realmQuery.distinct("id").findAll();
|
||||
mThreadLocalDecoders.get().decode(tile, mapDataSink, listResult);
|
||||
mapDataSink.completed(QueryResult.SUCCESS);
|
||||
Log.d("RealmDBTileDataSource", "tile:"+tile.getBoundingBox().toString());
|
||||
// Log.d("RealmDBTileDataSource", "tile:"+tile.getBoundingBox().toString());
|
||||
} else {
|
||||
mapDataSink.completed(QueryResult.SUCCESS);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
package org.videolan.vlc;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.Editor;
|
||||
@@ -364,10 +365,10 @@ public class Util {
|
||||
return dp;
|
||||
}
|
||||
|
||||
public static int convertDpToPx(int dp) {
|
||||
public static int convertDpToPx(Context context,int dp) {
|
||||
return Math.round(
|
||||
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp,
|
||||
VLCApplication.getAppResources().getDisplayMetrics())
|
||||
context.getResources().getDisplayMetrics())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
10
collect-library/src/main/res/drawable/map_zoom_bg_xml.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="72dp" android:height="155dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="3px" android:color="#FFFFF0" />
|
||||
<solid android:color="#FFFFFFFF" />
|
||||
<corners android:radius="36dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -32,6 +32,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="48dp"
|
||||
android:background="@drawable/map_zoom_bg_xml"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/nimap_defalut_padding">
|
||||
|
||||
@@ -39,7 +42,7 @@
|
||||
android:id="@+id/navinfo_map_zoom_in"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_nimap_default_button"
|
||||
android:background="@null"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/icon_map_zoom_in" />
|
||||
@@ -52,7 +55,7 @@
|
||||
android:id="@+id/navinfo_map_zoom_out"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_nimap_default_button"
|
||||
android:background="@null"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/icon_map_zoom_out" />
|
||||
|
||||
|
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 195 B |
|
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 191 B |
|
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 156 B |
|
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 155 B |
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="nimap_defalut_padding">12dp</dimen>
|
||||
<dimen name="nimap_defalut_padding">5dp</dimen>
|
||||
</resources>
|
||||