feat: 动态marker配置支持多图标设置

This commit is contained in:
2023-11-17 09:24:53 +08:00
parent 35301e4c48
commit 89b862a0cd
6 changed files with 47 additions and 36 deletions

View File

@@ -257,7 +257,7 @@
<xs:attribute name="repeat-start" default="30" type="xs:float" use="optional"/>
<xs:attribute name="rotate" default="true" type="xs:boolean" use="optional"/>
<!-- 设置是否支持图标压盖如果为true则同点位图标不避让允许压盖否则支持自动避让 -->
<xs:attribute name="gland" default="true" type="xs:boolean" use="optional"/>
<xs:attribute name="gland" default="false" type="xs:boolean" use="optional"/>
<!-- 原图标旋转角度默认情况下应该使用以X轴为正方向的图标此处可设置原图标的旋转角度在渲染时自动对图标进行旋转仅支持线要素 -->
<xs:attribute name="degree" default="0" type="xs:float" use="optional"/>
<!-- 图标在y轴方向上的偏移量 -->

View File

@@ -1556,7 +1556,7 @@
<!-- 车信 -->
<m v="OMDB_LANEINFO" >
<symbol repeat="false" repeat-start="0" repeat-gap="2000"
src="@symbol" symbol-height="24" degree="90"></symbol>
src="@src" symbol-height="24" degree="90"></symbol>
</m>
<!-- 杆状物 -->
<m v="OMDB_POLE">

View File

@@ -1,7 +1,6 @@
package com.navinfo.collect.library.map.source;
import android.os.Build;
import android.util.Log;
import androidx.annotation.RequiresApi;
@@ -11,21 +10,17 @@ import com.navinfo.collect.library.utils.GeometryTools;
import com.navinfo.collect.library.utils.MapParamUtils;
import org.locationtech.jts.geom.Polygon;
import org.oscim.core.MapPosition;
import org.oscim.layers.tile.MapTile;
import org.oscim.map.Map;
import org.oscim.map.Viewport;
import org.oscim.tiling.ITileDataSink;
import org.oscim.tiling.ITileDataSource;
import org.oscim.tiling.QueryResult;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import io.realm.RealmQuery;
public class OMDBTileDataSource implements ITileDataSource {
@@ -129,7 +124,7 @@ public class OMDBTileDataSource implements ITileDataSource {
realmQuery.endGroup();
}
long time = System.currentTimeMillis();
List<RenderEntity> listResult = realmQuery.findAll();
List<RenderEntity> listResult = realm.copyFromRealm(realmQuery.findAll());
long newTime = System.currentTimeMillis() - time;
// Log.e("jingo", "当前OMDBTileDataSource " + Thread.currentThread().hashCode() + " 当前realm " + realm.hashCode() + " 查询耗时" + newTime + " 条数" + listResult.size());