UNPKG

osm-to-svg

Version:

Convert OpenStreetMap (OSM) data to SVG.

26 lines (25 loc) 813 B
import { Feature, Point, GeoJsonProperties, FeatureCollection } from 'geojson'; import { OSMQueryAtom } from "./fetchOSM"; export interface FetchAreaOptions { center: Feature<Point, GeoJsonProperties>; width: number | string; height: number | string; bearing?: number; scale: string; clipFeatures?: boolean; query?: string[] | string | OSMQueryAtom[]; propertiesAsTags?: boolean; } export interface FetchAreaResult { geoJSON: { collection: FeatureCollection; clippingArea: Feature; }; svg: { generate: () => string; paths: string[]; clippingArea: string; }; } export type FetchArea = (props: FetchAreaOptions) => Promise<FetchAreaResult>; export declare function fetchArea(props: FetchAreaOptions): Promise<FetchAreaResult>;