mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 00:14:49 -04:00
Map Updates
Allow OpenSkyNetwork DB, OpenAIP and OurAirports DB stuctures to be shared by different plugins, to speed up loading. Perform map anti-aliasing on the whole map, rather than just info boxes, to improve rendering speed when there are many items. Add map multisampling as a preference. Add plotting of airspaces, airports, navaids on Map feature. Add support for polylines and polygons to be plotted on Map feature. Add support for images to 2D Map feature. Add distance and name filters to Map feature. Filter map items when zoomed out or if off screen, to improve rendering performance. Add UK DAB, FM and AM transmitters to Map feature. Use labelless maps for 2D transmit maps in Map feature (same as in ADS-B demod).
This commit is contained in:
@@ -147,6 +147,30 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Polygons (such as for airspaces) should be prioritized behind other entities
|
||||
function pickEntityPrioritized(e)
|
||||
{
|
||||
var picked = viewer.scene.drillPick(e.position);
|
||||
if (Cesium.defined(picked)) {
|
||||
var firstPolygon = null;
|
||||
for (let i = 0; i < picked.length; i++) {
|
||||
var id = Cesium.defaultValue(picked[i].id, picked[i].primitive.id);
|
||||
if (id instanceof Cesium.Entity) {
|
||||
if (!Cesium.defined(id.polygon)) {
|
||||
return id;
|
||||
} else if (firstPolygon == null) {
|
||||
firstPolygon = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
return firstPolygon;
|
||||
}
|
||||
}
|
||||
|
||||
function pickEntity(e) {
|
||||
viewer.selectedEntity = pickEntityPrioritized(e);
|
||||
}
|
||||
|
||||
Cesium.Ion.defaultAccessToken = '$CESIUM_ION_API_KEY$';
|
||||
|
||||
const viewer = new Cesium.Viewer('cesiumContainer', {
|
||||
@@ -161,6 +185,7 @@
|
||||
terrainProviderViewModels: [] // User should adjust terrain via dialog, so depthTestAgainstTerrain doesn't get set
|
||||
});
|
||||
viewer.scene.globe.depthTestAgainstTerrain = false; // So labels/points aren't clipped by terrain
|
||||
viewer.screenSpaceEventHandler.setInputAction(pickEntity, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
var buildings = undefined;
|
||||
const images = new Map();
|
||||
|
||||
@@ -351,7 +376,7 @@
|
||||
fabric: {
|
||||
type: 'Image',
|
||||
uniforms: {
|
||||
image: 'data:image/png;base64,' + command.data,
|
||||
image: command.data,
|
||||
}
|
||||
},
|
||||
translucent: true
|
||||
|
||||
Reference in New Issue
Block a user