-
-
Save trevor-coleman/1b447dbdb196118f4136e542dd007f4e to your computer and use it in GitHub Desktop.
A Typescript interface for GeoJSON objects based on rfc7946
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface IGeometry { | |
type: string; | |
coordinates: number[]; | |
} | |
export interface IGeoJson { | |
type: string; | |
geometry: IGeometry; | |
bbox?: number[]; | |
properties?: any; | |
} | |
export class GeoJson implements IGeoJson { | |
constructor(public type, public geometry, properties?, bbox?) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment