Created
January 14, 2015 20:56
-
-
Save handygeospatial/9946fd69e839fca5a5a5 to your computer and use it in GitHub Desktop.
GeoJSONタイルのフォーマットの違い(TileLayer.GeoJSON vs Tangram) ref: http://qiita.com/handygeospatial/items/cc0cf63b13e2857c56ee
This file contains 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
/** | |
Mapzen/OSM.US-style GeoJSON vector tiles | |
@class GeoJSONTileSource | |
*/ | |
export class GeoJSONTileSource extends NetworkTileSource { | |
constructor (source) { | |
super(source); | |
this.type = 'GeoJSONTileSource'; | |
} | |
parseTile (tile, response) { | |
tile.layers = JSON.parse(response); | |
TileSource.projectTile(tile); // mercator projection | |
TileSource.scaleTile(tile); // re-scale from meters to local tile coords | |
} | |
} |
This file contains 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
{ | |
"earth": { | |
"type":"FeatureCollection", | |
"features": [...], | |
... | |
}, | |
"landuse": { | |
"type":"FeatureCollection", | |
"features": [...], | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment