Объекты Q
, которые позволяют сложный поиск. Пример:
from django.db.models import Q
Item.objects.filter(Q(creator=owner) | Q(moderated=False))
Я могу заставить это работать. Я сделал это:
В моих typings.d.ts
// Import Leaflet into L in case you want to reference Leaflet types
import * as L from 'leaflet';
// Declare the leaflet module so we can modify it
declare module 'leaflet' {
export interface IEasyPrintConstructorOptions {
title: string;
position: string;
exportOnly: boolean;
hideControlContainer: boolean;
hidden:boolean;
}
export interface EasyPrint extends L.Control {
}
export function easyPrint(options?: IEasyPrintConstructorOptions): EasyPrint;
}
В app.component.ts:
import * as L from 'leaflet';
import 'leaflet-easyprint';
//easyPrint initialization
this.easyPrint = L.easyPrint({
title: 'Print map',
position: 'bottomright',
exportOnly: true,
hideControlContainer: true,
hidden:true
}).addTo(map);
//manually trigger export
this.easyPrint.printMap('CurrentSize', 'Filename');
Это решение основано на коде, который вы поставить вопрос и https://asymmetrik.com/ngx-leaflet-and-leaflet-plugins/