Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoJSON and VectorTile types #4932

Merged
merged 1 commit into from
Jul 5, 2017
Merged

GeoJSON and VectorTile types #4932

merged 1 commit into from
Jul 5, 2017

Conversation

jfirebaugh
Copy link
Contributor

Includes some code changes to support the type annotations:

  • GeoJSONWrapper implements the VectorTile interface as well as the VectorTileLayer interface. This eliminates special _geojsonTileLayer cases from GeoJSONWorkerSource and WorkerTile.
  • Use composition instead of augmenting vector tile objects with rawData, expires, and cacheControl properties. (We still augment individual features with index and sourceLayerIndex; this should be cleaned up in a subsequent refactor.)

features: Array<GeoJSONFeature>
};

declare type GeoJSON = GeoJSONGeometry | GeoJSONFeature | GeoJSONFeatureCollection;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

@anandthakker
Copy link
Contributor

GeoJSONWrapper implements the VectorTile interface as well as the VectorTileLayer interface. This eliminates special _geojsonTileLayer cases from GeoJSONWorkerSource and WorkerTile.

Use composition instead of augmenting vector tile objects with rawData, expires, and cacheControl properties. (We still augment individual features with index and sourceLayerIndex; this should be cleaned up in a subsequent refactor.)

💯

@jfirebaugh jfirebaugh merged commit 46a6bb1 into master Jul 5, 2017
@jfirebaugh jfirebaugh deleted the type-vt branch July 5, 2017 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants